code wiki / _hdl_build / nx_palmdoc_gate.nx

nx_palmdoc_gate.nx

buildroot/runtime/_hdl_build/nx_palmdoc_gate.nx

2963 B47 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_palmdoc_gate.nx -- de-risk the PalmDOC codec (the MOBI text compression) BEFORE the fixture/decoder build on it. Round-trips a string with REPEATS (exercises 0x80-0xBF back-references) + UTF-8 high bytes (exercises the 0x01 literal-escape path) and asserts compress->decompress is BYTE-IDENTICAL + actually compresses. expect_exit:0

dependencies 3 imports · 0 importers

nx_palmdoc.nx nx_syscalls.nx nx_gate_verdict.nx nx_palmdoc_gate.nx

imports: nx_palmdoc.nxnx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gp sys_write gslen sys_mmap palmdoc_compress palmdoc_decompress gn sys_write ↻ sys_mmap ↻ sys_write ↻ gv_ctr sys_mmap ↻ gv_verdict gv_puts sys_write ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close sys_munmap ↻ sys_exit

structs

none

consts

none

functions

8func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
9func gn(v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(1,"-" as *u8,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48 as u8;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 }
called by 1: main calls 2: sys_writesys_mmap
10func gslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
12func main() -> i64