nx_gvmigrate.nx
buildroot/runtime/nx_gvmigrate.nx
about
nx_gvmigrate.nx -- STAGE the gv_check -> gv_check_eq migration (the edit substrate, not the judge).
WHY THIS EXISTS. nx_gatelaw_gate's L4 axis measures gates that EMIT their values and reads 2 of 3,422:
666 gates already inherit the base class and print only PASS or FAIL. An arithmetic that cannot see a
number can never contradict one, so a PASS-only gate makes an independent SECOND METHOD CLASS
structurally impossible -- that is the fleet-level reason PROVEN reads 0/105. gv_check_eq(name, actual,
expected, ctr) asserts AND emits in ONE expression, so the number tested and the number published
cannot drift apart by construction. The primitive shipped; the TRANSFORMATION was missing.
WHAT THIS IS NOT: a second migrator. nx_gate_migrate already owns the dangerous half -- a 4-clause
judge-equivalence oracle (exit code, verdict line, PASS/FAIL vector, evidence side-effect) with
commit-or-restore never-brick. This organ only writes <src>.migrated, exactly as nx_dedup_migrate
stage does, and hands it to that verifier. Composing the proven judge beats re-implementing it, and
a second ruler over gate equivalence is precisely the duplicate-ruler defect.
SCOPE, MEASURED OVER THE POPULATION, NOT SAMPLED. 901 call sites, corpus_complete=1: 670 carry '==',
147 '>', 44 '>=', 44 '<', 42 ne, 24 '<=', 7 '&&', and 262 sites are MULTI-LINE continuations. An
18-line sample of that same population contained ZERO '==' and would have killed this work; only the
full count reversed it. Coarse caveat, stated: those are line-contains counts, so a token inside a
tooth NAME inflates them -- this organ re-derives the truth per site by parsing.
ONLY the (A == B) as i64 shape is rewritten, because it is the only shape the base class has an
emitter for. Every other operator is SKIPPED AND NAMED rather than guessed at: inventing an emitter
that does not exist would not compile, and silently dropping a tooth would be far worse than skipping
it. The counts printed below form a partition that SUMS to the sites found.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: syscalls.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
| 30 | const GM_Q: i64 = 34 |
| 31 | const GM_LP: i64 = 40 |
| 32 | const GM_RP: i64 = 41 |
| 33 | const GM_LB: i64 = 91 |
| 34 | const GM_RB: i64 = 93 |
| 35 | const GM_COMMA: i64 = 44 |
| 36 | const GM_EQ: i64 = 61 |
| 37 | const GM_BSL: i64 = 92 |
| 38 | const GM_SP: i64 = 32 |
| 39 | const GM_TAB: i64 = 9 |
| 40 | const GM_NL: i64 = 10 |
| 41 | const GM_CR: i64 = 13 |
| 42 | const GM_GT: i64 = 62 |
| 43 | const GM_LT: i64 = 60 |
| 44 | const GM_BANG: i64 = 33 |
| 45 | const GM_NEEDLE: i64 = 9 |
functions
| 47 | func gm_p(s: *u8) -> i64 |
| 54 | func gm_num(v: i64) -> i64 called by 1: main |
| 66 | func gm_isws(c: i64) -> i64 called by 1: main |
| 77 | func gm_close(buf: *u8, n: i64, open: i64) -> i64 called by 1: main |
| 96 | func gm_comma_at(buf: *u8, start: i64, end: i64) -> i64 called by 1: main |
| 119 | func gm_eq_at(buf: *u8, start: i64, end: i64) -> i64 called by 1: main |
| 145 | func gm_starts(buf: *u8, at: i64, n: i64, lit: *u8) -> i64 called by 1: main |
| 155 | func gm_usage() -> i64 |
| 163 | func main(argc: i64, argv: *i64) -> i64 |