Verified Forward Fragment: Graph Structure #
The structural part of lowering correctness: every graph produced by lowerForwardProgramToIR
satisfies the verifier IR well-formedness checks.
Extract the list of shapes from an array of dynamic values.
Instances For
shapesOfVals commutes with pushing an element onto the value array.
Preservation of Graph.wellFormed under pushing a new node with the right id, arity, and parent
discipline.
Any typed index Idx Γ s points to a position strictly below Γ.length.
Specialized bound for indices into Ctx inShape ss = inShape :: ss.
Lowered nodes always satisfy the IR arity check.
Lowered nodes satisfy parentsBelow when lowered at the next fresh id. Typed parent indices
ensure parent ids are below the id of the newly-pushed node.
Lowering preserves Graph.wellFormed while threading the lowering pass accumulator through a
forward let-chain.
Graphs produced by lowerForwardProgramToIR satisfy the IR structural discipline
(Graph.wellFormed = true).