code wiki / _hdl_build / nx_idiomcensus.nx

nx_idiomcensus.nx

buildroot/runtime/_hdl_build/nx_idiomcensus.nx

13000 B276 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_idiomcensus.nx -- WHAT COUNTER IDIOM DOES THE SKIP-IDIOM FAMILY ACTUALLY USE? nx_gate_dry_apply SKIPs a large family because it cannot recognise how the gate counts pass/total, and the remedy proposed for it has been "write a recogniser" -- for a shape distribution nobody has measured. ★DIAGNOSE THE POPULATION BEFORE BUILDING THE GENERAL MACHINE. A recogniser written against the one shape somebody happened to eyeball is a recogniser for n=1. ★SUBJECT MATCHES CLAIM. It censuses EXACTLY the gates dry_apply classed SKIP-IDIOM, read from the NEWEST generation of knowledge/status/drysweep.log -- not "all gates", which is a different population wearing the same name. drysweep.log is APPEND-ONLY across runs: reading every generation double-counts (the identical defect already found and fixed in nx_adoptsweep), so the newest block is isolated first. ★UNKNOWN IS ITS OWN BUCKET and the partition is PRINTED AND CHECKED TO SUM. A shape that falls into a known bucket because nothing matched is the number somebody then plans against. ★MARKER TALLIES ARE NON-EXCLUSIVE AND LABELLED AS SUCH, separately from the exclusive partition -- two different questions ("how many gates contain X" vs "what IS this gate") must never share a counter. nx_idiomcensus [max] [logpath] [dir] exit: 0 censused | 2 usage | 3 NO-CONCLUSION (log unreadable / no SKIP-IDIOM rows / partition disagrees) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_artifact_root.nx nx_idiomcensus.nx

imports: nx_syscalls.nxnx_artifact_root.nx

imported by: nobody (leaf or entry point)

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

main 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 ↻ ic_read sys_openat_rd sys_read sys_close ic_puts sys_write ↻ sys_exit ↻ ic_row ic_puts ↻ ic_n sys_write ↻ sys_mmap ↻ ic_rfind ic_find ic_find ↻ ic_strip ic_has ic_find ↻ ic_n ↻

structs

none

consts

23const IC_DIR: *u8 = "buildroot/runtime/_hdl_build"
24const IC_LOG: *u8 = "knowledge/status/drysweep.log"
25const IC_LOGCAP: i64 = 4194304
26const IC_SRCCAP: i64 = 524288
27const IC_NAMECAP: i64 = 512
28const IC_SETCAP: i64 = 262144
29const IC_MAXN: i64 = 4096

functions

31func ic_puts(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: ic_rowmain calls 1: sys_write
32func ic_n(v: i64) -> i64
called by 2: ic_rowmain calls 2: sys_writesys_mmap
43func ic_row(label: *u8, v: i64) -> i64 { ic_puts(" " as *u8); ic_puts(label); ic_puts("=" as *u8); ic_n(v); ic_puts("\n" as *u8); return 0 }
called by 1: main calls 2: ic_putsic_n
48func ic_find(buf: *u8, n: i64, pat: *u8, from: i64) -> i64
called by 3: ic_hasic_rfindmain
62func ic_has(buf: *u8, n: i64, pat: *u8) -> i64 { if ic_find(buf, n, pat, 0) >= 0 { return 1 } return 0 }
called by 1: main calls 1: ic_find
64func ic_rfind(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: ic_find
85func ic_strip(buf: *u8, n: i64) -> i64
called by 1: main
107func ic_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
115func main(argc: i64, argv: *i64) -> i64