code wiki / _hdl_build / nx_search_inverted_persist_test.nx

nx_search_inverted_persist_test.nx

buildroot/runtime/_hdl_build/nx_search_inverted_persist_test.nx

2830 B47 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic search
docsdependenciesstructsconstsfunctions

about

nx_search_inverted_persist_test.nx -- proves the inverted-index disk persistence round-trips: build an index from a real seed corpus (seed/object_specs.jsonl), query a term, SAVE to disk, LOAD back, query the same term, and verify identical n_rows + postings_count + query_hash. This is the S-class STORAGE rung: build once over a corpus, persist, query forever (no re-tokenize). Exit 0 iff the loaded index returns identical results.

dependencies 1 imports · 0 importers

nx_search_inverted_persist.nx nx_search_inverted_persist_tes

imports: nx_search_inverted_persist.nx

imported by: nobody (leaf or entry point)

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

main sp nx_inv_build_from_jsonl sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close nx_inv_new_sized nx_inv_index_row nx_inv_is_token_char nx_inv_hash_bytes_lower nx_inv_add_posting nx_inv_count_token nx_inv_slot_at nx_inv_slot_hash nx_inv_slot_set_hash nx_inv_slot_set_postings_c nx_inv_slot_postings_count nx_inv_finalize_offsets nx_inv_slot_at ↻ nx_inv_slot_hash ↻ nx_inv_slot_postings_count ↻ nx_inv_slot_set_postings_o nx_inv_slot_set_write_curs nx_inv_emit_row nx_inv_is_token_char ↻ nx_inv_hash_bytes_lower ↻ nx_inv_emit_posting nx_inv_slot_at ↻ nx_inv_slot_hash ↻ nx_inv_slot_postings_count ↻ nx_inv_slot_postings_offse nx_inv_slot_write_cursor nx_inv_slot_set_write_curs ↻ nx_inv_query_term nx_inv_hash_bytes_lower ↻ nx_inv_lookup_slot nx_inv_slot_at ↻

structs

none

consts

none

functions

7func sp(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
8func sn(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;k=1}; while m>0{t[k]=48+(m%10);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 1: main
10func main() -> i64