code wiki / (root) / nx_afford_ruler.nx

nx_afford_ruler.nx

buildroot/runtime/nx_afford_ruler.nx

10852 B240 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_afford_ruler.nx -- THE AFFORDABILITY RULER. Measures the ecosystem's affordability capability across a 4-domain x 6-rung grid (Housing / Healthcare / Food-energy / Debt x R1 macro-anatomy / R2 ingest / R3 audit / R4 reduce / R5 act / R6 measured) by reading knowledge/compare/affordability.matrix -- the same data SSOT that nx_swcompare_evidence grounds. Every claimed cell is GROUNDED: the ruler opens the cited organ on disk and finds the symbol; a claim whose symbol cannot be found is a LIE (mat=X) and is never counted. It emits the maturity grid + the per-rung gap histogram = the BUILD ORDER, chosen by measurement, not taste. Self-gated with a liar-kill (a real symbol grounds AND a bogus one does not, in the same organ) + non-vacuity (the strong domain outscores the void domains) + completeness (24 cells). Reuses the proven ev_read/find idiom from nx_swcompare_evidence. Build: _offc/nx_sov_build_run.elf nx_afford_ruler license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_afford_ruler.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 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 ↻ ev_read sys_openat_rd sys_read sys_close gp sys_write ↻ sys_exit ↻ field_k dom_idx ev_ground ev_read ↻ ev_find slen gn sys_write ↻ sys_mmap ↻

structs

none

consts

none

functions

12func gp(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 1: main calls 1: sys_write
13func gn(v0: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
19func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ev_find
22func ev_read(path: *u8, buf: *u8, cap: i64) -> i64
36func ev_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: ev_ground calls 1: slen
50func ev_ground(organ: *u8, symbol: *u8, src: *u8, cap: i64) -> i64
called by 1: main calls 2: ev_readev_find
57func field_k(line: *u8, ln: i64, kk: i64, dst: *u8, cap: i64) -> i64
called by 1: main
83func dom_idx(ch: i64) -> i64
called by 1: main
91func main() -> i64