The universal machine, reading its input in place #
The universal function (Turing.MultiTapeTM.Universal.universal) is computed by a multi-pass fold
over its input, one pass per step of the simulation. The state of the fold holds the description,
the configuration and the number of steps left, but never the input x of the simulated machine:
a pass reads the symbol under the simulated input head by counting down the symbols of x on the
input tape. A finite-state translator (Turing.MultiTapeTM.Universal.inTr) turns the encoded
input into events, one per unary digit and one per end of a symbol of x, so that the fold is
a plain function on events.
Main definitions #
Turing.MultiTapeTM.Universal.inTr: the events of the encoded input.Turing.MultiTapeTM.Universal.scan: the countdown to the symbol under the input head.Turing.MultiTapeTM.Universal.stateSpace: a bound on the states of the fold.
Main results #
Turing.MultiTapeTM.Universal.events_eIn: the events of the encoded input.Turing.MultiTapeTM.Universal.inputSymbol_scan: the countdown finds the symbol under the input head.Turing.MultiTapeTM.Universal.computableTidilyInTimeAndSpace_universal_inPlace: the universal function is tidily computable in space linear instateSpace.Turing.MultiTapeTM.Universal.stateSpace_desc: on descriptions of machines,stateSpaceis linear in the description times the space of the machine, plus logarithms of the length of the input and of the number of steps, plus the largest symbol of the input.
A function computed by a transducer is computed in the space of its output.
The events of the input #
The states of the translator: in the framed description, at a marker or a bit; in the framed
input x, at a marker or a bit of the outer frame, before an inner marker or digit; after the
input, in the number of steps.
- descMarker : InState
- descBit : InState
- marker : InState
- bit : InState
- digitMarker : InState
- digit : InState
- steps : InState
Instances For
The translator of the encoded input into events: true for each unary digit of a symbol of
x and false at the end of each symbol.
Instances For
The events of a symbol: its unary digits, then the end.
Instances For
The countdown #
The fold #
The state of the fold: the description and the configuration, then the number of steps left, the countdown and the symbol read so far.
Instances For
The symbol under the input head, at the end of a pass.
Instances For
The end of a pass: the step, and the countdown reset to the new input head.
Instances For
The emitted symbol, as its part of the encoded output.
Instances For
Whether another pass follows.
Instances For
Whether the simulated machine has halted.
Instances For
The encoded output: the symbols emitted by the passes, then whether the machine has halted.
The parts of the fold, within bounds in the length of the state #
Whether the simulated machine has halted.
The initial state, without the input #
The states of the extracting transducer: in the framed description, at a marker or a bit; in the framed input, at a marker or a bit; in the number of steps.
Instances For
The initial state, in the space of the description and the number of steps.
The size of the state #
A bound on the configurations of the simulation within t steps, from
Turing.MultiTapeTM.Universal.length_eCfg_le_space.
Instances For
The universal machine #
The universal machine, reading its input in place. The universal function is tidily
computable in space linear in a bound on the states of the simulation (stateSpace): the
description, a configuration, the number of steps and the position of the input head in binary,
and the largest symbol of the input. It never copies the input. Each step reads the whole
input.
The bound on the states, in the description, the cells visited by the simulation, the lengths of the input and the number of steps in binary, and the largest symbol of the input.
The space of the universal machine on the description of a machine: linear in the description times the space of the machine, plus the logarithms of the length of the input and of the number of steps, plus the largest symbol of the input.