Theorem W, option (A), stage A2: statements whose peak follows from their syntax #
Stm.Safe Γ W c says that every expression of c (and of the procedures it calls) has no shift
and a peak width (Exp.wp) at most W, and that every value c stores is no wider than its
destination: Γ x for a local x, K for the core (KH for the handle field). Calls are
checked with every local of the callee at width K.
Stm.safe_run: from a state with the invariant Gd (an encoding, small stored values
VB, and every local x below 2^(Γ x)), a safe statement that does not hit a bug computes
nothing at or above 2^W (pkF < 2^W) and ends, normally or with a failed guard, in a state
with Gd. Most core procedures are safe; the others are composed from safe pieces with the
rules of PeakHP.lean.
Nothing here is used by Theorems A and B.
The invariant of stage A2: an encoding exists, the stored values are small, and every
local x is below 2^(Γ x).
Instances For
An expression without shifts whose peak width is at most W.
Equations
- OrderMaintenance.Impl.Exp.OK Γ K KH W e = (e.noShl = true ∧ OrderMaintenance.Impl.Exp.wq Γ K KH K e ≤ W)
Instances For
A statement whose peak follows from its syntax.
Equations
- One or more equations did not get rendered due to their size.
- OrderMaintenance.Impl.Stm.Safe K KH Γ W OrderMaintenance.Impl.Stm.skip = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (x_1 ::= e) = (OrderMaintenance.Impl.Exp.OK Γ K KH W e ∧ OrderMaintenance.Impl.Exp.vw Γ K KH K e ≤ Γ x_1)
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.push t x_1) = (K ≤ Γ x_1)
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (c;; d) = (OrderMaintenance.Impl.Stm.Safe K KH Γ W c ∧ OrderMaintenance.Impl.Stm.Safe K KH Γ W d)
- OrderMaintenance.Impl.Stm.Safe K KH Γ W OrderMaintenance.Impl.Stm.fail = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W OrderMaintenance.Impl.Stm.bug = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (c.catch h) = (OrderMaintenance.Impl.Stm.Safe K KH Γ W c ∧ OrderMaintenance.Impl.Stm.Safe K KH Γ W h)
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.lshrink k i) = OrderMaintenance.Impl.Exp.OK Γ K KH W i
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.lclear k i) = OrderMaintenance.Impl.Exp.OK Γ K KH W i
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.rowReset c) = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.prepSet h b t) = ∀ e ∈ [h, b, t], OrderMaintenance.Impl.Exp.OK Γ K KH W e ∧ OrderMaintenance.Impl.Exp.vw Γ K KH K e ≤ K
- OrderMaintenance.Impl.Stm.Safe K KH Γ W OrderMaintenance.Impl.Stm.prepCommit = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W OrderMaintenance.Impl.Stm.jobClear = True
- OrderMaintenance.Impl.Stm.Safe K KH Γ W (OrderMaintenance.Impl.Stm.pcSet t a b c d) = ∀ e ∈ [t, a, b, c, d], OrderMaintenance.Impl.Exp.OK Γ K KH W e ∧ OrderMaintenance.Impl.Exp.vw Γ K KH K e ≤ K
Instances For
Expressions under the invariant #
Locals #
The theorem #
What safe_run proves of a statement at one state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The loop of a safe statement.