diff --git a/recherches/ALDLoverAB/algo/index.tex b/recherches/ALDLoverAB/algo/index.tex index 4c882e3..f1913b0 100644 --- a/recherches/ALDLoverAB/algo/index.tex +++ b/recherches/ALDLoverAB/algo/index.tex @@ -1,14 +1,43 @@ We define $k$ as the id of the round \\ -the $getMax(..)$ function able to return the highest round played in the system. +the $getMax(proves)$ return $MAX({(\_, r) : \exists (\_, PROVE(r)) \in proves})$ \\ +$buffer$ a FIFO list with $buffer[front]$ returning the first element + +% \begin{algorithm}[H] +% \DontPrintSemicolon +% \SetAlgoLined +% \KwIn{le message $m$} +% \BlankLine +% \While{true}{ +% proves = READ() \\ +% k = getMax(dump) + 1 \\ +% APPEND(k || m) \\ +% \If{PROVE(k)}{ +% APPEND(k) \\ +% return +% } +% } +% \caption{AB\_Broadcast} +% \end{algorithm} \begin{algorithm}[H] \DontPrintSemicolon \SetAlgoLined \KwIn{le message $m$} \BlankLine +k\_max = getMax(READ()) \\ +\While{buffer $\neq [\emptyset] $}{ + (i, m) = buffer[front] \\ + \textbf{wait} PROVE(k\_max || m) = false \\ + proves = READ() \\ + \If{$((i, PROVE(k\_max || m)) \in proves) \wedge ((i, PROVE(k\_max)) \in proves)$}{ + $buffer = buffer - \{(i, m)\}$ + } +} +\BlankLine \While{true}{ proves = READ() \\ - k = getMax(dump) + 1 \\ + k = getMax(proves) + 1 \\ + PROVE(k || m) \\ APPEND(k || m) \\ \If{PROVE(k)}{ APPEND(k) \\ @@ -18,29 +47,55 @@ the $getMax(..)$ function able to return the highest round played in the system. \caption{AB\_Broadcast} \end{algorithm} -We define $k\_max$ as an intager \\ -$getMax(..)$ function able to return the highest round played in the system. \\ -% $proves_r$ as the sub set of proves with only the valid proves associated to the round r \\ -$proves_r \subseteq proves$ s.a. $\forall PROVE(x) \in proves_r$, x is in the form $r || m$ with $m$ who cannot be empty \\ -$proves_r^i$ is the $PROVE(r || m )$ operation submited by the process i if exist \\ +$proves_r = {(i, r) : \forall i, \exists (i, PROVE(r)) \in proves}$ \\ +$proves_r^i = ((i, r) : \exists (i, PROVE(r)) \in proves)$ ?? NULL \\ + +% $proves_r \subseteq proves$ s.a. $\forall PROVE(x) \in proves_r$, x is in the form $r || m$ with $m$ who cannot be empty \\ +% $proves_r^i$ is the $PROVE(r || m )$ operation submited by the process i if exist \\ \begin{algorithm}[H] \DontPrintSemicolon \SetAlgoLined + buffer = $[\emptyset]$ \\ + k = 0 \\ \BlankLine \While{true}{ proves = READ() \\ k\_max = getMax(proves) \\ \For{r=k+1 \emph{\KwTo} k\_max}{ APPEND(r)\\ - $proves_r$ = \{$\forall i, PROVE(r)_i \in READ()$\} \\ \For{i = 1 \emph{\KwTo} $|P|$}{ - \If{$\exists PROVE(r)_i \in proves_r$}{ - AB\_Recv($m$ s.t. $PROVE(r || m) \in proves$) + \If{$(\exists m : \exists(i, PROVE(r || m)) \in proves)$}{ + \uIf{$(\exists(i, PROVE(r)) \in proves)$} { + AB\_Recv(m) + } + \Else{ + $buffer = buffer \cup \{(i, m)\}$ + } } } } } +\caption{AB\_Listen} +\end{algorithm} - \caption{AB\_Listen} -\end{algorithm} \ No newline at end of file +% \begin{algorithm}[H] +% \DontPrintSemicolon +% \SetAlgoLined +% \BlankLine +% \While{true}{ +% proves = READ() \\ +% k\_max = getMax(proves) \\ +% \For{r=k+1 \emph{\KwTo} k\_max}{ +% APPEND(r)\\ +% $proves_r$ = \{$\forall i, PROVE(r)_i \in READ()$\} \\ +% \For{i = 1 \emph{\KwTo} $|P|$}{ +% \If{$\exists PROVE(r)_i \in proves_r$}{ +% AB\_Recv($m$ s.t. $PROVE(r || m) \in proves$) +% } +% } +% } +% } + +% \caption{AB\_Listen} +% \end{algorithm} \ No newline at end of file diff --git a/recherches/ALDLoverAB/main.fdb_latexmk b/recherches/ALDLoverAB/main.fdb_latexmk index c24580e..3551725 100644 --- a/recherches/ALDLoverAB/main.fdb_latexmk +++ b/recherches/ALDLoverAB/main.fdb_latexmk @@ -1,12 +1,12 @@ # Fdb version 4 -["biber main"] 0 "main.bcf" "main.bbl" "main" 1745574630.97508 -1 - "main.bcf" 1745574630.93019 108486 d8549f9e7d9f09af6a94b466d27b9f55 "pdflatex" +["biber main"] 0 "main.bcf" "main.bbl" "main" 1746004825.89207 -1 + "main.bcf" 1746004825.84735 108486 d8549f9e7d9f09af6a94b466d27b9f55 "pdflatex" "sources.bib" 1745505510 0 d41d8cd98f00b204e9800998ecf8427e "" (generated) "main.bbl" "main.blg" (rewritten before read) -["pdflatex"] 1745574630.5147 "/workspaces/containers/recherches/ALDLoverAB/main.tex" "main.pdf" "main" 1745574630.97528 0 +["pdflatex"] 1746004825.45178 "/workspaces/containers/recherches/ALDLoverAB/main.tex" "main.pdf" "main" 1746004825.89228 0 "/usr/local/texlive/2025/texmf-dist/fonts/enc/dvips/cm-super/cm-super-t1.enc" 1136849721 2971 def0b6c1f0b107b3b936def894055589 "" "/usr/local/texlive/2025/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" "/usr/local/texlive/2025/texmf-dist/fonts/tfm/jknappen/ec/ecbx0700.tfm" 1136768653 3584 ca0c423beaacd28d53ddce5a826cd558 "" @@ -82,11 +82,11 @@ "/usr/local/texlive/2025/texmf-var/web2c/pdftex/pdflatex.fmt" 1743313810 3345755 ba2ca5aadbc395a8eb3e969a7d392ec2 "" "/usr/local/texlive/2025/texmf.cnf" 1743313649 455 5b996dcaa0eb4ef14a83b026bc0a008c "" "/workspaces/containers/recherches/ALDLoverAB/main.tex" 1745569300.58113 728 260366a29ef55ffa4b47d22972e9e4f8 "" - "algo/index.tex" 1745574630.33418 1273 3b61b9dc0dc01e4c5129081738b6a6eb "" + "algo/index.tex" 1746004825.26138 2503 f07bfa513519f147d955354146846757 "" "intro/index.tex" 1745569389.83114 2291 8451d9b4ced1f44c45b59e7619773077 "" - "main.aux" 1745574630.92919 1267 145af77271d4d82823c8622c1004e8b1 "pdflatex" + "main.aux" 1746004825.84535 1267 145af77271d4d82823c8622c1004e8b1 "pdflatex" "main.bbl" 1745511552 466 76d65a242ec496c9b4361af646ff12cb "biber main" - "main.run.xml" 1745574630.93119 2301 7adc9b5a22e7927ebfdd8580ad5d647d "pdflatex" + "main.run.xml" 1746004825.84735 2301 7adc9b5a22e7927ebfdd8580ad5d647d "pdflatex" "main.tex" 1745569300.58113 728 260366a29ef55ffa4b47d22972e9e4f8 "" (generated) "main.aux" diff --git a/recherches/ALDLoverAB/main.log b/recherches/ALDLoverAB/main.log index 39d0b39..73a717c 100644 --- a/recherches/ALDLoverAB/main.log +++ b/recherches/ALDLoverAB/main.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex 2025.3.30) 25 APR 2025 09:50 +This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=pdflatex 2025.3.30) 30 APR 2025 09:20 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. @@ -459,7 +459,7 @@ Underfull \hbox (badness 10000) in paragraph at lines 34--39 ) (./algo/index.tex [1] -Underfull \hbox (badness 10000) in paragraph at lines 21--26 +Underfull \hbox (badness 10000) in paragraph at lines 50--52 [] @@ -481,13 +481,13 @@ Package logreq Info: Writing requests to 'main.run.xml'. Here is how much of TeX's memory you used: 12400 strings out of 473190 234983 string characters out of 5715806 - 1086239 words of memory out of 5000000 + 1088239 words of memory out of 5000000 35571 multiletter control sequences out of 15000+600000 566378 words of font info for 46 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 - 66i,21n,81p,738b,1731s stack positions out of 10000i,1000n,20000p,200000b,200000s + 66i,24n,81p,738b,1731s stack positions out of 10000i,1000n,20000p,200000b,200000s -Output written on main.pdf (3 pages, 204949 bytes). +Output written on main.pdf (3 pages, 212161 bytes). PDF statistics: 85 PDF objects out of 1000 (max. 8388607) 51 compressed objects within 1 object stream diff --git a/recherches/ALDLoverAB/main.pdf b/recherches/ALDLoverAB/main.pdf index a5868c3..a1aa36a 100644 Binary files a/recherches/ALDLoverAB/main.pdf and b/recherches/ALDLoverAB/main.pdf differ diff --git a/recherches/ALDLoverAB/main.synctex.gz b/recherches/ALDLoverAB/main.synctex.gz index f52dd88..d29ddc3 100644 Binary files a/recherches/ALDLoverAB/main.synctex.gz and b/recherches/ALDLoverAB/main.synctex.gz differ