nx_editstack_gate.nx
buildroot/runtime/nx_editstack_gate.nx
about
nx_editstack_gate.nx -- the gate for nx_editstack_lib (/compare/dcc DC1 and DC2).
THE CLAIM UNDER TEST is the one no float DCC can make: replaying the operation log from the base
reproduces the state BIT-IDENTICALLY, and re-evaluating a parameter at depth equals building the whole
log again from scratch with that parameter. Both are asserted on a DIGEST OF THE STATE, never on a
return code, because a leaking or no-op implementation answers identical return codes.
ANTI-VACUITY IS EXPLICIT, in three places, because "replay equals live" is trivially true for a stack
that does nothing at all:
- the digest is proven to DISCRIMINATE (three different states must give three different digests);
a constant digest function would otherwise pass every other tooth on this gate.
- undo is proven to reach an EARLIER state, so replay cannot be a no-op: it must genuinely reset to
the base and re-apply a PREFIX of the log.
- re-evaluation is proven equal to an INDEPENDENTLY BUILT stack, not merely different from before.
Every refusal cell is a gv_bite: it must fire on the bad input AND stay silent on the good one.
100% sovereign. No hardware writes (Rule 26). license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_editstack_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 20 | const EG_NCELL: i64 = 6 |
| 21 | const EG_CAP: i64 = 8 |
| 22 | const EG_SMALLCAP: i64 = 2 |
| 28 | const EG_BASE0: i64 = 10 |
| 29 | const EG_BASE_STEP: i64 = 10 |
| 32 | const EG_TGT_ADD: i64 = 0 |
| 33 | const EG_TGT_SCALE: i64 = 1 |
| 35 | const EG_TGT_THIRD: i64 = 2 |
| 39 | const EG_PROG_OPS: i64 = 3 |
| 42 | const EG_TRUNC_SURVIVORS: i64 = 2 |
| 44 | const EG_ADD0: i64 = 5 |
| 45 | const EG_ADD0_ALT: i64 = 9 |
| 46 | const EG_SCALE_NUM: i64 = 3 |
| 47 | const EG_SCALE_DEN: i64 = 2 |
| 48 | const EG_RADD_LO: i64 = 2 |
| 49 | const EG_RADD_HI: i64 = 5 |
| 50 | const EG_RADD_AMT: i64 = 7 |
| 51 | const EG_UNUSED: i64 = 0 |
functions
| 53 | func eg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 54 | func eg_ne(a: i64, b: i64) -> i64 { if a != b { return 1 } return 0 } called by 1: main |
| 58 | func eg_base(i: i64) -> i64 { return EG_BASE0 + i * EG_BASE_STEP } |
| 62 | func eg_seed(cap: i64) -> *i64 |
| 72 | func eg_program(st: *i64, add0: i64) -> i64 |
| 79 | func main(argc: i64, argv: *i64) -> i64 |