Worklist facts that survive a stack-only native step #
Popping a pending entry changes memory only inside the reserved native stack and keeps the
persistent caller registers 71–95. The worklist facts shared by the catalogue and visitor
cursors therefore transfer to the popped state: the heap pointer and the floor below it, the
output-count register, the caller controls, memory outside the reserved interval, the prime
bitmap, and the readback and heap bounds of the pending entries. The lemma also records that the
reserved stack fits in the gap below the floor. Callers still derive the other invariant fields,
such as the output and its bounds, the heap budget and protected memory.
Both the native traversal and the fused decision visitor pop an entry before each transition, so they share this argument.
Main results #
Arena.stack_frame: memory outside[a.stack, a.stack + a.capacity)survives a stack-only step.Entry.Stored.of_arena_frame,StoredNodes.of_arena_frame: entry and emitted-node readbacks survive a stack-only step.Arena.preserved_of_stack_frame: the worklist facts preserved by a stack-only step.
These invariant proofs are original.
A step that modifies only the reserved native stack leaves memory outside
[a.stack, a.stack + a.capacity) unchanged.
An entry whose arrays avoid [a.stack, a.floor) retains its readback across a stack-only
memory modification.
Emitted pointer-table entries and packed node arrays above a.floor retain their readback
across a stack-only memory modification.
A step that changes memory only inside the reserved native stack and keeps the persistent
caller registers 71–95 preserves the worklist facts shared by the catalogue and visitor
cursors. For the entries es, the conclusions are, in order:
- the heap pointer and output count are unchanged;
- the caller controls still hold;
- memory below the stack and above its reserved interval is unchanged;
- the reserved stack fits inside the gap below the heap floor;
- each entry keeps its exact readback;
- each entry still lies below the fresh heap;
- the prime bitmap is still represented;
- the heap pointer stays above the floor.