code wiki / _hdl_build / nx_census_run.nx
nx_census_run.nx
buildroot/runtime/_hdl_build/nx_census_run.nx
about
nx_census_run.nx -- X-AUT-003: the DATA-DRIVEN coverage census (one organ, many
censuses -- adding a census = adding a conf row, zero rebuild: the epigenetics law
applied to coverage itself). PLAIN LANGUAGE: a census proves "every X has its row
in Y" mechanically; anything missing becomes a NAMED gap line, never a handwave.
conf row: C <name> <universe-file> <anchor> <mode> <target-file> <gapword>
universe = lines of <universe-file> containing <anchor>
mode=tok2 item = 2nd space-token of the line (e.g. arc names in
examiner_arcs.conf rows "A AWARENESS knowledge/...")
mode=after item = substring AFTER the anchor, up to space/tab/eol, DEDUPED
(e.g. step names from "PULSE-STEP name=nx_..." across many beats)
covered = item appears at LINE START of <target-file> followed by a TAB
output: CENSUS name=.. covered=N gaps=G + CENSUS-GAP census=.. item=.. rows +
final CENSUS-RUN censuses=N gaps_total=G verdict=COVERED|GAPS
-> knowledge/status/census_run.log (the Examiner grades verdict=COVERED).
Exit 0 = census ran (gaps are WORK, not organ failure); exit 1 = unreadable world.
argv[1]=census-conf argv[2]=outlog (gates use scratch worlds).
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| 19 | const K_MAGIC_1048576: i64 = 1048576 |
| 20 | const K_MAGIC_1048560: i64 = 1048560 |
| 21 | const K_MAGIC_65536: i64 = 65536 |
| 22 | const K_MAGIC_65520: i64 = 65520 |
| 23 | const K_MAGIC_16384: i64 = 16384 |
functions
| 24 | func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 25 | func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 26 | func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); 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{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 27 | func cs_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 28 | func cs_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 37 | func cs_slice_has(hay: *u8, a: i64, b: i64, pat: *u8) -> i64 calls 1: cs_len |
| 51 | func cs_slice_find(hay: *u8, a: i64, b: i64, pat: *u8) -> i64 |
| 64 | func cs_tok(buf: *u8, pos: i64, le: i64, pool: *u8, poff: *i64) -> i64 called by 1: main |
| 78 | func cs_in_target(tg: *u8, tn: i64, item: *u8) -> i64 |
| 98 | func cs_seen(seen: *u8, sn: i64, item: *u8) -> i64 |
| 112 | func cs_one(name: *u8, up: *u8, anchor: *u8, mode2: i64, tp: *u8, lfd: i64) -> i64 |
| 182 | func main(argc: i64, argv: *i64) -> i64 |