code wiki / _hdl_build / nx_gatescan_test.nx
nx_gatescan_test.nx
buildroot/runtime/_hdl_build/nx_gatescan_test.nx
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
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
structs
| none |
consts
| none |
functions
| 25 | func tw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 26 | func 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 } |
| 27 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: x_ends |
| 30 | func x_ends(name: *u8, n: i64, suf: *u8) -> i64 |
| 37 | func x_is_gate_name(name: *u8, n: i64) -> i64 |
| 46 | func x_attributes_to(gname: *u8, gn2: i64, organ: *u8, on: i64) -> i64 |
| 67 | func main() -> i64 |