next up previous contents index
Next: Local variable declarations Up: Applying the simplify algorithm Previous: Applying the simplify algorithm   Contents   Index

Statement expressions

To start with the easiest case, consider the statement

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
$e$\verb$ ;$
\end{tabbing}\end{minipage}\end{displaymath}

where $e$ is an expression. Suppose $\mbox{\it INITS}$ and $e'$ are the results of applying the simplify algorithm to $e$. If $e' = e$, i.e. no simplification is required, the input statement is unchanged. Otherwise, it transformed to

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb${$ \\
...
...$ \\
\>$e'$\verb$ ;$ \\
\verb$}$
\end{tabbing}\end{minipage}\end{displaymath}

The case of a statement expression appearing in the initialization or continuation section of a for-loop header needs some special treatment--see page [*].



Bryan Carpenter 2003-04-15