Native van Emde Boas insertion descent #
Insertion updates local extrema in place and recurses at most once per level: either into the summary when the target cluster was empty (after installing the cluster's singleton extrema directly), or into the already-occupied target cluster. Repeated insertion of a local minimum terminates immediately.
Main definitions #
InsertEntry: the insertion-loop register invariant.insertNext: a mathematical description of one native insertion iteration.
Main results #
insertBody_exec: an actual insertion iteration takes at most 37 instructions.insertLoop_spec: insertion takes at most39 * (d + 1) + 2loop instructions, produces a valid memory representation oftree.insert key, and preserves all memory outside[base, base + span d).
References #
The constant and traversal registers at entry to an unfinished insertion.
Instances For
Mathematical description of one native insertion iteration.
Instances For
Constant registers are preserved by an insertion iteration.
Updating base + 1 and base + 2 in place on a valid occupied header agrees with
writeBounds at every memory cell.
An occupied node's displaced key max m key has valid cluster coordinates and lies in the
parent record interval whenever key < universeSize (d + 1).
One actual insertion iteration, including all branches and address calculations, executes within 37 instructions.
The insertion loop is correct for every depth and arbitrary surrounding memory.
It executes within 39 * (d + 1) + 2 instructions, establishes Rep (tree.insert key) base z.mem,
and leaves all memory outside [base, base + span d) unchanged.