Deterministic queries on stored registers and read-only input #
A query runs a deterministic machine on an input split between a stored prefix and the
physical input. The counting auxiliary pushdown automaton preserves its stack throughout
the query. exists_prefixQuery_of_inSpace gives a polynomial clock and a logarithmic
visited-cell bound starting with the prefix prepared. The answer is buffered on a rewound
work tape. Framing the register has its own linear clock and visited-cell bound. The
composed framing and query theorem certifies the clock and unique occurrence trace.
Two raw work words can be packed and framed as a live pair before the same query runs.
Run a deterministic tape query on selected work tapes of a counting auxiliary pushdown automaton. The last selected tape supplies a prepared prefix followed by the physical input.
The initial state of a prefix query reads from the prepared prefix.
A prefix query offers at most one transition occurrence at every configuration.
Every branch of the query halts within the doubled clock. Its unique complete trace retains the auxiliary stack and the unselected work tapes.
A workspace certificate for a query on registers and read-only input gives a reusable native query routine on the live register values. The selected machine clears its scratch tapes and returns both input heads to their entry positions, leaving only the buffered answer. The clock is polynomial in the physical input length and the visited work cells are logarithmic.
Read a word on work tape 1, writing its frame on blank work tape 0.
Tape 2 is blank scratch. The physical input head is stationary.
Framing uses linear time and work cells and preserves the source word and physical input cursor. Both word heads finish at their entry coordinates, which can be chosen independently.
Form the framed encoding of two raw words on work tapes 1 and 3. Tapes 0 and 2 are blank scratch. The joined word replaces the second word and its left endpoint moves left by the framed first word's length.
With the heads on the first cells of the two words and their blank scratch tapes, the packing machine preserves the first word and physical input cursor. Its time and visited work cells are linear in the length of the first word.
Frame a live register on the selected prefix tape and then run the query on that prefix.
The framing and query share the prefix tape, and the query's other selected tapes start blank.
The live register begins at origin with its head on the first cell. The two phases have a
single complete occurrence trace and leave the auxiliary stack unchanged.
Pack two live word registers, frame them on the query's prefix tape, and run the query.
Packing, framing and querying offer at most one transition occurrence at every step.
The tapes at the handoff to a packed query, before the query starts. The prefix begins at cell one, the joined word is retained, and the untouched tapes keep their contents.
The packed query starts on two raw words on tapes e 1 and e 3 at cell zero.
It uses e 0 as the prefix tape, e 2 as blank scratch, and leaves the existing stack intact.
The linear preparation cost adds to the query's occurrence clock.