code wiki / (root) / nx_gvmigrate.nx

nx_gvmigrate.nx

buildroot/runtime/nx_gvmigrate.nx

14546 B367 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_gvmigrate.nx

imports: syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gm_usage gm_p gm_starts gm_p ↻ gm_close gm_comma_at gm_isws gm_eq_at gm_num

structs

none

consts

30const GM_Q: i64 = 34
31const GM_LP: i64 = 40
32const GM_RP: i64 = 41
33const GM_LB: i64 = 91
34const GM_RB: i64 = 93
35const GM_COMMA: i64 = 44
36const GM_EQ: i64 = 61
37const GM_BSL: i64 = 92
38const GM_SP: i64 = 32
39const GM_TAB: i64 = 9
40const GM_NL: i64 = 10
41const GM_CR: i64 = 13
42const GM_GT: i64 = 62
43const GM_LT: i64 = 60
44const GM_BANG: i64 = 33
45const GM_NEEDLE: i64 = 9

functions

47func gm_p(s: *u8) -> i64
called by 2: gm_usagemain
54func gm_num(v: i64) -> i64
called by 1: main
66func gm_isws(c: i64) -> i64
called by 1: main
77func gm_close(buf: *u8, n: i64, open: i64) -> i64
called by 1: main
96func gm_comma_at(buf: *u8, start: i64, end: i64) -> i64
called by 1: main
119func gm_eq_at(buf: *u8, start: i64, end: i64) -> i64
called by 1: main
145func gm_starts(buf: *u8, at: i64, n: i64, lit: *u8) -> i64
called by 1: main
155func gm_usage() -> i64
called by 1: main calls 1: gm_p
163func main(argc: i64, argv: *i64) -> i64