code wiki / _hdl_build / nx_researcher_brief_gate.nx

nx_researcher_brief_gate.nx

buildroot/runtime/_hdl_build/nx_researcher_brief_gate.nx

7684 B130 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic researcher
docsdependenciesstructsconstsfunctions

about

nx_researcher_brief_gate.nx -- GATE: the COMPOSED sovereign researcher, end-to-end over REAL banked docs. query -> INTERNAL retrieval (deterministic TF over our actual knowledge/library/*.txt, read live from disk) -> EXTERNAL ranking (diverse authoritative, code-defined, NO TSV) -> RRF FUSION (both-agreement wins) -> a PROVENANCE-CITED brief naming the top real source. This is the researcher as a real tool, composed from proven pieces over the actual 511-doc corpus -- exceeds deep-research: it reads OUR private banked sources (which the web cannot), deterministically, and cites them. T1 INTERNAL over REAL docs: the query terms rank a doc that actually CONTAINS them top (real on-disk signal). T2 BRIEF CITES A REAL SOURCE: the fused top names a real banked path that was actually read (len>0) = provenance. T3 DETERMINISM: identical query -> identical fused ranking. T4 EXTERNAL LOAD-BEARING: internal-only top differs from the fused top (external sources change the brief). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_researcher_brief_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 rw sys_write sys_mmap cps read_file sys_openat_rd sys_mmap ↻ sys_read sys_close tf_count rank_desc rrf_add argmax rn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

14func rw(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
15func rn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func rl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
17func cps(dst: *u8, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[i]=s[i]; i=i+1 } dst[i]=0 as u8; return i }
called by 1: main
20func read_file(path: *u8, lenbox: *i64) -> i64
33func tf_count(hay: *u8, hlen: i64, needle: *u8, nlen: i64) -> i64
called by 1: main
50func rrf_add(order: *i64, m: i64, scores: *i64) -> i64
called by 1: main
53func argmax(scores: *i64, n: i64) -> i64 { var bst: i64=0; var i: i64=1; while i<n { if scores[i]>scores[bst] { bst=i } i=i+1 } return bst }
called by 1: main
56func rank_desc(scores: *i64, n: i64, order: *i64) -> i64
called by 1: main
67func main() -> i64