M6: the wrapper's operations as machine code #
The Level M side conditions of the cores (Mc, PrepM) are not part of Level F's invariant; they
are carried alongside it (MX). Level F's run supplies the rest of what the core calls need
(RLSafeF, insert_safe, delete_safe).
Level F's safety facts at the proof parameters.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Level M side condition of nxt: in preparation, or in service with the capacities.
Equations
- OrderMaintenance.Impl.NxtM om n = ((om.cursorSet = false → OrderMaintenance.Impl.PrepM n) ∧ (om.cursorSet = true → OrderMaintenance.Impl.Mc (OrderMaintenance.Impl.capsOf n.P) n.P n))
Instances For
The Level M side conditions of the wrapper state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A copy step keeps the capacities of nxt.
Along the rebuild loop: Level F's safety facts and the side conditions give what the machine iterations need, and the side conditions hold at the end.
The rebuild step #
The rebuild's share of an operation: start a rebuild, or run the loop.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The cost bound of the rebuild step.
Equations
- OrderMaintenance.Impl.rebB KB = 3600 + (KB + 1) * (1 + OrderMaintenance.Impl.iterB)
Instances For
The locals the rebuild step may change.
Equations
Instances For
The rebuild step keeps the side conditions.
The rebuild step: the machine ends holding Level F's result (in one slot or the other), which satisfies the side conditions.
K_B never changes #
The wrapper invariant at Level M #
Level F's cost invariant at the proof parameters.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The wrapper invariant at Level M: Level F's, with the side conditions.
Equations
- OrderMaintenance.Impl.MInv om Sp = (OrderMaintenance.Impl.WCP om Sp ∧ OrderMaintenance.Impl.MX om)
Instances For
cur is in service.
What mirroring an insertion needs.
Mirroring an insertion keeps the side conditions of nxt.
Level F's insertion, step by step: the insertion into cur, its mirroring, and the
rebuild step.
Insertion #
Increment the wrapper's live-handle counter.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The insertion code of parity p.
Equations
Instances For
The wrapper's insertion: the handle of the anchor in local x (if hx = 1).
Instances For
The cost bound of an insertion.
Equations
Instances For
The shared functional prefix of insertion: the core update, mirroring, and safe rebuild preserve parameters and the Level M invariant. Machine and word bounds reuse it.
An insertion at Level M: it answers Level F's handle, keeps the invariant, and the machine
code runs in at most insW K_B steps.
Deletion #
What mirroring a deletion needs: an element copied into nxt is in service there.
Mirroring a deletion keeps the side conditions of nxt.
Level F's deletion, step by step.
Decrement the wrapper's live-handle counter with truncated subtraction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The deletion code of parity p.
Equations
Instances For
The wrapper's deletion of the handle in local x.
Instances For
The cost bound of a deletion.
Equations
Instances For
The shared functional prefix of deletion: marking, mirroring, and the safe rebuild retain the core parameters and intermediate Level M invariant.
A deletion at Level M: it keeps the invariant, and the machine code runs in at most
delW K_B steps.
Order queries #
An order query at Level M: the specification's answer in local r, the state unchanged,
at most 100 steps.