Documentation

CslibFrontier.Computability.PointerMachine.Data

Data invariants for pointer machines #

A predicate on data that holds of the undefined value and is closed under the operations of the model is preserved by execution. This separates a general data basis from restricted ones such as equality-only symbols.

Main definitions #

Main results #

A predicate on data which holds of undefined and is closed under every operation.

def Cslib.PointerMachine.State.DataValid {M : Model} {L : Layout} (x : State M L) (P : M.Value → Prop) :

All data in registers and records satisfy a predicate.

theorem Cslib.PointerMachine.Instr.effect_dataValid_of {M : Model} {L : Layout} {P Q : M.Value → Prop} (promote : ∀ (a : M.Value), P a → Q a) (undefined : Q M.undefined) (operation : ∀ (o : M.Op) (a b : M.Value), P a → P b → Q (M.evalOp o a b)) {i : Instr M L} {x : State M L} (hx : x.DataValid P) :

An instruction transports a data predicate when old values, newly allocated values, and operation results all satisfy the target predicate.

theorem Cslib.PointerMachine.Instr.effect_dataValid {M : Model} {L : Layout} {P : M.Value → Prop} (closed : M.Closed P) {i : Instr M L} {x : State M L} (hx : x.DataValid P) :

Closed predicates on data survive every instruction.

theorem Cslib.PointerMachine.Runs.dataValid {M : Model} {L : Layout} {P : M.Value → Prop} (closed : M.Closed P) {code : List (Instr M L)} {x y : State M L} {n : ℕ} (h : Runs code x y n) (hx : x.DataValid P) :

Data invariants are preserved through an entire run.

theorem Cslib.PointerMachine.Executes.dataValid {M : Model} {L : Layout} {P : M.Value → Prop} (closed : M.Closed P) {code : List (Instr M L)} {x y : State M L} {time : ℕ} (h : Executes code x y time) (hx : x.DataValid P) :

Closed data predicates survive successful execution.