.
[phd-thesis.git] / top / green.tex
index 98f23cb..79843f2 100644 (file)
@@ -398,17 +398,18 @@ Executed tasks are temporarily stored in the \cleaninline{stepped} set instead o
 A task that produces a stable value is completed and is not queued again.
 
 \begin{algorithm}
-\DontPrintSemicolon
+%\DontPrintSemicolon
 \SetKwProg{Repeatt}{repeat}{}{end}
 \KwData{queue = []\;}
 \Begin{
        \Repeatt{}{
-               queue += communicateWithServer\;
+               time = currentTime()\;
+               queue += communicateWithServer()\;
                stepped = []\tcp*{tasks stepped in this round}
-               \While{notEmpty(queue) $\wedge$ earliestDeadline(top(queue)) $\leq$ currentTime}{
+               \While{$\neg$empty(queue) $\wedge$ earliestDeadline(top(queue)) $\leq$ time}{
                        (task, queue) = pop(queue)\;
                        task2 = step(task)\tcp*{computes new execution interval}
-                       \If{$\neg$ isStable(task2)\tcp*{not finished after step}}{
+                       \If(\tcp*[f]{not finished after step}){$\neg$ isStable(task2)}{
                                stepped += task2\;
                        }
                }