Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.BlockComputation.Encoding.NativeEncode

Native serialization of runtime-width block results #

The finite machine and its control numbering are fixed; block width, residues and all window cells are runtime data. The serializer uses exactly the semantic codec's FAIL bit, control rank, input-first head ordering, track bits and row-major two-bit cells. Raw ternary symbol codes are decoded before serialization: written one is [true,true], not the binary code 2.

Both FAIL and successful results retain explicit window buffers at the input boundary. Every tape must contain exactly three blocks before serialization is accepted. Thus even the zero-filled FAIL word is paid by actual stored windows, with binary width metadata paying for head padding when there are no work tapes. Allocating these buffers remains a caller operation.

@[reducible, inline]

Runtime block width, success tag and explicit returned local data. FAIL also retains its buffers, so its fixed-width serialized output has an actual encoded space charge.

Binary width and head residues, finite control tags and explicit framed cell lists.

Exactly three blocks on every tape. A rejected call returns the empty word.

Fixed-width little-endian binary word. It reads bits directly without allocating a power.

Raw ternary cells pass through the same semantic cell decoder as replay results.

Serialize one explicit local window. The list is streamed, without an index list.

The payload in the semantic codec's field order. In particular, finSuccEquiv k places none (the input head) first, followed by work heads.

Serialize a success or FAIL using the existing fixed layout. FAIL blanks every payload bit by streaming the charged payload, rather than allocating an uncharged width-sized word.

Both tag branches have a native linear-space certificate. The FAIL branch streams the retained payload; it cannot create a width-sized word from binary width metadata alone.

Raw-word output composes directly with the native parser's encBits input.

Direct bit access uses the semantic codec's little-endian convention.

Canonical window buffers serialize exactly as the existing positive-width codec. Head residues may be arbitrary naturals: runtime modular reduction agrees with RawResult.toView.

Successful serialization preserves the outer tag and every field of the semantic codec.

FAIL is encoded at the same paid width; its buffers remain part of the caller's input.