Slide 16
Slide 16 text
Abstract syntax tree
if (v) v = 0; else v = 1;
while (v) { boolean b; b = true; }
If (
Use (Loc ("v")),
AsgnStm (Assign (Loc ("v"), IntLit (0))),
AsgnStm (Assign (Loc ("v"), IntLit (1))))
While (
Use (Loc ("v")),
Block (
List (
Decl (BooleanType (), Loc ("b")),
AsgnStm (Assign (Loc ("b"), True ())))))