M6: the glue for the top structure #
Level F's top proofs establish the hypotheses of the run lemmas inside their proofs. Here they are exported as lemmas from the top invariant, so that the Level M case lemmas apply.
The hypotheses of a sweep step that moves a chunk (those of drainStep_move, and the shape
facts the Level M program needs), from the order invariant: the proof of Shape.drain_run.
The hypotheses of a sweep step that ends the drain (those of drainStep_finish, and the
shape facts the Level M program needs).
The capacities the top structure's programs need, at state s: the record counts below the
capacities (with room for the two records a step may add), node capacity covering chunk indices,
and list capacities above the invariant bounds (tables of at most 160 entries, entries in at most
2 tables).
Instances For
The cost bound of startDrain, from tables of at most 160 entries and entries in at most two
tables.
Equations
- OrderMaintenance.Impl.sdBound = OrderMaintenance.Impl.sdCost 160 160 2 160 160 160
Instances For
startDrain agrees at a drain start (the context of sr_run).
A sweep step that moves a chunk agrees (outside a preparation).
A sweep step that ends the drain agrees.
The funding loop's sweep step agrees: its source is a ghost, so the step moves a chunk or ends the drain.
The walk step's agreements, at node v of the walk: startDrain where the walk starts a
drain, and the sweep step of the funding loop where v has an overflow source.
A copy step keeps the node count and the path of the chunk copied from.
The running job's chunks: in the chunk list, distinct, not NIL.
A copy step agrees.
A split start agrees, under the top invariant with no job running, outside a preparation, with the capacities and zero path rows beyond the chunks.