code wiki / _hdl_build / nx_analyst_gate.nx

nx_analyst_gate.nx

buildroot/runtime/_hdl_build/nx_analyst_gate.nx

6579 B112 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic analyst
docsdependenciesstructsconstsfunctions

about

nx_analyst_gate.nx -- ENGINEER gate for the ANALYST organ (RACI: Builder authored nx_analyst.nx, the ENGINEER verifies it here, the Doctor heals only on RED). KATs prove the four verdicts fire for the right reasons, tampers prove the gate goes RED when common-wisdom sneaks in or the arithmetic breaks, and the paradox lens is checked against a hand-computed fixed-point value. Synthetic ledger shaped like the AC case (equipment/labor/permits/channel) -- REAL corroborated numbers live in nx_analyst_case_ac.nx, not here. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_analyst.nx nx_syscalls.nx nx_analyst_gate.nx

imports: nx_analyst.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap ag_build an_ledger_verdict an_closure_fails an_is_leaf an_children_sum an_closure_ppm an_narrative_admitted an_traced_cents an_is_leaf ↻ an_traced_permil an_residual_permil an_residual_cents an_verdict an_closure_fails ↻ an_traced_cents ↻ an_traced_permil ↻ an_residual_permil ↻ an_narrative_admitted ↻ an_fetch_tasks_owed an_verdict ↻ an_price_per_complexity an_paradox_q10 an_price_per_complexity ↻ an_is_reproducible an_ledger_verdict ↻ ag_w ag_wf sys_write ag_wn ag_wnf sys_mmap ↻ sys_write ↻ sys_openat_append ag_wf ↻ ag_wnf ↻ sys_close sys_exit

structs

none

consts

11const AG_TOL_PPM: i64 = 5000 // interior closure tolerance: 0.5%
12const AG_MIN_TP: i64 = 600 // <60.0% traced -> UNDERTRACED, no verdict allowed
13const AG_MAX_RP: i64 = 150 // >15.0% unexplained residual -> SHENANIGAN, named

functions

15func ag_wf(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 2: ag_wmain calls 1: sys_write
16func ag_wnf(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 }
called by 2: ag_wnmain calls 2: sys_mmapsys_write
17func ag_w(s: *u8) -> i64 { return ag_wf(1, s) }
called by 1: main calls 1: ag_wf
18func ag_wn(v: i64) -> i64 { return ag_wnf(1, v) }
called by 1: main calls 1: ag_wnf
24func ag_build(parent: *i64, value: *i64, kind: *i64) -> i64
called by 1: main
37func main() -> i64