code wiki / _hdl_build / nx_gatemap_gate.nx

nx_gatemap_gate.nx

buildroot/runtime/_hdl_build/nx_gatemap_gate.nx

8550 B184 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gatemap_gate.nx -- WHICH DOMAIN DOES EACH UNWIRED GATE BELONG TO? Proposes, never writes. ★THE FINDING THIS SERVES (id=1785448222): 214 `_gate.elf` binaries exist on this host and only 19 are DECLARED in any knowledge/compare/<domain>.gates. Thirty of forty domains read CLAIM-ONLY not because nobody built the evidence but because nobody WIRED it. 0/40 PROVEN understates what is provable today by roughly an order of magnitude. ★THE RULE IS STRUCTURAL, NOT A GUESS: **a gate belongs to the domain whose MATRIX NAMES ITS STEM.** A `<domain>.matrix` row carries the organ path it claims (`runtime/nx_natstat.nx`, `runtime/_hdl_build/ nx_vcodec_t8noise_gate.nx`). So for gate `nx_X_gate` the question is simply: which matrix mentions `nx_X`? That is a fact about the corpus, not a similarity score, and it CANNOT drift the way keyword matching does. A gate no matrix mentions is REFUSED, not assigned to its nearest neighbour. ★WHY REFUSAL MATTERS AS MUCH AS THE MATCH: a wrong domain assignment is the same slander class as a wrong subject -- it makes a working gate count against a domain it was never about. UNMATCHED is the honest answer and it is cheap to read. ★AMBIGUITY IS REPORTED, NEVER BROKEN BY TASTE. If two matrices name the same stem the gate is listed as AMBIGUOUS with both domains, because picking one silently is how a wiring pass launders a judgement call into a fact. It WRITES NOTHING. Output is a proposal for human review (that is the whole point -- the operator asked to see it before it lands). usage: nx_gatemap_gate (CWD = the store root) exit 0 always -- this is a census, not a pass/fail gate; the verdict line reports the counts. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_gatemap_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap w sys_write sys_openat_rd sys_exit sys_getdents64 dirent_reclen gm_dslot sys_close wn sys_mmap ↻ sys_write ↻ gm_cat gm_read sys_openat_rd ↻ sys_read sys_close ↻ gm_find

structs

none

consts

29const GM_MAXDOM: i64 = 128
30const GM_NAMEW: i64 = 64
31const GM_MATCAP: i64 = 262144
32const GM_MAXGATE: i64 = 512

functions

38func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
39func wn(v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
41func gm_dslot(i: i64) -> *u8 { return ((gm_dnames as i64) + i * GM_NAMEW) as *u8 }
called by 1: main
43func gm_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
55func gm_find(hay: *u8, hn: i64, ned: *u8, nl: i64) -> i64
called by 1: main
67func gm_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i];o=o+1;i=i+1} return o }
called by 1: main
69func main() -> i64