code wiki / _hdl_build / nx_ecomat_lib.nx
nx_ecomat_lib.nx
buildroot/runtime/_hdl_build/nx_ecomat_lib.nx
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
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
| 15 | const ECOMAT_STORE: *u8 = "knowledge/store/ecomat" |
| 19 | const ECOMAT_REC_STRBASE: i64 = 32 |
| 23 | const ECOMAT_DOM_CAP: i64 = 128 |
| 24 | const ECOMAT_NR_CAP: i64 = 160 |
| 25 | const ECOMAT_EVLOG_CAP: i64 = 256 |
| 26 | const ECOMAT_EVPAT_CAP: i64 = 64 |
functions
| 28 | func el_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 29 | func _p(s: *u8) -> i64 { let n: i64=el_len(s); sys_write(1,s,n); return 0 } |
| 30 | func _fp(fd: i64, s: *u8) -> i64 { let n: i64=el_len(s); sys_write(fd,s,n); return 0 } |
| 31 | func _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 } |
| 32 | func 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 } |
| 33 | func 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 } |
| 36 | func el_last_after(buf: *u8, n: i64, pat: *u8) -> i64 |
| 62 | func el_last_green(buf: *u8, n: i64, pat: *u8) -> i64 |
| 80 | func ec_axis_label(a: i64) -> *u8 { if a==0 { return "DEPTH" as *u8 } if a==1 { return "BREADTH" as *u8 } return "META" as *u8 } |
| 81 | func 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 } |
| 84 | func ec_key(k: i64, out: *u8) -> i64 called by 16: edl_walkec_seed_oneec_seed_one_evec_seed_twoem_rollup_storeet_count_targets_store+10 calls 1: sys_mmap |
| 96 | func ec_putstr(buf: *u8, cap: i64, off: i64, s: *u8) -> i64 |
| 111 | func ec_reclen(domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8, evlog2: *u8, evpat2: *u8) -> i64 |
| 130 | func 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 |
| 143 | func ec_axis(v: *u8) -> i64 { return ss_r32(v, 0) } |
| 144 | func ec_layer(v: *u8) -> i64 { return ss_r32(v, 4) } calls 1: ss_r32 |
| 145 | func ec_cur(v: *u8) -> i64 { return ss_r32(v, 8) } called by 9: edl_walkem_domain_levelem_rollup_storeet_count_targets_storeet_emit_targets_coremain+3 calls 1: ss_r32 |
| 146 | func ec_bar(v: *u8) -> i64 { return ss_r32(v, 12) } called by 8: edl_walkem_rollup_storeet_count_targets_storepg_emit_axiset_emit_targets_coremain+2 calls 1: ss_r32 |
| 147 | func ec_weight(v: *u8) -> i64 { return ss_r32(v, 16) } |
| 148 | func ec_ev(v: *u8) -> i64 { return ss_r32(v, 20) } |
| 149 | func ec_evkind(v: *u8) -> i64 { return ss_r32(v, 24) } |
| 150 | func ec_evkind2(v: *u8) -> i64 { return ss_r32(v, 28) } |
| 156 | func ec_str(v: *u8, which: i64, out: *u8, cap: i64) -> i64 |
| 170 | func 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 |
| 179 | func 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 |
| 188 | func 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 |
| 198 | func permil_to_level(p: i64) -> i64 |
| 224 | func em_derive_level(evkind: i64, evlog: *u8, evpat: *u8, stored: i64) -> i64 |
| 266 | func em_domain_level(v: *u8, tout: *i64) -> i64 |
| 306 | func em_rollup_store(prefix: *u8, autolog: *u8, out: *i64, verbose: i64) -> i64 called by 9: mainmainmainem_emit_pagemainmain+3 calls 16: sys_mmapss_readallel_last_afterss_openec_keyss_hget+10 |
| 392 | func el_contains(buf: *u8, n: i64, pat: *u8) -> i64 |
| 399 | func et_mkid(domain: *u8, out: *u8) -> i64 |
| 409 | func et_should_emit(domain: *u8, cur: i64, bar: i64, qb: *u8, qn: i64) -> i64 |
| 417 | func et_count_targets_store(prefix: *u8, qb: *u8, qn: i64) -> i64 |
| 445 | func pg_thead(buf: *u8, off: i64) -> i64 |
| 449 | func pg_emit_axis(buf: *u8, off: i64, h: *i64, want: i64) -> i64 |
| 487 | func em_emit_page(prefix: *u8, autolog: *u8, outhtml: *u8) -> i64 |
| 526 | func et_emit_targets_core(store: *u8, qb: *u8, qn: i64, qf: i64, lf: i64, out: *i64) -> i64 |