Documentation

Examples.Language.Splay.Depth

Call depth of the declared splay program #

The recursive call descends to a grandchild. A rotation does not call any function, and rotations after the recursive return reuse its released frame. Consequently the body's sufficient nesting is half the input tree's height, independently of instruction count. These conditional resource proofs reuse successful realized executions; they do not repeat source total correctness, heap framing or the machine simulation.

The outer invocation needs one additional frame. The resulting address envelope is a stack-capacity bound, not a count of reachable live heap cells.

Internal nesting of the actual splay body. The external trampoline's frame is accounted for by the shared function invocation interface.

Equations
Instances For

    Every successful realization of the declared body can use at most one nested frame per two tree levels. Representation is used only to identify the actual read values and recursive grandchild, not to re-prove correctness. Sequential helper calls combine by maximum, rather than accumulating frames.

    The node count gives a shape-independent nesting bound for consecutive accesses, even when rotations change the height between invocations.