code wiki / _hdl_build / nx_gate_vocab_census.nx

nx_gate_vocab_census.nx

buildroot/runtime/_hdl_build/nx_gate_vocab_census.nx

10611 B216 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_vocab_census.nx -- HOW MANY GATES CAN THE D001 ORACLE ACTUALLY ACCEPT? (2026-07-31, ws=gate-dry-d001) WHY THIS EXISTS: nx_gate_migrate is now live and sound (selftest 12/12 with real neg-controls), but its clause (c) -- the PASS/FAIL vector -- is implemented as gm_count(out,"PASS") before vs after, a LITERAL SUBSTRING COUNT. Migrating a gate onto nx_gate_verdict makes gv_check emit " <name>: PASS" per check. So a gate that today reports its checks in ANY OTHER vocabulary has PASS=0 before and PASS=N after, and the oracle refuses a migration that is semantically sound and strictly an improvement. That means the migratable population is NOT the 2601 non-inheriting gates -- it is only the subset that ALREADY speaks PASS. NOBODY HAS THAT NUMBER, and every plan for D001 has been sized without it. THE THREE DECISION-RELEVANT BUCKETS (single responsibility -- it classifies, it does not migrate): INHERITS -- source imports nx_gate_verdict. Already done; no work owed. EMITS-PASS -- does not inherit, but the source already contains the PASS literal, so gv_check's rows can match the existing count. MIGRATABLE TODAY under the oracle as it stands. NO-PASS -- does not inherit and never says PASS (the ' OK' family, and the composer-generated gates that emit no check rows at all). BLOCKED BY THE VOCABULARY TRAP until clause (c) compares the semantic vector instead of the literal token. Plus the ANCHOR axis, a different rung: does the source emit a "verdict=" anchor at all? A gate without one is machine-read as NOT-GREEN by gg_line_green -- a passing gate scored as failing. ENVELOPE, declared in-band and never silent: this is a SOURCE-LITERAL PROXY, not a runtime observation. It reads what the source CONTAINS; it does not run the gate and observe what it PRINTS. A gate could carry the PASS literal in a comment, or build the word at runtime, and this would mis-file it. The proxy is deliberate -- running 2800 gates costs machine-hours, this costs seconds -- but the number it produces is a PLANNING estimate, and any gate it calls migratable must still be PROVEN one at a time by nx_gate_migrate verify. Do not bank this as a migration result. FLAT scan of runtime + runtime/_hdl_build under the discovered buildroot, shadow trees excluded. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gate_vocab_census.nx

imports: nx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_puts sys_write vc_enter_buildroot vc_exists sys_openat_rd sys_close gv_puts ↻ sys_chdir sys_mmap sys_mmap ↻ vc_scan sys_openat_rd ↻ sys_mmap ↻ sys_getdents64 vc_is_gate_src vc_cat vc_slurp sys_openat_rd ↻ sys_read sys_close ↻ vc_contains sys_close ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap

structs

none

consts

32const VC_DIRBUF: i64 = 262144
33const VC_PATH: i64 = 512
34const VC_SRC: i64 = 262144
35const VC_RECLEN_OFF: i64 = 16
36const VC_NAME_OFF: i64 = 19
38const VC_C_TOTAL: i64 = 0
39const VC_C_INHERITS: i64 = 1
40const VC_C_EMITS_PASS: i64 = 2
41const VC_C_NO_PASS: i64 = 3
42const VC_C_HAS_ANCHOR: i64 = 4
43const VC_C_NO_ANCHOR: i64 = 5
44const VC_C_UNREADABLE: i64 = 6
45const VC_CN: i64 = 7

functions

52func vc_cat(dst: *u8, o: i64, s: *u8) -> i64
called by 1: vc_scan
60func vc_exists(path: *u8) -> i64
67func vc_enter_buildroot() -> i64
called by 1: main calls 3: vc_existsgv_putssys_chdir
78func vc_slurp(path: *u8, buf: *u8, cap: i64) -> i64
93func vc_contains(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: vc_scan
109func vc_is_gate_src(nm: *u8, n: i64) -> i64
called by 1: vc_scan
120func vc_scan(dir: *u8, ctr: *i64) -> i64
165func main(argc: i64, argv: *i64) -> i64