Streaming serialized-circuit evaluator core #
This file defines the finite controller that evaluates an already-staged tagged circuit code. The code tape is parsed once from left to right. The wire tape begins with the primary input and receives one appended Boolean value per gate. Unary references walk that memo tape directly, while the third work tape stores and consumes the declared unary gate count.
The local TapeAction layer packages the one-sided-tape safety obligation with
each head action. Consequently evalFamilyCoreTM satisfies
TM.δ_right_of_start structurally rather than through a large case proof.
Preserve the scanned cell and keep an off-marker head stationary.
Equations
- Complexity.CircuitCode.Machine.TapeAction.preserve head = { write := Complexity.TM.readBackWrite head, dir := Complexity.TM.idleDir head, rightOfStart := ⋯ }
Instances For
Preserve the scanned cell and move right.
Equations
- Complexity.CircuitCode.Machine.TapeAction.moveRight head = { write := Complexity.TM.readBackWrite head, dir := Complexity.Dir3.right, rightOfStart := ⋯ }
Instances For
Preserve the scanned cell and move left, bouncing right at ▷.
Equations
- Complexity.CircuitCode.Machine.TapeAction.moveLeft head = { write := Complexity.TM.readBackWrite head, dir := Complexity.TM.moveLeftDir head, rightOfStart := ⋯ }
Instances For
Write a symbol and move right.
Equations
- Complexity.CircuitCode.Machine.TapeAction.writeRight head symbol = { write := symbol, dir := Complexity.Dir3.right, rightOfStart := ⋯ }
Instances For
Write a symbol and keep an off-marker head stationary.
Equations
- Complexity.CircuitCode.Machine.TapeAction.writeStay head symbol = { write := symbol, dir := Complexity.TM.idleDir head, rightOfStart := ⋯ }
Instances For
Finite phases of the fused tagged-code parser and memoized evaluator.
- rewindCode : CorePhase
- rewindWires : CorePhase
- familyTag : CorePhase
- emptyAnswer : CorePhase
- emptyEnd (answer : Bool) : CorePhase
- count : CorePhase
- rewindCounter : CorePhase
- gateCheck (sawGate : Bool) : CorePhase
- gateOp : CorePhase
- gateNeg0 (op : Bool) : CorePhase
- gateNeg1 (op negated0 : Bool) : CorePhase
- rewindRef0 (op negated0 negated1 : Bool) : CorePhase
- ref0 (op negated0 negated1 : Bool) : CorePhase
- rewindRef1 (op negated1 value0 : Bool) : CorePhase
- ref1 (op negated1 value0 : Bool) : CorePhase
- seekAppend (value : Bool) : CorePhase
- done : CorePhase
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Named actions for the three evaluator work tapes and the output tape.
- next : CorePhase
Controller phase entered after this action.
- code : TapeAction (wHeads codeIdx)
Action for the serialized-code tape.
- wires : TapeAction (wHeads wiresIdx)
Action for the input-and-memo wire tape.
- counter : TapeAction (wHeads counterIdx)
Action for the unary gate-counter tape.
- output : TapeAction oHead
Action for the Boolean verdict output tape.
Instances For
Change only the controller phase and install TapeAction.preserve on
every tape. This is exact tape preservation when the framed heads are off the
left marker.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Project the writable symbol for a named work tape.
Equations
Instances For
Project the direction for a named work tape.
Equations
Instances For
Every projected work action moves right when its head reads ▷.
Halt with an explicit rejecting write, installing TapeAction.preserve on
the work tapes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Halt with the supplied Boolean write, installing TapeAction.preserve on
the work tapes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Move the code head right and install TapeAction.preserve on every other
tape.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Move the wire head right and install TapeAction.preserve on every other
tape.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Read one Boolean code symbol, moving right on success and rejecting any non-Boolean symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One finite-control action of the streaming evaluator.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Streaming evaluator for a valid outer pair after validPairStageTM.
The core itself remains total: malformed tagged codes and invalid references write zero and halt.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Uniform quadratic time budget for evaluating a staged tagged-family code. The arguments are the serialized code length and primary-input length.
Equations
Instances For
Staged tapes expected by the serialized-family evaluator core. The input tape is threaded as an explicit frame while the code and primary-input work tapes are parked at their append frontiers and the counter tape is fresh.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Halted defaulted-verdict contract for the serialized-family evaluator core. Malformed codes and successful false evaluations both write zero. The terminal work tapes are intentionally unconstrained because rejecting parses halt at different code, memo, and counter cursor positions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Total serialized-family evaluator: validate and stage the outer pair, then run the streaming core only on the valid branch.
Equations
Instances For
Concrete end-to-end time budget for validating, staging, and evaluating a
serialized circuit-family input of length n.
Equations
Instances For
Halted end-to-end contract for the serialized-family evaluator. The input cells retain the original encoding and the output carries the defaulted paired evaluation verdict with its canonical head and left-marker invariant. Terminal work tapes are intentionally unconstrained across valid and rejecting branches.
Equations
- One or more equations did not get rendered due to their size.