code wiki / _hdl_build / nx_source_grade_gate.nx

nx_source_grade_gate.nx

buildroot/runtime/_hdl_build/nx_source_grade_gate.nx

6248 B111 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic source
docsdependenciesstructsconstsfunctions

about

nx_source_grade_gate.nx -- ENGINEER gate for the SOURCE-CRITICISM organ (RACI: Builder authored nx_source_grade.nx, Engineer verifies here, Doctor heals on RED). KATs prove: the Admiralty cannot-judge states never act, the independence rule rejects echo-pairs and rewards opposed agreement, the score is monotone in every axis, the ICD-203 bands and the confidence/likelihood separation law hold, and grading is deterministic. Hand-computed expectations throughout. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_source_grade.nx nx_syscalls.nx nx_source_grade_gate.nx

imports: nx_source_grade.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 sg_score_permil sg_valid sg_rel_permil sg_cred_permil sg_party_permil sg_method_permil sg_actionable sg_fetch_owed sg_distinct sg_strength sg_has_opposed sg_independent sg_confidence sg_wep_band sg_separation_ok sg_is_reproducible sg_score_permil ↻ sgg_w sgg_wf sys_write sgg_wn sgg_wnf sys_mmap ↻ sys_write ↻ sys_openat_append sgg_wf ↻ sgg_wnf ↻ sys_close sys_exit

structs

none

consts

none

functions

10func sgg_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: sgg_wmain calls 1: sys_write
11func sgg_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: sgg_wnmain calls 2: sys_mmapsys_write
12func sgg_w(s: *u8) -> i64 { return sgg_wf(1, s) }
called by 1: main calls 1: sgg_wf
13func sgg_wn(v: i64) -> i64 { return sgg_wnf(1, v) }
called by 1: main calls 1: sgg_wnf
15func main() -> i64