Actual field updates of the splay rotations #
These contracts describe the two real heap writes performed by a rotation.
Ordinary array contents establish successful reads and writes; the resulting
Array.set equations expose the precise field changes to a mathematical tree
representation. The write witnesses also retain frames for unrelated objects,
disjoint views of the same object and untouched cells of either child array.
The left/right buffers need disjoint storage, not distinct object identifiers. No assumption about a particular heap encoding, word width or time budget is needed for these source-correctness statements.
The declared right rotation performs the supplied current-heap accesses. The witnesses describe real writes in order, not a replacement array evaluator.
Swapping the two field arrays exchanges the source behaviors of the two rotations. This equation is not used to assign either implementation's cost.
The symmetric rotation retains the actual intermediate shared heap.
Valid ordinary array contents suffice for a right rotation. Its complete postcondition retains both precise array updates and the two heap-write facts, so later tree, alias and frame proofs do not have to reopen the implementation.
Valid ordinary array contents give the symmetric left-rotation contract, including both real writes and the current contents of both field arrays.
Two rotation writes preserve every unrelated borrowed view, including a keys array or disjoint slices of either underlying object. The two write facts are obtained directly from either rotation's operational contract.