code wiki / _hdl_build / nx_synth_matrix.nx

nx_synth_matrix.nx

buildroot/runtime/_hdl_build/nx_synth_matrix.nx

5452 B116 linesdepth 11pulls 23 transitivereach 0 importersview sourcekind tooltopic synth
docsdependenciesstructsconstsfunctions

about

nx_synth_matrix.nx -- R-RSI-005 (SYNTH-matrix-cited). The evolution-synthesis matrix is only "cited" if every per-cell citation is REAL. This gate reads the spec (2026-06-12-evolution-synthesis.md), parses each machine line `CITE :: <source> :: <anchor>`, OPENS knowledge/library/<source>, and asserts the verbatim <anchor> occurs in its real bytes (CLAUDE.md rule 4: no hallucinated cite survives -- a fabricated anchor => verdict=RED). Also asserts all 5 fetched sources are represented and the 4 exceed differentiators are present, and a NEGATIVE control (a bogus anchor MUST be rejected) proves the verifier discriminates. Composes nx_library_publish primitives (lp_readfile/lp_contains/lp_scan/lp_startswith, no rebuild). Built sovereignly (nx_cc->nxasm_x86, no gcc). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_library_publish.nx nx_synth_matrix.nx

imports: nx_library_publish.nx

imported by: nobody (leaf or entry point)

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

main lp_readfile sys_openat_rd sys_read sys_close sm_puts lp_scan lp_startswith sm_find sm_src_has lp_wbuf lp_readfile ↻ lp_contains lp_contains ↻ sm_putn

structs

none

consts

11const SM_MAGIC_262144: i64 = 262144
13const SM_SPEC: *u8 = "knowledge/specs/2026-06-12-evolution-synthesis.md"
14const SM_LIB: *u8 = "knowledge/library/"

functions

16func sm_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 1: main
17func sm_putn(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;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main
20func sm_find(buf: *u8, from: i64, e: i64, pat: *u8, pl: i64) -> i64
called by 1: main
32func sm_src_has(src: *u8, srclen: i64, anchor: *u8) -> i64
called by 1: main calls 3: lp_wbuflp_readfilelp_contains
44func main() -> i64