code wiki / _hdl_build / nx_ascii_kat.nx
nx_ascii_kat.nx
buildroot/runtime/_hdl_build/nx_ascii_kat.nx
about
nx_ascii_kat.nx -- EXHAUSTIVE differential gate for nx_ascii (HONESTY SYSTEM weak point reach=267; used
across lexer/formatter/strconv/path -- a boundary bug there cascades). For ALL 256 byte values, each
classifier must equal the independently-computed ASCII ground truth -> catches every off-by-one at every
boundary at once (stronger than the in-file smoke). Self-validating: ground truth is inlined, not the organ.
license_tier: ORIGINAL expect_exit:0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_ascii.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
| none |
functions
| 9 | func aw(s: *u8) -> i64 { var n:i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 10 | func an(v: i64) -> i64 { let b:*u8=sys_mmap(24); var m:i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t:*u8=sys_mmap(24); 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 j:i64=0; while j<k{b[j]=t[k-1-j];j=j+1} sys_write(1,b,k); return 0 } |
| 13 | func gt_digit(c: i64) -> i64 { if c>=48 { if c<=57 { return 1 } } return 0 } |
| 14 | func gt_lower(c: i64) -> i64 { if c>=97 { if c<=122 { return 1 } } return 0 } |
| 15 | func gt_upper(c: i64) -> i64 { if c>=65 { if c<=90 { return 1 } } return 0 } |
| 16 | func gt_alpha(c: i64) -> i64 { if gt_lower(c)==1 { return 1 } return gt_upper(c) } |
| 17 | func gt_alnum(c: i64) -> i64 { if gt_alpha(c)==1 { return 1 } return gt_digit(c) } |
| 18 | func gt_hex(c: i64) -> i64 { if gt_digit(c)==1 { return 1 } if c>=97 { if c<=102 { return 1 } } if c>=65 { if c<=70 { return 1 } } return 0 } |
| 19 | func gt_space(c: i64) -> i64 { if c==32 { return 1 } if c==9 { return 1 } if c==10 { return 1 } if c==13 { return 1 } if c==11 { return 1 } if c==12 { return 1 } return 0 } called by 1: main |
| 20 | func gt_print(c: i64) -> i64 { if c>=32 { if c<=126 { return 1 } } return 0 } called by 1: main |
| 21 | func gt_id_start(c: i64) -> i64 { if gt_alpha(c)==1 { return 1 } if c==95 { return 1 } return 0 } |
| 22 | func gt_id_cont(c: i64) -> i64 { if gt_alnum(c)==1 { return 1 } if c==95 { return 1 } return 0 } |
| 24 | func main() -> i64 |