Expand description
Independent range-safety checker for analog netlist claims — the trust core of the analog
lane’s RangeCertificate, in the same spirit as this crate’s PR/RUP checker: a small,
dependency-free replay the certificate producer cannot influence.
The compiler (one crate over) claims per-node voltage bounds for a mapped analog dataflow.
This module re-derives those bounds from the declared input boxes by DIRECTED-OUTWARD-ROUNDED
f64 interval arithmetic — after every interval operation each endpoint is bumped one ULP
outward (next_down/next_up), so the replayed interval SOUNDLY contains every exactly-
computed value regardless of intermediate rounding — and checks, fail-closed:
- Honesty — the replayed interval of every node is contained in the node’s CLAIMED interval (a claim tighter than reality is rejected);
- No clipping — every claimed interval lies within the usable rail half-span;
- No starvation — every node’s claimed full scale clears the noise floor by the demanded dynamic-range ratio (a signal whose whole range drowns in noise is a gain-scheduling bug, not a small signal).
Any NaN or infinity anywhere — inputs, weights, claims, replay — rejects the certificate.
No solver, no bignum, no imports beyond std. Trust this file, not the producer.
Structs§
- Range
Claim - The claim under judgment: declared math-domain input boxes, per-net power-of-two scales, claimed VOLT-domain per-node bounds, and the physical envelope they must respect.
Enums§
- RCell
- The neutral cell vocabulary the checker replays. Mirrors (but does not import) the analog lane’s tile set; the producer converts its netlist into this form to be judged.
- RSrc
- An operand of a replayed cell: a plane input, a prior cell’s net, or a programmed constant.
Functions§
- check_
integrator_ claim - Replay a MULTI-STATE INTEGRATOR claim: the cells run once per frame over the held state
vector (starting inside the
initboxes);outs[s]gives states’s next value. The claim’s input boxes must contain every frame’s state vector (the trajectory hull), and the per-node claims must contain the per-frame hulls, inside the rails / above the noise floor. - check_
range_ claim - Replay the claim and judge it.
trueiff every check passes; ANY malformation (arity mismatch, dangling reference, non-finite number, inverted interval) isfalse— fail-closed. - check_
reduction_ claim - Replay a STREAMED-REDUCTION claim: the same cells run once per frame with input 0 the
element box and input 1 the carried accumulator (starting at
init); the claim’s per-node bounds must contain the HULL of every frame’s replayed bounds, the claim’s input-1 box must contain the whole accumulator trajectory, and every claimed bound must respect the rails and the noise floor. Fail-closed on any malformation, divergence, or a frame count of zero.