Native van Emde Boas strict-successor certification #
This module certifies the native strict-successor operation (successorDescent followed by
successorUnwind) in CslibFrontier.DataStructure.VanEmdeBoas.WordRAM.Program.
During descent, each recursive cluster or summary call pushes a four-word continuation frame
(kind, payload, q, t) into the scratch stack [stackBase₀, stackBase₀ + 4 * d).
Because Tree.successor checks the cached maximum before recursing, every recursive descent is
guaranteed to find a key (found = 1), and successorUnwind pops the pushed frames to
reconstruct the universe key in out while restoring sp = stackBase₀.
Main definitions #
SuccessorEntry: register invariant at entry tosuccessorDescent.UnwindState: register and memory invariant duringsuccessorUnwind.
Main results #
successor_loop_spec:successorDescent; successorUnwindexecutes in at most65 * (d + 1) + 4instructions, computestree.successor query, restoressp = stackBase₀, preservesRep tree base z.mem, and leaves all memory outside[stackBase₀, stackBase₀ + 4 * d)unchanged.
References #
The constant, stack, and traversal registers at entry to successorDescent.
Register and memory invariant at the start of an unwind stage at stack pointer sp₀.
Complete certification of successorDescent; successorUnwind from sp = stackBase₀:
executes in at most 65 * (d + 1) + 4 instructions, computes tree.successor query,
restores sp = stackBase₀, preserves Rep tree base z.mem, and frames memory outside
[stackBase₀, stackBase₀ + 4 * d).