next up previous contents index
Next: do statements Up: Applying the simplify algorithm Previous: if, switch, and synchronized   Contents   Index


while statements

We consider the statement

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb$while($$e$\verb$) $$S$\end{tabbing}\end{minipage}\end{displaymath}

where $e$ is an expression and $S$ is a statement. Again let $\mbox{\it INITS}$ and $e'$ be the results of applying the simplify algorithm to $e$. If $e' = e$, the transformed version is just

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb$while($$e$\verb$) $$S'$\end{tabbing}\end{minipage}\end{displaymath}

where $S'$ is the pre-translated version of $S$. Otherwise the transformed version is

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb$while(t...
...\>\verb$}$ \\
\>$S'$ \\
\verb$}$
\end{tabbing}\end{minipage}\end{displaymath}



Bryan Carpenter 2003-04-15