code wiki / _hdl_build / nx_gatescan_test.nx

nx_gatescan_test.nx

buildroot/runtime/_hdl_build/nx_gatescan_test.nx

8115 B142 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gatescan_test.nx -- the gate for the organ that finds ungated organs. An ungated gate-scanner would be self-refuting, and it would also be the exact failure it was written to detect: a tool nothing checks, whose header claims it works. THE HARD PART IS THAT THE ANSWERS LIVE IN A REAL 17,000-FILE TREE, so this gate does not assert counts (they change daily and a test tuned to them would be a liar within a week). It asserts the RULES the counts must obey, on fixtures whose correct classification is known independently: T1/T2 the naming rule, in BOTH directions -- the bug that made the first run over-report by 56 organs, and the opposite bug that a looser rule would introduce. T3 consumers exclude gate importers, which is what stops a freshly written gate from disguising a dead organ as a used one. T4 the two known real defects of this session are classified the way the tool claims to classify them. T5 bounds are declared rather than silent. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_eco_graph.nx nx_gate.nx nx_gatescan_test.nx

imports: nx_syscalls.nxnx_eco_graph.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main x_attributes_to x_ends slen tw sys_write x_is_gate_name x_ends ↻ eg_new sys_mmap eg_intern eg_hash eg_name_eq eg_add_edge eg_finalize sys_mmap ↻ eg_find eg_name_eq ↻ eg_ca tn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

25func tw(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
26func tn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m } let t: *u8 = sys_mmap(24); 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 } 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
27func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: x_ends
30func x_ends(name: *u8, n: i64, suf: *u8) -> i64
called by 2: x_is_gate_namex_attributes_to calls 1: slen
37func x_is_gate_name(name: *u8, n: i64) -> i64
called by 1: main calls 1: x_ends
46func x_attributes_to(gname: *u8, gn2: i64, organ: *u8, on: i64) -> i64
called by 1: main calls 1: x_ends
67func main() -> i64