next up previous contents index
Next: for statements Up: Applying the simplify algorithm Previous: while statements   Contents   Index


do statements

We consider the statement

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb$do $$S$\verb$ while($$e$\verb$) ;$
\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$do $$S'$\verb$ while($$e$\verb$) ;$
\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$do {$ \...
...b$}$ \\
\verb$} while(true) ;$ \\
\end{tabbing}\end{minipage}\end{displaymath}



Bryan Carpenter 2003-04-15