code wiki / _hdl_build / nx_census_run.nx

nx_census_run.nx

buildroot/runtime/_hdl_build/nx_census_run.nx

10458 B237 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic census
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_census_run.nx

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

main _p sys_write sys_mmap cs_read sys_openat_rd sys_read sys_close sys_exit sys_openat_append cs_tok cs_one sys_mmap ↻ cs_read ↻ cs_slice_find cs_len cs_len ↻ cs_seen cs_len ↻ cs_in_target cs_len ↻ _fp sys_write ↻ _fn sys_mmap ↻ sys_write ↻ _p ↻ _fp ↻ _fn ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻

structs

none

consts

19const K_MAGIC_1048576: i64 = 1048576
20const K_MAGIC_1048560: i64 = 1048560
21const K_MAGIC_65536: i64 = 65536
22const K_MAGIC_65520: i64 = 65520
23const K_MAGIC_16384: i64 = 16384

functions

24func _p(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 2: cs_onemain calls 1: sys_write
25func _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 }
called by 2: cs_onemain calls 1: sys_write
26func _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 }
called by 2: cs_onemain calls 2: sys_mmapsys_write
27func cs_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
28func cs_read(path: *u8, buf: *u8, cap: i64) -> i64
37func cs_slice_has(hay: *u8, a: i64, b: i64, pat: *u8) -> i64
calls 1: cs_len
51func cs_slice_find(hay: *u8, a: i64, b: i64, pat: *u8) -> i64
called by 1: cs_one calls 1: cs_len
64func cs_tok(buf: *u8, pos: i64, le: i64, pool: *u8, poff: *i64) -> i64
called by 1: main
78func cs_in_target(tg: *u8, tn: i64, item: *u8) -> i64
called by 1: cs_one calls 1: cs_len
98func cs_seen(seen: *u8, sn: i64, item: *u8) -> i64
called by 1: cs_one calls 1: cs_len
112func cs_one(name: *u8, up: *u8, anchor: *u8, mode2: i64, tp: *u8, lfd: i64) -> i64
182func main(argc: i64, argv: *i64) -> i64