code wiki / (root) / nx_product_decompose_t39.nx

nx_product_decompose_t39.nx

buildroot/runtime/nx_product_decompose_t39.nx

7038 B145 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind tooltopic product
docsdependenciesstructsconstsfunctions

about

nx_product_decompose.nx v2 -- PRODUCT decomposition (name-an-outcome -> required capabilities -> gaps) over the real design-to-market NEEDS + CAPABILITIES planes, WITH persistence: writes the coverage/gap result to a decompose- plane (the atlas-out compounding loop -- results bank back for the F208 opportunity feeder). Each need matched to a fulfilling capability by name-in-note substring; needs with none = unproven-opportunity GAPS. usage: nx_product_decompose [needs-prefix] [caps-prefix] [out-prefix] license_tier: ORIGINAL expect_exit:0

dependencies 3 imports · 1 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_product_decompose_t39.nx nx_product_input_fixed_t39.nx

imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_product_input_fixed_t39.nx

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 ↻ sts_load sts_gen_note sts_pfxhash ss_max_segid sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_segid_ok ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat ↻ sys_fstatat ssc_streq ss_open ss_open2 ss_open3 sys_now_us

structs

none

consts

9const PD_MAGIC_1024: i64 = 1024
11const PD_CAP: i64 = 262144
12const PD_NL: i64 = 10
13const PD_TAB: i64 = 9
14const PD_MAXCOL: i64 = 16
15const PD_MAXROW: i64 = 64
16const PD_STDERR: i64 = 2
17const CT_NOTE: i64 = 6
18const PD_ERR_CAPACITY: i64 = 0 - 1

functions

20func pd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: pd_werrpd_w
21func pd_werr(s: *u8) -> i64 { sys_write(PD_STDERR, s, pd_slen(s)); return 0 }
called by 1: main calls 2: sys_writepd_slen
22func pd_w(s: *u8) -> i64 { sys_write(1, s, pd_slen(s)); return 0 }
called by 2: mainmain calls 2: sys_writepd_slen
23func pd_wn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m } let t: *u8 = sys_mmap(24); 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 j: i64 = 0; while j < k { b[j] = t[k-1-j]; j = j + 1 } sys_write(1, b, k); return 0 }
called by 2: mainmain calls 2: sys_mmapsys_write
24func pd_wslice(q: *u8, a: i64, b: i64) -> i64 { let buf: *u8 = sys_mmap(PD_MAGIC_1024); var n: i64 = 0; var i: i64 = a; while i < b { if n < PD_MAGIC_1024 { buf[n] = q[i]; n = n + 1 } i = i + 1 } if n > 0 { sys_write(1, buf, n) } return 0 }
called by 1: main calls 2: sys_mmapsys_write
25func pd_cat(dst: *u8, o: i64, src: *u8, a: i64, b: i64) -> i64 { var oo: i64 = o; var i: i64 = a; while i < b { dst[oo] = src[i]; oo = oo + 1; i = i + 1 } return oo }
called by 1: main
26func pd_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: pd_parse_capacity
41func pd_has_sub(q: *u8, a: i64, b: i64, w: *u8, wl: i64) -> i64
called by 1: main
53func pd_parse_capacity(buf: *u8, n: i64, na: *i64, nb: *i64, ta: *i64, tb: *i64, row_capacity: i64) -> i64
75func pd_parse(buf: *u8,n: i64,na: *i64,nb: *i64,ta: *i64,tb: *i64) -> i64
called by 2: mainmain calls 1: pd_parse_capacity
79func main(argc: i64, argv: *i64) -> i64