M6: groups (Model/Core.lean: group splits) #
Each procedure is a sequence of field writes. A write is a modify of one record
(evalF_wrG_ok …), consecutive writes to one record merge (Array.modify_modify_same), and the
blocks follow Level F's lets, so a conditional write needs a two-way split only.
Writes #
linkGroupPair #
Initialize and link the left overflow group before its source.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Initialize and link the right overflow group after its source.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mark the source group as splitting and record its two overflow siblings.
Equations
- One or more equations did not get rendered due to their size.
Instances For
linkGroupPair: link gl, gr around g (locals g gl gr labL labR).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Five writes to one group.
Update the first-group pointer exactly when its predecessor is absent.
Append a group index to the reversed free-list view, updating the model free list.
linkGroupPairS computes linkGroupPair.
unlinkGroup #
Test whether the group being removed is its chunk's only group.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mark a removed group dead and clear its list links.
Equations
- One or more equations did not get rendered due to their size.
Instances For
unlinkGroup: unlink g from the group list and its chunk, and free it (local g).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Moving one element #
Remove an endpoint element from its source group, clearing both endpoints if empty.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Attach a moving element to the corresponding end of its destination group.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Set the moving element's containing group and new label.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Label primitives #
lab := between a b (locals a b).
Equations
- One or more equations did not get rendered due to their size.
Instances For
labBefore, labAfter #
lab := labBefore g (local g).
Equations
- One or more equations did not get rendered due to their size.
Instances For
lab := labAfter g (local g).
Equations
- One or more equations did not get rendered due to their size.
Instances For
newGroup #
Clear a reused group's links and endpoints and set its containing chunk.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Clear a reused group's label, size, split state, source and left sibling.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Clear a reused group's right sibling and mark it alive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reset group gn to { chk := c } (every field written).
Equations
Instances For
gn := newGroup c: reuse the last freed group, or push a new one (local c).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The record update corresponding to the first reused-group reset stage.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The record update corresponding to the second reused-group reset stage.
Equations
- One or more equations did not get rendered due to their size.
Instances For
startGroupSplit #
Procedure selecting a group label before the given group.
Equations
- OrderMaintenance.Impl.labBeforeP = { name := "labBefore", params := ["g"], rets := ["lab"], body := OrderMaintenance.Impl.labBeforeS }
Instances For
Procedure selecting a group label after the given group.
Equations
- OrderMaintenance.Impl.labAfterP = { name := "labAfter", params := ["g"], rets := ["lab"], body := OrderMaintenance.Impl.labAfterS }
Instances For
Procedure allocating or reusing a group in a chunk.
Equations
- OrderMaintenance.Impl.newGroupP = { name := "newGroup", params := ["c"], rets := ["gn"], body := OrderMaintenance.Impl.newGroupS }
Instances For
startGroupSplit g, guarded by Level F; every successful run satisfies the guard.
Equations
- One or more equations did not get rendered due to their size.