code wiki / _hdl_build / nx_analyst_gate.nx
nx_analyst_gate.nx
buildroot/runtime/_hdl_build/nx_analyst_gate.nx
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
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
structs
| none |
consts
| 11 | const AG_TOL_PPM: i64 = 5000 // interior closure tolerance: 0.5% |
| 12 | const AG_MIN_TP: i64 = 600 // <60.0% traced -> UNDERTRACED, no verdict allowed |
| 13 | const AG_MAX_RP: i64 = 150 // >15.0% unexplained residual -> SHENANIGAN, named |
functions
| 15 | func 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 } |
| 16 | func 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 } |
| 17 | func ag_w(s: *u8) -> i64 { return ag_wf(1, s) } |
| 18 | func ag_wn(v: i64) -> i64 { return ag_wnf(1, v) } |
| 24 | func ag_build(parent: *i64, value: *i64, kind: *i64) -> i64 called by 1: main |
| 37 | func main() -> i64 |