Lowered Forward Evaluation: SSA Denotation Agreement #
The main theorem denoteAllFrom_lowerForwardLetChain_eq_evalForwardLetChainVals states that
running the IR evaluator over a lowered let-chain produces the same value vector as the typed
evaluator. The proof is an induction over the chain: evalAt_eq_evalNode_of_lowerNode dispatches
the one-node agreement to the per-operator lemmas, and the remaining lemmas here unfold one
evaluation step on each side.
Evaluating the IR node emitted by lowerNode agrees with evalNode on the source node, provided
the graph holds that node at id and the parameter store agrees with the lowering at id.
The lowering accumulator after appending the lowering of one node at the fresh id.
Instances For
Lowering a let1 chain lowers the head node and continues from the extended accumulator.
The id reserved by lowerStep stays in range after lowering the rest of the chain.
The node lowered by lowerStep evaluates like its source node inside the fully lowered graph:
lowering the rest of the chain neither moves the node nor disturbs its payload entries.
One in-range step of denoteAllFrom: evaluate node i, push it, and continue at i + 1.
Pushing a successfully evaluated node value extends the shape context by its output shape.
denoteAllFrom for the lowered IR agrees with the forward-fragment evaluator that returns all
intermediate values. Lowering preserves the full SSA value vector up to the current
lowering point, not only the final output.