Code Generation

CS 432 — ILOC code shape · Operational semantics
Generated with the assistance of Claude Code (Opus 5.5)
— ← / → (Home / End) step through the nodes in the order the generator completes them · click source text, an AST node, or an ILOC line to select it

Decaf Source

The selected construct's own syntax is highlighted, and each child's text is colored as in the ILOC pane. Click any character to select the innermost construct containing it.

No traces loaded — run tracer/regen_traces.sh

AST

Each node's role in its parent, its kind, and the register holding its value. Colored nodes supplied the child code.

ILOC

The outlined range is the selected node's code. Highlighted lines are its template; colored runs are child code, copied from the children tagged on the right.

Code Attribute

The selected node's ⟨C, r⟩: its template lines, and a placeholder for each child's code. Click a placeholder to expand it.

Code Generation Rule

From the language reference ("Operational Semantics"). Highlighted code is the template; underlined metavariables stand for child code, in the ILOC pane's colors.

Running It

The complete listing above, run by the ILOC simulator

What to Notice

Register and label numbers are the reference compiler's. Another correct compiler may number them differently.