Paid initialization and execution of the resident queue #
The proof uses the shared Backend's public packing and live-execution facts. In particular,
the maintained count words are already present in native source registers, rather than being
reinstalled by the external controller. Operation code and packing are the globally fixed family
from RegisterProgram; the initializer remains parameterized by literal base and capacity.
Main results #
initialized_rep: the six register writes establish the empty two-array representation.initialize_queue: arbitrary dirty bounded data admits paid constant-time initialization.execute_enqueue,execute_dequeue: the same native dispatcher implements both methods.execute,certificate: scaled native payment and the existing dynamic certificate.
References #
The queue and its algorithmic references are in Cslib.DataStructure.Queue.Spec.
The actual six writes establish the empty representation under precisely the original end-fit condition, with no assumption on initial registers or dirty memory.
Paid raw initialization establishes the existing FIFO meaning and preserves all memory.
The original small-width and capacity-zero cases are included; tag delivery later retains its
separate Fits w 1 requirement.
The fixed dispatcher executes enqueue from resident metadata, pays the zero test and two count copies, and includes the final call halt in its bound. The original two arrays are the complete memory footprint.
The negative native branch performs the source transfer/pop, commits both returned counts, and decodes its faithful option result. The bound includes the negative branch's two instructions and the call halt, without charging any hidden metadata installation.
One admissible call of the fixed native queue. The terminal rear potential is retained; the globally chosen exchange factor, control, metadata copies and halt are all charged. The external controller and tag/payload delivery remain the original dynamic-call boundary.
The fixed realized dispatcher implements the original bounded FIFO specification via
the existing dynamic certificate. Its representation retains resident count words; no
memory-only Backend implementation is asserted. The bounded resident frontier equals the physical
end, so its fit already follows from Rep; raw initialization keeps its explicit end-fit
premise.