Native repeated evaluation of a virtual input #
A Boolean-state consumer scans the whole virtual word twice, retaining its state across reads and across the pass boundary. The length is unbounded. Each outer address is translated to an original-tail address and the runtime accessor selects its prefix/suffix bit before resuming the consumer. Only the runtime header, its offset, a binary scan counter and one Boolean are stored. The virtual word is a specification, never a workspace object. Constants are independent of runtime cut, suffix and address. The supplied header's address field is ignored by the consumer.
This original implementation supports the QUERY-GENERATOR/EVALUATOR recomputation in the proof of Lemma 3.3, expanded ECCC TR13-047, printed page 6 [GNR+13]. Definitions 3.1–3.2 concern general logspace transducers; this module handles only a two-pass Boolean-state evaluator. Generic native predicate substitution, preparing the supplied header from a generator, regenerating answers, the resource-certified suffix loop and adaptive-to-tt conversion remain unproved here.
The declared virtual length; for valid cuts this is the reconstructed word's length.
The declared width uses space linear in the encoded data, without allocating the word.
Runtime accessor state, binary consumer position, and saved Boolean evaluator state.
- runtime : Runtime.State
State of the underlying runtime accessor.
- pos : ℕ
Binary consumer scan position across the two virtual-word passes.
- acc : Bool
Saved Boolean state of the consumer across reads and across the pass boundary.
Runtime data recovered from the retained small header.
The outer read address, reset at each pass boundary.
A fixed consumer; its transition table is finite and independent of runtime parameters. The accessor's initialization read is retained, then every evaluation read resumes the saved Boolean state. A zero-width word halts immediately after initialization.
Reference evaluation, defined by successive reads rather than constructing the word.
The finite evaluator's result after two complete passes.
The initialized accessor is held fixed while the consumer runs.
Initialization has exactly the accessor's states, with a constant suspended consumer.
Exact first halt, including the empty virtual word.
For valid cuts the consumer transition reads exactly the reconstructed virtual word. The modulo counter scans each address once per pass when the word is nonempty.
Header decoding is native in the charged consumer state.
The virtual length is computed from binary cut and the stored suffix only.
The outer scan address is binary, even for unbounded virtual lengths.
All five consumer components have actual native linear-space realizations.
One actual native evaluator handles all runtime inputs with shared constants.
The native certificate measures workspace against the original length, uniformly over runtime parameters. Only size admissibility is assumed, never a final transfer certificate.
The semantic specification is an ordinary finite-state fold of the actual virtual reads. This list describes output semantics only; the native machine stores just one Boolean.
Conventional semantics: the native result is the finite-state fold of two copies of the virtual word. These copies occur only in the specification, never in the machine's state.