code wiki / (root) / nx_ir_eval_gate.nx

nx_ir_eval_gate.nx

buildroot/runtime/nx_ir_eval_gate.nx

3059 B63 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic ir
docsdependenciesstructsconstsfunctions

about

nx_ir_eval_gate.nx -- KAT for nx_ir_eval (the search-SOTA ruler). Native sovereign lane; exit 0 = all pass, N = assertion N failed. Every asserted value is either exact-by-construction (rank-1 discount is log2(2)=1.0; an already-ideal ranking has nDCG==1.0 because DCG==IDCG) or a plain integer ratio (MRR/Recall/Precision/AP) -- so the KAT verifies the summation/ordering logic bit-exactly without depending on fx_log2's internal bits for non-powers-of-two, which are checked by inequality/ordering instead.

dependencies 3 imports · 0 importers

fx.nx syscalls.nx nx_ir_eval.nx nx_ir_eval_gate.nx

imports: fx.nxsyscalls.nxnx_ir_eval.nx

imported by: nobody (leaf or entry point)

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

main fx_from_int fx_from_frac ie_dcg_at_k fx_log2_int fx_log2 fx_mul fx_from_int ↻ fx_div fx_from_int ↻ ie_ndcg_at_k ie_sort_desc ie_dcg_at_k ↻ fx_div ↻ ie_mrr fx_from_frac ↻ ie_recall_at_k fx_from_frac ↻ ie_hits_at_k ie_precision_at_k fx_from_frac ↻ ie_hits_at_k ↻ ie_ap fx_from_frac ↻ fx_div ↻ fx_from_int ↻

structs

none

consts

none

functions

14func main() -> i64