code wiki / _hdl_build / nx_ecomat_lib.nx

nx_ecomat_lib.nx

buildroot/runtime/_hdl_build/nx_ecomat_lib.nx

32789 B577 linesdepth 3pulls 4 transitivereach 41 importersview sourcekind librarytopic ecomat
docsdependenciesstructsconstsfunctions

about

nx_ecomat_lib.nx -- shared core for the ECOSYSTEM MATURITY ROLLUP (the unifier), SOVEREIGN edition. Operator: "get away from tsv and other 3rd party formats -- use the nishi ecosystem, get to S-class." So the maturity chart lives in the NATIVE seg_store (knowledge/store/ecomat) as BINARY records (the store's own ss_w32/ss_r32 codec -- no TSV, no delimiter format), and the rollup MEASURES from the store + the live autonomy ledger, enforcing a LIAR-KILL (no S-CLASS claim without evidence). Pairs with nx_seg_store (the sovereign store) + nx_maturity_auditor (the ladder). NO FLOAT. RECORD layout (one value per domain, key "ecomat:dom:N"): w32@0 axis(0=DEPTH 1=BREADTH 2=META) | @4 layer | @8 cur | @12 bar | @16 weight | @20 ev @24: domain\0 bench\0 next_rung\0 license_tier: ORIGINAL

dependencies 3 imports · 19 importers

nx_seg_store.nx nx_syscalls.nx nx_maturity_auditor.nx nx_ecomat_lib.nx nx_ecomat_beat.nx nx_ecomat_beat_gate.nx nx_ecomat_domledger_lib.nx nx_ecomat_page.nx nx_ecomat_page_gate.nx nx_ecomat_put.nx nx_ecomat_put_gate.nx nx_ecomat_seed.nx nx_ecomat_seed_gate.nx nx_ecomat_target_emit.nx

diagram shows first 10 each side; +0 more imports, +9 more importers in the complete lists below.

imports: nx_seg_store.nxnx_syscalls.nxnx_maturity_auditor.nx

imported by: nx_ecomat_beat.nxnx_ecomat_beat_gate.nxnx_ecomat_domledger_lib.nxnx_ecomat_page.nxnx_ecomat_page_gate.nxnx_ecomat_put.nxnx_ecomat_put_gate.nxnx_ecomat_seed.nxnx_ecomat_seed_gate.nxnx_ecomat_target_emit.nxnx_ecomat_target_emit_gate.nxnx_ecomat_trend_lib.nxnx_ecosystem_maturity_rollup.nxnx_ecosystem_maturity_rollup_gate.nxnx_mobile_census.nxnx_pm_roi_lib.nxnx_rankmap_gate.nxnx_stackaudit_lib.nxnx_vsbest_lib.nx

structs

none

consts

15const ECOMAT_STORE: *u8 = "knowledge/store/ecomat"
19const ECOMAT_REC_STRBASE: i64 = 32
23const ECOMAT_DOM_CAP: i64 = 128
24const ECOMAT_NR_CAP: i64 = 160
25const ECOMAT_EVLOG_CAP: i64 = 256
26const ECOMAT_EVPAT_CAP: i64 = 64

functions

28func el_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
29func _p(s: *u8) -> i64 { let n: i64=el_len(s); sys_write(1,s,n); return 0 }
30func _fp(fd: i64, s: *u8) -> i64 { let n: i64=el_len(s); sys_write(fd,s,n); return 0 }
31func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8=sys_mmap(28); 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 i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
32func el_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
33func el_match(buf: *u8, i: i64, pat: *u8, pl: i64) -> i64 { var k: i64=0; while k<pl { if buf[i+k]!=pat[k] { return 0 } k=k+1 } return 1 }
36func el_last_after(buf: *u8, n: i64, pat: *u8) -> i64
62func el_last_green(buf: *u8, n: i64, pat: *u8) -> i64
80func ec_axis_label(a: i64) -> *u8 { if a==0 { return "DEPTH" as *u8 } if a==1 { return "BREADTH" as *u8 } return "META" as *u8 }
81func em_tri_label(t: i64) -> *u8 { if t==2 { return "[triangulated]" as *u8 } if t==3 { return "[CONFLICT]" as *u8 } if t==1 { return "[single-src]" as *u8 } if t==4 { return "[dangling]" as *u8 } return "[stored]" as *u8 }
84func ec_key(k: i64, out: *u8) -> i64
96func ec_putstr(buf: *u8, cap: i64, off: i64, s: *u8) -> i64
called by 1: ec_pack calls 1: el_len
111func ec_reclen(domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8, evlog2: *u8, evpat2: *u8) -> i64
130func ec_pack(buf: *u8, cap: i64, axis: i64, layer: i64, cur: i64, bar: i64, weight: i64, ev: i64, evkind: i64, evkind2: i64, domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8, evlog2: *u8, evpat2: *u8) -> i64
143func ec_axis(v: *u8) -> i64 { return ss_r32(v, 0) }
144func ec_layer(v: *u8) -> i64 { return ss_r32(v, 4) }
calls 1: ss_r32
145func ec_cur(v: *u8) -> i64 { return ss_r32(v, 8) }
146func ec_bar(v: *u8) -> i64 { return ss_r32(v, 12) }
147func ec_weight(v: *u8) -> i64 { return ss_r32(v, 16) }
148func ec_ev(v: *u8) -> i64 { return ss_r32(v, 20) }
called by 1: em_rollup_store calls 1: ss_r32
149func ec_evkind(v: *u8) -> i64 { return ss_r32(v, 24) }
called by 1: em_domain_level calls 1: ss_r32
150func ec_evkind2(v: *u8) -> i64 { return ss_r32(v, 28) }
called by 1: em_domain_level calls 1: ss_r32
156func ec_str(v: *u8, which: i64, out: *u8, cap: i64) -> i64
170func ec_seed_one(w: *i64, idx: i64, axis: i64, layer: i64, cur: i64, bar: i64, weight: i64, ev: i64, domain: *u8, bench: *u8, nextrung: *u8) -> i64
179func ec_seed_one_ev(w: *i64, idx: i64, axis: i64, layer: i64, cur: i64, bar: i64, weight: i64, ev: i64, evkind: i64, domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8) -> i64
188func ec_seed_two(w: *i64, idx: i64, axis: i64, layer: i64, cur: i64, bar: i64, weight: i64, ev: i64, evkind: i64, evkind2: i64, domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8, evlog2: *u8, evpat2: *u8) -> i64
198func permil_to_level(p: i64) -> i64
called by 2: em_derive_levelmain
224func em_derive_level(evkind: i64, evlog: *u8, evpat: *u8, stored: i64) -> i64
266func em_domain_level(v: *u8, tout: *i64) -> i64
306func em_rollup_store(prefix: *u8, autolog: *u8, out: *i64, verbose: i64) -> i64
392func el_contains(buf: *u8, n: i64, pat: *u8) -> i64
399func et_mkid(domain: *u8, out: *u8) -> i64
409func et_should_emit(domain: *u8, cur: i64, bar: i64, qb: *u8, qn: i64) -> i64
417func et_count_targets_store(prefix: *u8, qb: *u8, qn: i64) -> i64
445func pg_thead(buf: *u8, off: i64) -> i64
called by 1: em_emit_page calls 1: ss_cat
449func pg_emit_axis(buf: *u8, off: i64, h: *i64, want: i64) -> i64
487func em_emit_page(prefix: *u8, autolog: *u8, outhtml: *u8) -> i64
526func et_emit_targets_core(store: *u8, qb: *u8, qn: i64, qf: i64, lf: i64, out: *i64) -> i64