Checked pointer-chasing fusion-tree descent #
Each iteration reads a tag, compares a leaf or runs an actual node query, and either stops or loads a child pointer. The proof descends through the represented tree; every followed child has smaller height. No execution or correctness assumption is hidden in the invariant.
Main results #
QueryProgram.exec_loop: inclusive predecessor in at most201022 * (height + 1) + 2instructions, with all RAM memory and query preserved.
References #
A stopped traversal returns a conventional option and preserves the original RAM/query.
Instances For
The loop condition holds at entry.
The loop condition fails after completion.
Complete loop execution from real preprocessed RAM. Every iteration costs at most
201020 instructions and there are at most height + 1 iterations; loop tests and jumps
are charged too. The pointer may change, while all memory and the query are preserved.
The traversal bound uses the actual tree height, including the final leaf visit.