code wiki / _hdl_build / _an_honest.nx

_an_honest.nx source

↩ module page · 21 lines · 1253 B

1// _an_honest.nx -- HONEST analytics scoreboard runner: feeds the REAL census count 2// (4 PRESENT of 24 union features, r6_census.tsv) into the TEAM-AUTHORED verdict ladder 3// (_an_score, pe14 shape-4). Shows the measured number replacing the retracted "covered/PASS" 4// wave. The verdict ladder is author=emitter; this runner only scans+invokes (the scan half 5// generalizes to nx_census_run; the verdict half is the team-authored capability). 6import "_an_score.nx" 7import "nx_syscalls.nx" 8 9func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 10func wn(v: i64) -> i64 { let b: *u8=sys_mmap(8); var m: i64=v; if m<0{m=0-m; sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;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{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 } 11 12func main() -> i64 { 13 let present: i64 = 4 14 let v: i64 = _an_score_verdict(present) 15 w("HONEST-ANALYTICS present=" as *u8); wn(present) 16 w(" total=24 permil=" as *u8); wn(present * 1000 / 24) 17 w(" verdict_code=" as *u8); wn(v) 18 w(" (0=ABSENT-CLASS 1=PARTIAL 2=STRONG 3=EXCEED -- vs the retracted PASS/covered wave)\n" as *u8) 19 sys_exit(0) 20 return 0 21}