code wiki / _hdl_build / nx_semantic_gap_gate.nx

nx_semantic_gap_gate.nx

buildroot/runtime/_hdl_build/nx_semantic_gap_gate.nx

8933 B115 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic semantic
docsdependenciesstructsconstsfunctions

about

nx_semantic_gap_gate.nx -- HONEST measurement of the SEMANTIC GAP (answers the operator's doubt "are we really exceed doing semantic work?" with a number, not an opinion). Our search is LEXICAL (BM25/BM25F = "literal matches of the query words", cited sem_search.raw). This gate runs NATURAL-LANGUAGE queries -- the way a real person types -- through the LIVE nx_onsite_search client over the real andelinwest corpus, and counts how many land the semantically-correct practice page at rank #1. A LOW score is the POINT: it proves, measured, that lexical search does NOT understand meaning -> we are NOT exceed on semantics. The fix is the PARTNERSHIP (BM25 retrieve + LLM rerank = RAG, cited sem_rag.raw), which is unbuilt here. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_semantic_gap_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 s_puts sys_write s_index sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 s_num sys_mmap ↻ sys_write ↻ sys_exit ↻ s_write_file sys_openat_wr ↻ sys_write ↻ s_strlen sys_close

structs

none

consts

none

functions

10func s_puts(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 2: s_rowmain calls 1: sys_write
11func s_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); 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 i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 2: s_rowmain calls 2: sys_mmapsys_write
12func s_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
calls 1: sys_write
13func s_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); 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 i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
14func s_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: s_write_files_find
16func s_write_file(path: *u8, data: *u8) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, data, s_strlen(data)); sys_close(fd); return 0 }
17func s_read_small(path: *u8, buf: *u8, cap: i64) -> i64
24func s_index(a1: *u8, a2: *u8, a3: *u8, a4: *u8) -> i64
36func s_client(sites: *u8, site: *u8, terms: *i64, nt: i64, out_path: *u8) -> i64
48func s_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: s_top_iss_row calls 1: s_strlen
55func s_top_is(buf: *u8, n: i64, expected: *u8) -> i64
called by 1: s_row calls 1: s_find
68func s_row(sites: *u8, label: *u8, terms: *i64, nt: i64, expect: *u8, obuf: *u8) -> i64
81func main() -> i64