code wiki / _hdl_build / nx_ecomat_lib.nx

nx_ecomat_lib.nx

buildroot/runtime/_hdl_build/nx_ecomat_lib.nx

46743 B836 linesdepth 8pulls 16 transitivereach 44 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 5 imports · 22 importers

nx_seg_store.nx nx_syscalls.nx nx_comparetree_lib.nx nx_maturity_auditor.nx nx_compare_growth_json.nx nx_ecomat_lib.nx nx_ecomat_beat.nx nx_ecomat_beat_gate.nx nx_ecomat_domledger_lib.nx nx_ecomat_evprobe.nx nx_ecomat_page.nx nx_ecomat_page_gate.nx nx_ecomat_put.nx nx_ecomat_put_gate.nx nx_ecomat_requirements_gate_t120.n nx_ecomat_seed.nx

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

imports: nx_seg_store.nxnx_syscalls.nxnx_comparetree_lib.nxnx_maturity_auditor.nxnx_compare_growth_json.nx

imported by: nx_ecomat_beat.nxnx_ecomat_beat_gate.nxnx_ecomat_domledger_lib.nxnx_ecomat_evprobe.nxnx_ecomat_page.nxnx_ecomat_page_gate.nxnx_ecomat_put.nxnx_ecomat_put_gate.nxnx_ecomat_requirements_gate_t120.nxnx_ecomat_seed.nxnx_ecomat_seed_clobber_gate.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

20const ECOMAT_STORE: *u8 = "knowledge/store/ecomat"
24const ECOMAT_REC_STRBASE: i64 = 32
28const ECOMAT_DOM_CAP: i64 = 128
29const ECOMAT_NR_CAP: i64 = 160
30const ECOMAT_EVLOG_CAP: i64 = 256
31const ECOMAT_EVPAT_CAP: i64 = 64
311const ECOMAT_AUTO_STALE_S: i64 = 172800
454const EPC_MODE_LOG: i64 = 0x1a4
709const EM_REQUIREMENT_COUNT:i64=6

functions

33func el_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
34func _p(s: *u8) -> i64 { let n: i64=el_len(s); sys_write(1,s,n); return 0 }
35func _fp(fd: i64, s: *u8) -> i64 { let n: i64=el_len(s); sys_write(fd,s,n); return 0 }
36func _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 }
37func 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 }
38func 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 }
41func el_last_after(buf: *u8, n: i64, pat: *u8) -> i64
67func el_last_green(buf: *u8, n: i64, pat: *u8) -> i64
85func ec_axis_label(a: i64) -> *u8 { if a==0 { return "DEPTH" as *u8 } if a==1 { return "BREADTH" as *u8 } return "META" as *u8 }
86func 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 }
89func ec_key(k: i64, out: *u8) -> i64
101func ec_putstr(buf: *u8, cap: i64, off: i64, s: *u8) -> i64
called by 1: ec_pack calls 1: el_len
116func ec_reclen(domain: *u8, bench: *u8, nextrung: *u8, evlog: *u8, evpat: *u8, evlog2: *u8, evpat2: *u8) -> i64
135func 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
148func ec_axis(v: *u8) -> i64 { return ss_r32(v, 0) }
149func ec_layer(v: *u8) -> i64 { return ss_r32(v, 4) }
calls 1: ss_r32
150func ec_cur(v: *u8) -> i64 { return ss_r32(v, 8) }
151func ec_bar(v: *u8) -> i64 { return ss_r32(v, 12) }
152func ec_weight(v: *u8) -> i64 { return ss_r32(v, 16) }
153func ec_ev(v: *u8) -> i64 { return ss_r32(v, 20) }
called by 1: em_rollup_store calls 1: ss_r32
154func ec_evkind(v: *u8) -> i64 { return ss_r32(v, 24) }
called by 2: mainem_domain_level calls 1: ss_r32
155func ec_evkind2(v: *u8) -> i64 { return ss_r32(v, 28) }
called by 2: mainem_domain_level calls 1: ss_r32
161func ec_str(v: *u8, which: i64, out: *u8, cap: i64) -> i64
175func 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
184func 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
193func 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
203func permil_to_level(p: i64) -> i64
229func em_derive_level(evkind: i64, evlog: *u8, evpat: *u8, stored: i64) -> i64
271func em_domain_level(v: *u8, tout: *i64) -> i64
316func em_rollup_store(prefix: *u8, autolog: *u8, out: *i64, verbose: i64) -> i64
437func el_contains(buf: *u8, n: i64, pat: *u8) -> i64
455func em_plan_coverage(logpath: *u8) -> i64
520func em_axes_known_guard(fd: i64, permil: i64, axes: i64, partial: i64) -> i64
called by 1: main calls 2: _fn_fp
528func et_mkid(domain: *u8, out: *u8) -> i64
538func et_should_emit(domain: *u8, cur: i64, bar: i64, qb: *u8, qn: i64) -> i64
546func et_count_targets_store(prefix: *u8, qb: *u8, qn: i64) -> i64
574func pg_thead(buf: *u8, off: i64) -> i64
called by 1: em_emit_page calls 1: ss_cat
578func pg_emit_axis(buf: *u8, off: i64, h: *i64, want: i64) -> i64
616func em_emit_page(prefix: *u8, autolog: *u8, outhtml: *u8) -> i64
655func et_emit_targets_core(store: *u8, qb: *u8, qn: i64, qf: i64, lf: i64, out: *i64) -> i64
710func em_req_id(i:i64)->*u8
called by 1: em_req_validate
719func em_req_label(i:i64)->*u8
called by 1: em_req_validate
728func em_req_is(b:*u8,p:i64,e:i64,col:i64,s:*u8)->i64
called by 1: em_req_validate calls 1: pb_equal
732func em_req_validate(b:*u8,n:i64)->i64
769func em_req_key(col:i64,kind:i64)->*u8
called by 1: em_req_rows
782func em_req_rows(w:*JsonWriter,b:*u8,n:i64,kind:i64)->i64
804func em_requirements_into(b:*u8,n:i64,out:*u8,cap:i64)->i64
821func em_req_capacity(s:*u8)->i64
called by 2: mainmain
826func em_requirements_run(path:*u8,inputcap:i64,outputcap:i64)->i64