Documentation

CslibFrontier.DataStructure.AVLTree.PointerMachine

Logarithmic pointer-machine search in AVL trees #

search_correct applies the concrete linked-tree search program to the existing AVL representation and height theorem. Its bound counts pointer-machine instructions, including comparisons, null tests, jumps and halt. The initial linked representation is supplied; this theorem does not construct it or implement AVL insertion and rebalancing.

A represented valid AVL tree admits a concrete pointer-machine search in at most 12 * log₂(card + 1) + 3 instructions. Nonnull output is exactly key membership; SearchResult additionally gives the matching record and the complete register/heap frame.