Step machines simulating read machines #
A read machine reads its input at an address; a Turing.StepMachine sees the cell under its head
and moves it by one cell per step. Turing.ReadMachine.toStepMachine keeps the position of the head
in its state: before each step of the read machine that reads the address a, it moves the head to
the cell of a, at position a + 1, and then takes that step on the bit there. It stops at the
blank after the input if a is beyond it, which reads as false, as for the read machine.
Main definitions #
Turing.ReadMachine.toStepMachine: the simulating step machine.
Main results #
Turing.ReadMachine.computes_toStepMachine: if the read machine halts with an output, the step machine computes that output.
The step machine simulating m, with the position of its head in its state.
Instances For
The step of the read machine itself.
The walk of the head to the cell of the address read next, and the step there.
One step of the read machine is simulated by steps of the step machine; a halted read machine stays put, in zero steps.
The steps of the read machine are simulated by the step machine.
The configurations of the step machine on x that follow the read machine: the head at the
position in the state, and the state and the output of a configuration of the read machine.
Instances For
A step of the step machine keeps it following the read machine.
The states of the step machine: every state it reaches is a state of the read machine, with a position at most the length of the input plus one.