code wiki / _hdl_build / nx_benchmark_ref_gate.nx
nx_benchmark_ref_gate.nx
buildroot/runtime/_hdl_build/nx_benchmark_ref_gate.nx
about
nx_benchmark_ref_gate.nx -- liar-kill gate for the durable benchmark-reference registry (operator: "benchmarks
must exist SEPARATE or you appear to hallucinate and use them"). Proves, mechanically, for the two references this
session leaned on (the HUFF/CDIC algorithm + the MOBI spec):
(1) REAL, not hallucinated -- nx_benchmark_ref verify re-hashes the stored bytes; cid must match the meta.
(2) REALLY THE CITED THING -- the stored bytes contain the expected markers (huffcdic.py: load_huff/CDIC/Python
"import struct"; MOBI spec: "17480"/"HUFF").
(3) SEPARATE, not used -- the sovereign organ nx_huffcdic.nx is a DIFFERENT LANGUAGE (NishiLang func/->i64,
and even names its fn huff_load vs the ref's load_huff = clean-room) and contains NO Python ("def "/"import
struct"/"self.") and reads NO ref ("knowledge/benchmarks"); its only import is nx_syscalls.
GREEN = the benchmarks exist as separate, verifiable, unused artifacts -- killing both the "hallucinated" and the
"secretly used" appearances. expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| none |
functions
| 14 | func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 15 | func gnum(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 } |
| 16 | func ghas(hay: *u8, hl: i64, needle: *u8) -> i64 called by 1: main |
| 23 | func rd(path: *u8, lenp: *i64) -> *u8 { lenp[0]=0; return sys_read_file(path, lenp) } |
| 25 | func spawn(path: *u8, a0: *u8, a1: *u8, redir: *u8) -> i64 |
| 46 | func main() -> i64 |