code wiki / (root) / nx_blockmax_wand_gate.nx

nx_blockmax_wand_gate.nx

buildroot/runtime/nx_blockmax_wand_gate.nx

4126 B60 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_blockmax_wand_gate.nx -- proves block-max pruning returns the EXACT top-k as exhaustive scoring while SCORING FEWER docs. Fixture: 3 query terms, per-(term,doc) impacts; k=3. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_blockmax_wand.nx nx_gate.nx nx_blockmax_wand_gate.nx

imports: nx_blockmax_wand.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write bmw_block_max bmw_exhaustive sys_mmap bmw_score sys_mmap ↻ bmw_find bmw_insert bmw_blockmax sys_mmap ↻ bmw_ub sys_mmap ↻ bmw_find ↻ bmw_score ↻ bmw_insert ↻ g_sort_desc g_eq gn sys_write ↻ sys_mmap ↻ g_sort_asc sys_openat_append gwf

structs

none

consts

none

functions

6func gwf(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} if fd>=0 { sys_write(fd,s,n) } return 0 }
called by 1: main
7func g_sort_desc(a: *i64, n: i64) -> i64 { var i: i64=0; while i<n { var j: i64=0; while j<n-1 { if a[j]<a[j+1] { let t: i64=a[j]; a[j]=a[j+1]; a[j+1]=t } j=j+1 } i=i+1 } return 0 }
called by 1: main
8func g_sort_asc(a: *i64, n: i64) -> i64 { var i: i64=0; while i<n { var j: i64=0; while j<n-1 { if a[j]>a[j+1] { let t: i64=a[j]; a[j]=a[j+1]; a[j+1]=t } j=j+1 } i=i+1 } return 0 }
called by 1: main
9func g_eq(a: *i64, b: *i64, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: main
11func main() -> i64