Structured RAM decoded-gate evaluator — definitions #
This kernel evaluates one already-decoded fan-in-two gate against a mutable wire memo. It uses indirect reads for both references and an indirect write to append the result. Boolean negation, AND, and OR are implemented arithmetically, so the instruction count is independent of the gate and wire values.
Encoded gate-operation bit: zero for AND and one for OR.
Equations
Instances For
Negation bit for the first gate input.
Equations
Instances For
Negation bit for the second gate input.
Equations
Instances For
First gate-input index, then its physical memo address.
Equations
Instances For
Second gate-input index, then the append address.
Equations
Instances For
Number of wire values already present in the memo.
Equations
Instances For
Loaded and optionally negated first input value.
Equations
Instances For
Loaded and optionally negated second input value.
Equations
Instances For
Final gate value.
Equations
Instances For
Arithmetic scratch register.
Equations
Instances For
Physical base address of the wire memo.
Equations
Instances For
First register occupied by memoized wire bits.
Equations
Instances For
Register representation of a decoded gate and its incoming wire memo.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Branch-free arithmetic implementation of Boolean XOR.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert the two absolute wire indices to physical memo addresses.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Indirectly read the gate's two inputs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Branch-free AND/OR selection. Both candidate values are formed and the operation bit arithmetically selects the result.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute the next memo address and append the result indirectly.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Evaluate one gate and append its Boolean result to the wire memo.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Straight-line decoded-gate evaluator, grouped at semantic proof boundaries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic calling convention for evaluating a decoded gate in an existing store. The memo may begin at any address above the evaluator's control prefix.
The memo is disjoint from the evaluator's control registers.
The operation register contains the canonical gate-operation bit.
The first negation register contains its canonical bit.
The second negation register contains its canonical bit.
The first address register contains the first absolute wire reference.
The second address register contains the second absolute wire reference.
The wire-count register contains the current memo length.
The base register points to the physical memo.
- wire_eq (index : ℕ) : index < wires.length → store (base + index) = match wires[index]? with | some bit => Input.bitValue bit | none => 0
Physical memo cells contain the semantic wire bits.
Instances For
Concrete compiled RAM kernel.
Equations
Instances For
The branch-free kernel always takes twenty source and compiled steps.
Equations
Instances For
Uniform logarithmic-cost budget for one gate.
Equations
- Complexity.RAM.Structured.GateEval.timeBound wireCount = 80 * (Complexity.RAM.bitlen (wireCount + Complexity.RAM.Structured.GateEval.wireBase + 1) + 1)
Instances For
Peak-space budget including the appended wire.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Shifted logarithmic comparison function for one-gate time.
Equations
- Complexity.RAM.Structured.GateEval.logarithmicBound wireCount = Complexity.RAM.bitlen (wireCount + Complexity.RAM.Structured.GateEval.wireBase + 1) + 1
Instances For
Shifted quasilinear comparison function for the explicit memo space.
Equations
- One or more equations did not get rendered due to their size.