code wiki / _hdl_build / nx_text_wrap_gate.nx
nx_text_wrap_gate.nx
buildroot/runtime/_hdl_build/nx_text_wrap_gate.nx
about
nx_text_wrap_gate.nx -- KAT verdict gate for the shared word-level line breaker tw_next_break. Proves
it breaks at SPACES (not mid-word), packs greedily, hard-breaks an over-long word, and returns len when
the rest fits. Also a property check over a real sentence: every non-final break lands right AFTER a
space (no word is split). LIAR-KILL: an obviously-wrong expected break is rejected. 100% sovereign.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_text_wrap.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 g_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 } |
| 10 | func pn(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 11 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 12 | func chkv(got: i64, want: i64, label: *u8, pass: *i64) -> i64 |
| 18 | func chk(cond: i64, label: *u8, pass: *i64) -> i64 |
| 24 | func main() -> i64 |