Pure semantics for the streaming circuit evaluator #
The machine controller parses and evaluates one gate before moving to the next.
The public codec first decodes the complete gate list and then evaluates it.
This file supplies a verdict-level streaming evaluator and proves that the two
orders produce the same result. A controller-ordered one-gate step additionally
exposes the ref0-before-ref1 dependency order needed by execution proofs while
retaining evalFamilyCode as their external specification; it is not a
transition-level trace model.
Parse and evaluate exactly count gates. The memo list begins with the
primary inputs and grows by one value per gate; last is the most recently
appended gate value. Successful termination also requires exact code
consumption.
Equations
Instances For
The semantic result of one controller-ordered gate evaluation.
The unconsumed circuit code after both references.
The wire memo after appending the new gate value.
- value : Bool
The newly computed gate value.
Instances For
Parse and evaluate one gate in the controller's reference dependency order: parse the first reference, read its wire, parse the second reference, and read its wire.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.CircuitCode.Machine.Internal.gateStep? code wires = none
Instances For
Decoding an operation bit and evaluating the resulting raw gate agrees with the controller's Boolean operation.
A positive gate-stream step is exactly one controller-ordered gate step followed by the remaining stream.
The streaming specification agrees with the library's public exact codec and memoized evaluator.
Pure semantics of the complete tagged-family stream consumed by the machine core.
Equations
- Complexity.CircuitCode.Machine.Internal.familyStream? [false, answer] input = if input.isEmpty = true then some answer else none
- Complexity.CircuitCode.Machine.Internal.familyStream? (true :: circuitCode) input = if input.isEmpty = true then none else Complexity.CircuitCode.Machine.Internal.positiveStream? circuitCode input
- Complexity.CircuitCode.Machine.Internal.familyStream? code input = if input.isEmpty = true then none else none
Instances For
The controller-shaped pure stream retains evalFamilyCode as its exact
external specification.