Next: while statements
Up: Applying the simplify algorithm
if, switch, and synchronized statements
Consider the statement
where is an expression and is a statement.
and are the results of applying
the simplify algorithm to . If , i.e. no
simplification is required, the transformed version is just
where is the pre-translated version of .
Otherwise the transformed version is
The if-else, switch and synchronized statements
follow exactly the same pattern.