Pointer-machine invariants #
Validity, pointer provenance, allocation freshness, determinism and the space bound.
The model itself is defined in Defs.
Main results #
Executes.valid,Executes.length_le: validity and record-space bounds for halting runs.Executes.unique: uniqueness of the final state and instruction count.Instr.effect_provenance,Instr.effect_heap_provenance: register and heap-edge provenance.
No records, null pointer registers and undefined data registers.
theorem Cslib.PointerMachine.Instr.effect_provenance {M : Model} {L : Layout} {i : Instr M L} {x : State M L} {r : Fin L.ptrRegs} {a : ℕ} (ha : (effect x i).ptr r = some a) :
A pointer in a register after an instruction was in a register before it, or in a field of a record specified by a register, or specifies the record just created.
theorem Cslib.PointerMachine.Instr.effect_heap_provenance {M : Model} {L : Layout} {i : Instr M L} {x : State M L} {n : Record M L} (hn : n ∈ (effect x i).heap) {f : Fin L.ptrFields} {a : ℕ} (ha : n.ptr f = some a) :
Every nonnull pointer stored in a record after an instruction was previously in a register or a record. Allocation itself only puts null pointers in the new record.