M5: a sweep step keeps the invariant #
drainStep src, in the funding loop of a job (.fund v up src k, k < s), on a ghost with a
non-empty range: all its lookups succeed, its tag passes the guard, and the invariant holds
afterwards with k + 1 (docs/PROOF.md §4.5.1, SweepStep).
The state after a sweep step #
New range pointers of the ghost.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ghost range last pointer after transferring one chunk to a target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
New range pointers of the target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The target range last pointer after receiving the transferred chunk.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The top structure's part after a sweep step #
What a sweep step finds #
A chunk in a ghost's range: its live ancestor is a target, and the entry below has a side.
The sweep step's pick: the chunk moved is in the range, its live ancestor is the target, it is the first (moving left) or the last (moving right) of the range.
The tag part of the invariant after the step #
Shared sweep-step guards, shape bounds and the interpretation of the new tag.
The sweep step runs, and the tag it writes is the tag of the new path.
The rest of the order invariant after the step #
The ranges after the step: the chunk leaves the ghost's range and joins the target's, at the end next to it.
The order invariant after a sweep step.
Timing, room and the job after the step #
A sweep step keeps the invariant, and moves the funding loop on.