Pure-to-machine gate-attempt bridge #
This file packages the exact canonical gate execution theorem behind the
controller-ordered gateStep? interface. The pure result intentionally omits
the first reference, so the machine runtime is existential but carries a
uniform linear bound in the current wire-memo length.
Every successful pure gate step has a matching machine execution. The
machine consumes one counter mark, appends exactly step.value, exposes
step.rest, and finishes within 4 * wireBits.length + 9 steps.
With every counter mark consumed, a nonempty stream that has produced a gate and consumed all code halts successfully in one step.
An exhausted counter with no previously evaluated gate rejects in one step, even when the code stream is empty.
After at least one gate, exhausting the declared counter while serialized code remains rejects the trailing data in one step.