The existing zero-workspace rewind and copy machines #
Machine declarations are moved from their original module without changing programs or resource formulas. Higher computability-calculus theorems remain in the original facade.
Machines without work tapes #
If a machine without work tapes has a run path from its start to a halted configuration, then
following it with Turing.MultiTapeTM.rewindInput computes the output of that configuration
tidily: the rewind returns the input head from its position p in p - 1 + 2 further steps.
A machine without work tapes that computes output in time t, followed by
Turing.MultiTapeTM.rewindInput, computes output tidily in time 2 * t + 2: in t steps the
input head moves at most t cells, so the rewind takes at most t + 2 steps.
Zero space #
The identity #
The identity as a tidy machine without work tapes: copy the input to the output, then move the input head back to the start.
Instances For
tidyCopy computes the identity tidily, in time linear in the length of the word.