Step machines, on words #
A machine that carries the state of a step machine on tape V, behind two cells that record the
symbol under the input head. Each round records that symbol with peekInput, emits with E and
computes the next state with Nm (frozenRound), writes the move of the input head to tape M
with Mm and moves the input head there, and writes to tape C with Cm whether another round
follows. The input head stays where the step machine has it between the rounds.
Main definitions #
Turing.MultiTapeTM.stepRound: one round.Turing.MultiTapeTM.stepTM: the rounds, between the initial state and the final clean-up.
Main results #
Turing.MultiTapeTM.transformsTapesAt_stepRound: the specification of a round.Turing.MultiTapeTM.computesTidily_stepTM: the rounds compute tidily.
The two cells in front of the state on tape V, before the symbol under the input head is
recorded in them.
Instances For
One round: clear the flag tape C, record the symbol under the input head on tape V, emit
with E and compute the next state with Nm, write the move to tape M with Mm, move the input
head, clear tape M and write the flag with Cm.
Instances For
The time of a round, in the lengths of the old flag lc, of the word lu that the parts
read, of the new state lv and of the move lm, and the times of the parts.
Instances For
The space of a round, as stepRoundTime, on K tapes.
Instances For
A round. If, from the state w behind the symbol a under the input head, E emits e
and Nm computes the next state w', and from w' Mm writes the move m and Cm the flag
c', then a round takes the state w and any flag to w' and the flag c', emitting e, and
moves the input head by m.
The step machine on words: write the initial state with I and the flag with Cm, run rounds
while the flag is not blank, then clear tape V and rewind the input.
Instances For
The step machine on words. If I writes the initial state ws 0 and, for every round
n, from the state ws n behind the symbol under the input head at ps n, E emits es n and
Nm computes the next state, from which Mm writes the move ms n that takes the input head to
ps (n + 1), and Cm writes from every state ws n a flag cs n that is blank exactly after the
last round rounds, then stepTM emits the words es n, tidily.