A stored prefix before the read-only input #
A machine can read a prepared work word followed by the real input. It uses one additional work tape for the prefix and never copies the suffix. A simulated step acts on the original work tapes, then a routing step handles crossing the join. The route reads a blank after moving towards the join, so it distinguishes that blank from the boundary at the opposite end.
A simulated instruction is followed by a routing step, including at the first halt.
- run {Q : Type} (region : Region) (q : Q) : Control Q
Run an instruction using the active input head.
- route {Q : Type} (region : Region) (checkJoin : Bool) (next : Option Q) : Control Q
Check for a crossing after the movement and enter the next state.
Instances For
Simulate a machine on a prepared nonempty prefix and the physical input. The extra tape holds the prefix, blank on each side, with its head at the first symbol at entry. The physical input head starts on its left blank.
The simulator enters the stored-prefix phase.
A stable simulator configuration stores the prefix on its last work tape. The physical input head is parked at the left blank while the virtual head reads the prefix. For an empty prefix, a virtual head at position one enters directly in the physical-input phase.
A nonempty prepared prefix occupies cells starting at one. All other word heads start at zero, and the physical input head starts on the left blank.
Every live instruction on the concatenated input executes in two native steps. The second step completes any boundary crossing, even if the instruction halts.
At even times, the simulator agrees with the corresponding source configuration. Both runs remain stationary after their first halt.
Routing doubles the first halting time, with no early halts at odd times.
At the intermediate time, the original work heads have already moved to their next source positions. This accounts for the original workspace at both native phases.
The added work head stays within the prefix and its two blanks, including during routing.
Through (2t) simulator steps the original work tapes use the source workspace through (t) steps. The extra tape visits at most the length of the prefix plus its two blanks.