code wiki / _hdl_build / nx_reader_xray_gate.nx

nx_reader_xray_gate.nx

buildroot/runtime/_hdl_build/nx_reader_xray_gate.nx

8489 B141 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic reader
docsdependenciesstructsconstsfunctions

about

nx_reader_xray_gate.nx -- liar-kill gate for the sovereign book-intrinsic X-Ray (nx_reader_xray). Rebuilds the Alice fixture end-to-end, runs the X-Ray TWICE, and asserts on the REAL xray.json: correctness : Alice present, count==6, first==0, ranked #1 (before Rabbit & White Rabbit); bigram "White Rabbit" detected; standalone "Rabbit" detected; nterms==3. determinism : run #1 and run #2 produce BYTE-IDENTICAL xray.json (no random, no clock, no order drift). liar-kill : title noise ("Chapter") ABSENT, sentence-opener/stopwords ("I"/"She"/"There") ABSENT, below-threshold one-offs ("DRINK ME", count 1 < MINOCC) ABSENT. If any leaks, FAIL. GREEN = the X-Ray is a correct, deterministic, noise-free index -- NOT "we beat Kindle". Self-contained, sovereign (fork/exec, no shell). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_reader_xray_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main xp sys_write spawn sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit ↻ xn sys_write ↻ sys_mmap ↻ sys_write ↻ xfind xslen xfrom xslen ↻ xint xhas xfind ↻

structs

none

consts

none

functions

12func xp(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
13func xn(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
14func xslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: xfindxfrom
16func spawn(path: *u8, a0: *u8, a1: *u8, redir: *u8) -> i64
37func xfind(hay: *u8, hl: i64, needle: *u8) -> i64
called by 2: xhasmain calls 1: xslen
49func xhas(hay: *u8, hl: i64, needle: *u8) -> i64 { if xfind(hay, hl, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: xfind
51func xint(hay: *u8, hl: i64, pos: i64) -> i64
called by 1: main
61func xfrom(hay: *u8, hl: i64, start: i64, needle: *u8) -> i64
called by 1: main calls 1: xslen
68func main() -> i64