An in-place splay access #
The three borrowed arrays store immutable keys and mutable left/right child
indices. Zero denotes an empty subtree; nonzero indices name stable nodes.
splay returns the new root after an ordinary key search, including unsuccessful
searches. Its recursive calls descend by two edges and its rotations implement
zig, zig-zig and zig-zag, not the different move-to-root algorithm.
The declaration is the sole executable implementation. No mathematical tree is passed to it, and no host tree operation replaces any of its reads or writes. The source contracts establish valid indices and successful termination; separate backend contracts account for finite words, storage and execution cost.
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The finite table of actual named source bodies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold an actual source invocation back to its named ordinary-argument observation.
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
Fold an actual source invocation back to its named ordinary-argument observation.
Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fold an actual source invocation back to its named ordinary-argument observation.
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This named source function's index in its declared signature table.
Equations
Instances For
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
Apply a supplied source contract with ordinary named arguments and its actual returned value and final heap. No callee body or new contract is inferred.
One source-body equation in ordinary monadic notation; named callees remain opaque.
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This named source function's index in its declared signature table.
Equations
Instances For
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
Instances For
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Prove the ordinary-parameter source contract with a total-correctness triple for the same action. The ghost initial heap equals the actual entry heap; successful results use the actual final heap, and faults are excluded.
The named function's actual partial source action, with ordinary typed arguments and an explicitly supplied shared heap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This named source function's index in its declared signature table.
Equations
Instances For
One source-body equation in ordinary monadic notation; named callees remain opaque.
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
The named function's actual independently interpreted source body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source program's declared first-order signatures.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
Instances For
Apply a predicate, postcondition or bound with ordinary source parameters to the actual argument environment. No new contract or execution is introduced.
Equations
Instances For
Budget-free total correctness with ordinary source parameters and relational initial/final heap postconditions. This is the existing source function contract.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The source contract is equivalent to ordinary curried preconditions and successful result/heap postconditions, including termination and absence of faults.
One source-body equation in ordinary monadic notation; named callees remain opaque.
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The actual declared argument environment, constructed from ordinary source parameters. This is proof-side parameter transport, not an additional runtime operation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ordinary arguments and the actual result observed in their real source heaps. This interface does not assert the existence of a total mathematical model.
Equations
- One or more equations did not get rendered due to their size.