code wiki / (root) / nx_swcompare_compauto.nx

nx_swcompare_compauto.nx

buildroot/runtime/nx_swcompare_compauto.nx

9707 B176 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_compauto.nx -- researcher-SUGGESTED competitor cells for a Nishi Compare matrix. For <domain> it reads <domain>.matrix (axes + @cols) and <domain>.compdocs (one banked-doc slug per column, @cols order), then for each axis derives keyword terms from the label and tests them against each competitor's OWN banked doc (lowercased substring): a hit SUGGESTS Yes(Y), a miss No(n), a thin/absent doc Unknown(?). It prints SUGGESTED vs the CURATED codes and flags disagreements -- a cross-check / enrichment aid for hand-curation, NOT ground truth (a README mentioning a term is a weak proxy for the capability). Honest by construction: it never rewrites the matrix. NOTE: no '#'/'!' in string literals (nx_cc trap). license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_swcompare_compauto.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 w sys_write sys_exit sys_mmap scopy c_read sys_openat_rd sys_read sys_close splitpipe atoi lower_buf lc_byte wn w ↻ sys_mmap ↻ sys_write ↻ is_alpha lc_byte ↻ is_skip sys_mmap ↻ c_has c_has ↻

structs

none

consts

9const K_MAGIC_262144: i64 = 262144
10const K_MAGIC_4096: i64 = 4096
11const K_MAGIC_131072: i64 = 131072

functions

13func w(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: wnmain calls 1: sys_write
14func wn(fd: i64, v: i64) -> i64
called by 1: main calls 3: wsys_mmapsys_write
20func c_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
26func c_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 2: is_skipmain
33func splitpipe(s: *u8, fld: *i64, maxf: i64) -> i64
called by 1: main
38func scopy(dst: *u8, doff: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[doff+i] = src[i]; i = i + 1 } return doff + i }
called by 1: main
39func atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c < 48 { break } if c > 57 { break } v = v * 10 + (c - 48); i = i + 1 } return v }
called by 1: main
40func is_alpha(c: u8) -> i64 { let x: i64 = c as i64; if x >= 65 { if x <= 90 { return 1 } } if x >= 97 { if x <= 122 { return 1 } } return 0 }
called by 1: main
41func lc_byte(c: u8) -> u8 { let x: i64 = c as i64; if x >= 65 { if x <= 90 { return (x + 32) as u8 } } return c }
called by 2: lower_bufmain
42func lower_buf(buf: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { buf[i] = lc_byte(buf[i]); i = i + 1 } return 0 }
called by 1: main calls 1: lc_byte
44func is_skip(t: *u8) -> i64
called by 1: main calls 2: sys_mmapc_has
53func main(argc: i64, argv: *i64) -> i64