Documentation

Complexity.Computability.Ram.Source.Bounds

Inferring local-register bounds from structured code #

Stmt.regBound counts the register slots actually named by a statement, including call destinations and argument expressions. It does not constrain callees or assign an execution cost. Together with parameter and result-field bounds it lets a compiler infer a function's local frame from its emitted syntax.

One past every register read or written by the actual statement syntax.

Equations
Instances For
    theorem Ram.Stmt.wellFormed_of_regBound_le {stmt : Stmt} {locals : Nat} (bound : stmt.regBound ≤ locals) :
    stmt.WellFormed locals

    Any allowance covering the inferred bound covers every local operand. Function existence, arity and dynamic safety remain separate obligations.

    The inferred bound is sufficient for the statement that produced it.