Total decoding, description size, and the Milestone C test battery #
Turing.decodeCode interprets every bit string as a machine: malformed descriptions
(and non-canonical ones — anything decodeCodeExact rejects) decode to the default
reject machine Code.defaultRejectCode i, giving the paper's total notation [α]_i.
Turing.codeSize is the description length |α|; codeSize_le bounds it explicitly in
the header data — the arithmetic later consumed by λ-boundedness bookkeeping.
The examples at the end are the Milestone C acceptance battery
(planning/tm-infrastructure.md, WP9), all kernel-evaluated by decide: encode/decode
round trips for the Milestone B machines, and one malformed description per failure mode
— zero states, alphabet of size one, wrong table length, out-of-range successor state,
out-of-range work symbol, trailing garbage, and the empty string — each pinned to
decodeCodeExact = none and decodeCode = defaultRejectCode.
Total decoding #
Total decoding: the machine described by an arbitrary bit string — the paper's
[α]_i. Strings rejected by decodeCodeExact denote the default reject machine.
Equations
Instances For
Description size #
The description size |α| of a machine code.
Equations
Instances For
Explicit size bound: header plus table-count times the per-entry bound. This is the
|α| arithmetic that λ-boundedness bookkeeping consumes.
Round trips (Milestone B machines) #
The malformed battery #
One raw description per failure mode; each must be rejected by decodeCodeExact and
decode totally to the default reject machine.
A syntactically plausible one-input entry.
Equations
Instances For
Zero states (the empty table has the canonical size 0 · 3¹, so this parses and is
rejected by the checker alone).
Equations
Instances For
Alphabet of size one (table of the canonical size 1 · 2¹).
Equations
- Turing.badAlphabet = { workTapeCount := 0, alphabetSize := 1, stateCount := 1, startState := 0, table := #[Turing.dummyEntry, Turing.dummyEntry] }
Instances For
Wrong table length: the header demands 1 · 3¹ = 3 entries, only two are present,
so parsing itself fails.
Equations
- Turing.badTableLength = { workTapeCount := 0, alphabetSize := 2, stateCount := 1, startState := 0, table := #[Turing.dummyEntry, Turing.dummyEntry] }
Instances For
Out-of-range successor state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Out-of-range work symbol (one work tape, so 1 · 3² = 9 entries).
Equations
- One or more equations did not get rendered due to their size.