Amortized bounds for consecutive actual RAM splay calls #
The history records equations of the existing unbounded function runner. Each next invocation uses the previous result's entire actual memory and I/O state, including private stack contents, and the returned mathematical root. It is not a second interpreter or a sum of independently reset executions.
The sequence theorem constructs this history from shared typed execution outcomes. Its instruction bounds are conclusions of those actual calls, not an assumed price for mathematical rotations. Telescoping retains the initial and final logarithmic potentials. The fixed stack capacity is a conservative bound uniform over all trees with the initial node count. This is a sufficient launch condition, not a separate theorem about exact peak or reachable live storage.
The invocation boundary is the existing preloaded function trampoline. Every call includes its call/return and halt instructions. Host scheduling, supplying query words and initial data loading remain outside that boundary; no memory copy or hidden heap reset is performed by the state projection.
A sufficient address envelope for every access to a tree of this size. The nesting allowance follows two-level recursive descent, independently of the instruction bound. It is not a bit-space or exact live-storage bound.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Witnesses of actual calls, with source meaning and target state linked at
every index. The functions beyond count carry no execution requirement.
This is a record of existing runner equations, not an execution semantics.
Mathematical trees represented by the actual heap states.
Source heaps at the successive call boundaries.
- entries : ℕ → Ram.Source.State w
Actual data used to launch each existing function trampoline.
Actual halted RAM states returned by the runner.
Actual complete invocation counts returned by that same runner.
- represented (i : ℕ) : i ≤ count → BufferTree.Rep key keys left right (self.heaps i) (self.trees i)
- memory (i : ℕ) : i ≤ count → Ram.LanguageCompiler.HeapRep placement heapLimit (self.heaps i) (self.entries i)
- trace (i : ℕ) : i < count → SplayTrace (searchFocus key (queries i) (self.trees i)) (self.trees i) (self.trees (i + 1)) (searchDepth key (queries i) (self.trees i))
- frame (i : ℕ) : i < count → Heap.PreservesOutside (BufferTree.linkCells left right (self.trees i)) (self.heaps i) (self.heaps (i + 1))
- run (i : ℕ) : i < count → Ram.LocalCompiler.Function.runUntil (Ram.LanguageCompiler.programControl Implementation.program) (Ram.LanguageCompiler.lowerProgram Implementation.program) (↑Implementation.splayId) (Ram.LanguageCompiler.contextSize Implementation.signatures[↑Implementation.splayId].params) heapLimit (Ram.LanguageCompiler.envWords placement (Implementation.splay_args keys left right (BufferTree.root (self.trees i)) (queries i))) (self.entries i) = some { state := self.targets i, steps := self.steps i, reason := Ram.StopReason.halted }
- returned (i : ℕ) : i < count → Ram.LocalCompiler.Function.returnedValues 1 (self.targets i) = Ram.LanguageCompiler.valueWords placement (BufferTree.root (self.trees (i + 1)))
- instruction_bound (i : ℕ) : i < count → self.steps i ≤ splayInstructionFactor * (searchDepth key (queries i) (self.trees i) + 1)
Instances For
Consecutive actual runner invocations admit the logarithmic amortized
bound. Only initial representation and explicit word/code/stack capacities are
assumed; every per-access instruction bound is proved by splay_execute.
The initial potential is charged and final potential retained, including for
empty trees and zero accesses.
A shape-uniform total instruction bound for the constructed actual RAM
history. The initial tree contributes its n log₂ (n + 1) credit; final credit
is nonnegative and discarded. No per-call cost assumption is an input.