Marked tape computations over finite input and output alphabets #
The binary simulator parses explicit finite-alphabet codewords before writing source cells. It rejects malformed codes before starting the source. Source execution reuses symbol tracks, and output emission writes complete codewords. Input and output alphabets and their chosen numberings are independent.
A finite tape machine with marked input symbols and a separate output alphabet.
- Alphabet : Type
Source tape alphabet.
- State : Type
Source control states.
Source alphabet finiteness.
Default source symbol is blank.
Source control finiteness.
Default control is initial.
Encode an input letter, distinguishing the first cell.
- empty : self.Alphabet
The single cell representing empty input.
Decode an output letter, stopping on a symbol with no output letter.
Blank terminates output.
- code : Turing.TM0.Machine self.Alphabet self.State
Source transition function.
Instances For
Reuse the existing source simulator; its binary endpoints are never entered.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source cells for a complete input or an unmarked suffix.
Equations
Instances For
A bounded source run specifying every decoded output cell.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parse a symbol code, rewind, run the existing simulator, or finish a codeword.
- copy
{inputSize outputSize : ℕ}
{Q : Type}
: Bool → Option (Fin (inputSize + 1)) → Phase inputSize outputSize Q
nonewaits for an opening delimiter;some icounts unary index bits. - rewind
{inputSize outputSize : ℕ}
{Q : Type}
: Bool → Phase inputSize outputSize Q
Moving backwards alternates between closing and opening delimiters.
- source
{inputSize outputSize : ℕ}
{Q : Type}
: Control Q → Phase inputSize outputSize Q
Existing source execution control; emission is replaced by encoded output.
- emit
{inputSize outputSize : ℕ}
{Q : Type}
: Fin (outputSize + 1) → Phase inputSize outputSize Q
Emit the remaining unary index bits and then the closing delimiter.
Instances For
An action preserving every work tape and head.
Equations
Instances For
Parse finite-alphabet inputs, simulate the source, and encode its complete output.
Equations
- One or more equations did not get rendered due to their size.