Theorem W, option (A), stage A3: tools for the machine-only code #
- Peak-only rules. The machine-only proofs bound the peak of a piece of code with the
postcondition
TT(nothing but the budget):wpB B c TT m. The state facts the next piece needs come from the existingwptheorems (WrapM,RebuildM,OpsM, …), combined bywpB_and/wpB_seq_of; their statements are unchanged.dpk_le_ofturns a budget proof from the state with the peak reset into a bound ondpk. - The budget of one operation at word size
Kwith handle widthKH:BW K KH = 2^(2K+4) + 2^KH; a core procedure's peak< 2^(wPk K KH)is within it (pk_BW). - The capacities of the proof parameters are small:
CapsW (wK P) (capsOf P)forP = proofParams N(capsW_wK), frommemOf_eq/core_mem(and a direct bound forN < 64); monotone inK(CapsW.mono). - A core ready for a call at word size
K(CoreK): proof parameters,wK ≤ K,WB K, handles below2^KH; it gives the hypotheses of the five A2 wrappers.
Nothing here is used by Theorems A and B.
Peak-only rules #
The postcondition of a peak-only proof.
Equations
- OrderMaintenance.Impl.TT x✝¹ x✝ = True
Instances For
A sequence whose first part's state facts come from a wp theorem.
A sequence, both parts by budget proofs.
A sequence with a postcondition, the first part's state facts from a wp theorem.
A conditional with a postcondition, forgetting the bumped state.
Two facts about the same run.
A value is at most the peak of its expression.
Truncated subtraction introduces no peak above its operands and the Boolean value one.
Addition bounds every intermediate value by the sum of the operand peak bounds.
Equality comparison adds only a Boolean value to the operand peak bounds.
From a budget proof at the reset state to dpk.
The budget #
Every word budget contains a positive power of two.
Close a word-budget inequality using positivity and the square-width power bound.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The capacities of the proof parameters #
The cells of a core of the proof parameters, for N < 64 (L = 8).
The cells of a core of the proof parameters are below 2^(wK P).
The capacities of the proof parameters are below 2^(wK P), the index arithmetic of the
compiled code included.