Actual fusion-tree traversal instructions #
The traversal uses eight caller registers, disjoint from both node routines. A width-indexed choice of node code is made at compilation. The stored tree, its keys and its query remain runtime inputs. Leaves return an option as a presence flag and a full-key value.
Main definitions #
QueryProgram.code: initialization followed by pointer-chasing descent.QueryProgram.answer: the conventional two-register option encoding.
Main results #
QueryProgram.exec_leaf: literal leaf loads and inclusive full-key comparison.QueryProgram.exec_follow: the actual stride-two child-pointer load.
References #
Both node subroutines use the same fixed register file.
Instances For
Query key, preserved throughout traversal.
Instances For
Current record pointer.
Instances For
Inclusive rank returned by either node routine.
Instances For
Loop flag.
Instances For
Answer presence flag.
Instances For
Answer full key, zero on absence.
Instances For
Constant one.
Instances For
Constant zero.
Instances For
Address scratch.
Instances For
Record tag, then leaf key.
Instances For
Leaf presence or child-table offset.
Instances For
Conventional presence/value representation, including key zero.
Instances For
Constant-register installation is part of the charged query.
Instances For
Inspect a literal leaf record; comparison is inclusive at equality.
Instances For
Positive rank r selects pointer entry p + 19 + 2(r-1).
Instances For
Code selection depends only on the physical word width.
Instances For
Zero rank terminates with absence; positive rank follows an actual stored pointer.
Instances For
One traversal iteration first loads the current record tag.
Instances For
Descent terminates at a leaf or a zero child rank.
Instances For
Actual width-indexed query code, with initialization included.
Instances For
Flat query program; it halts with the value register, with presence retained in found.
Instances For
Persistent registers before visiting a record. No scratch-register assumptions occur.
Instances For
Initialization data, with arbitrary preexisting workspace and memory.
Instances For
Five charged constant instructions establish all traversal constants.
Exact literal leaf execution data.
Instances For
Charged presence/key loads and comparisons need at most twelve instructions.
Leaf execution stops, preserves memory and query, and returns a canonical option.
Literal register updates and load for the selected child pointer.
Instances For
Six real instructions compute and load the interleaved pointer.
Following a child preserves the invariant, changing only the current record address.
Child-pointer traversal has no memory writes.