code wiki / _hdl_build / nx_gatesubj.nx

nx_gatesubj.nx

buildroot/runtime/_hdl_build/nx_gatesubj.nx

14716 B318 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gatesubj.nx -- RESOLVE EVERY GATE'S SUBJECT FROM THE GATE'S OWN SOURCE. THE PROBLEM THIS SIZES ---------------------- Non-vacuity (can this gate ever fail?) is measured by nx_gate_bite, driven in bulk by nx_bite_sweep over rows declared in `knowledge/compare/*.gates`. Measured 2026-08-07: 2,316 `*_gate.nx` in the tree 19 declared in the registry = 8 permil coverage 855 resolvable by NAME convention = 369 permil (nx_X_gate.nx -> nx_X.nx) So 99.2% of the estate's gates have never been asked whether they can fail, and the obvious convention reaches only a third of them. nx_bite_sweep's header is right to refuse NAME guessing -- "a guessed path that fails to open produces 'no mutant killed', which reads identically to a vacuous gate" -- but it drew the wrong conclusion from it, that the subject must be hand-declared. ★★★★★★ THE GATE ALREADY NAMES ITS SUBJECT -- IN THE PATH IT EXECUTES OR THE MODULE IT IMPORTS. DERIVING FROM THE FILENAME IS GUESSING WHILE THE ANSWER IS SITTING IN THE FILE. An END-TO-END gate contains the literal `_offc/<organ>.elf` it fork/execs. An IN-PROCESS gate contains `import "<organ>.nx"`. Neither is a heuristic: both are the gate's own statement of what it tests, and both are exact. A gate with neither is honestly reported UNRESOLVED rather than guessed. ★ REPORTING "I COULD NOT DETERMINE THIS" IS A RESULT; GUESSING AND BEING WRONG IS A FALSE ACCUSATION AGAINST A WORKING GATE. usage: nx_gatesubj [--dir D] [--rows] --rows emits `gate|subject.nx|target|mode` for a sweep license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_memplane_lib.nx nx_gatekit_lib.nx nx_gatesubj.nx

imports: nx_memplane_lib.nxnx_gatekit_lib.nx

imported by: nobody (leaf or entry point)

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

main mp_streq gk_corpus_hdl gk_corpus_root sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gk_cat gk_exists sys_openat_rd sys_close gk_len gk_cat ↻ gk_corpus_root ↻ gk_corpus_scan sys_mmap ↻ gk_corpus_root ↻ gk_corpus_hdl ↻ gk_dirscan gk_dirscan_ext sys_openat_rd ↻ sys_mmap ↻ gk_ext_is gk_len ↻ gk_cat ↻ gk_exists ↻ gk_len ↻ sys_close ↻

structs

none

consts

30const GS_MAGIC_8192: i64 = 8192
31const GS_MAGIC_4096: i64 = 4096
33const GS_DIR: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build"
34const GS_MAXF: i64 = 32768 // holds the WHOLE corpus pre-filter (18,563), not just gates
35const GS_FBUF: i64 = 4194304

functions

37func gs_isid(c: i64) -> i64
50func gs_isgate(name: *u8) -> i64
called by 1: main calls 1: mp_len
63func gs_execsubj(buf: *u8, n: i64, self: *u8, out: *u8) -> i64
called by 1: main calls 2: gs_isidmp_streq
108func gs_impsubj(buf: *u8, n: i64, out: *u8) -> i64
called by 1: main calls 2: gs_isidmp_streq
145func main(argc: i64, argv: *i64) -> i64