Fixed Word-RAM point updates for aggregation trees #
The program walks from the root to the updated leaf. Every visited node is incremented, and the next subtree is selected by the position relative to half the current length. The same code handles every height, position and increment. Its arithmetic and all its loads, stores, tests and jumps are actual bounded-word instructions.
Main definitions #
updateLoop: the fixed update loop.Entry: the register calling convention.
Main results #
updateLoop_spec: logarithmic instruction bound, restored tree representation and a frame theorem for every memory word outside the tree.
References #
Constant zero.
Instances For
Constant one.
Instances For
Constant two.
Instances For
Current subtree pointer.
Instances For
Current subtree length.
Instances For
Position relative to the current subtree.
Instances For
Increment supplied to an update.
Instances For
Loaded value and arithmetic scratch.
Instances For
Address scratch.
Instances For
Query answer.
Instances For
Operation tag, zero for update and nonzero for query.
Instances For
Persistent root pointer.
Instances For
Persistent array capacity.
Instances For
External operation position.
Instances For
Registers used by both tree traversals.
Instances For
Increment one node and move to the selected child. A leaf has half-length zero; the resulting length stops the loop before another access.
Instances For
Fixed update code, independent of array size, position and increment.
Instances For
The data after one update iteration; this is a mathematical description, not an additional instruction in the machine.
Instances For
The fixed update loop runs in at most 11 (h + 1) + 2 instructions. It restores the
complete aggregation invariant and preserves every word outside the original footprint.
The bound assumes the existing tree is supplied in memory; it does not include construction.