code wiki / _hdl_build / nx_product_decompose.nx
nx_product_decompose.nx
buildroot/runtime/_hdl_build/nx_product_decompose.nx
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 · 0 importers
imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const PD_MAGIC_1024: i64 = 1024 |
| 11 | const PD_CAP: i64 = 262144 |
| 12 | const PD_NL: i64 = 10 |
| 13 | const PD_TAB: i64 = 9 |
| 14 | const PD_MAXCOL: i64 = 16 |
| 15 | const PD_MAXROW: i64 = 64 |
| 16 | const PD_STDERR: i64 = 2 |
| 17 | const CT_NOTE: i64 = 6 |
functions
| 19 | func pd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 20 | func pd_werr(s: *u8) -> i64 { sys_write(PD_STDERR, s, pd_slen(s)); return 0 } |
| 21 | func pd_w(s: *u8) -> i64 { sys_write(1, s, pd_slen(s)); return 0 } |
| 22 | func 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 } |
| 23 | func 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 } |
| 24 | func 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 |
| 25 | func pd_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 called by 1: pd_parse |
| 40 | func pd_has_sub(q: *u8, a: i64, b: i64, w: *u8, wl: i64) -> i64 called by 1: main |
| 52 | func pd_parse(buf: *u8, n: i64, na: *i64, nb: *i64, ta: *i64, tb: *i64) -> i64 |
| 74 | func main(argc: i64, argv: *i64) -> i64 |