code wiki / (root) / nx_dr_run_cli.nx

nx_dr_run_cli.nx

buildroot/runtime/nx_dr_run_cli.nx

4076 B81 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_run_cli.nx -- callable MCP/API surface for the real-text judge stage (DR-0 rung-2). Given a fetched document and a list of groundtruth-insight strings, computes which insights the document actually supports (token-containment >= threshold) and the DRBench insight-recall. nx_dr_run <threshold_permil> <document_text> <insight_1> [insight_2 ...] e.g. nx_dr_run 500 "the co-scientist system uses a tournament of ideas" "tournament of ideas" "liver fibrosis" -> {"document_tokens":8,"n_insights":2,"covered":1,"insight_recall_permil":500,"insights":[...]} license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_dr_run.nx nx_itoa_lib.nx nx_dr_verify.nx nx_dr_drbench.nx nx_syscalls.nx nx_dr_run_cli.nx

imports: nx_dr_run.nxnx_itoa_lib.nxnx_dr_verify.nxnx_dr_drbench.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rn_puts sys_write rn_key rn_q sys_mmap sys_write ↻ rn_puts ↻ rn_q ↻ sys_exit rn_atoi sys_mmap ↻ drr_tokenize drr_hash drr_strlen dv_entail dv_contains dr_frac dr_sum rn_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

13const K_MAGIC_8192: i64 = 8192
14const K_MAGIC_2048: i64 = 2048

functions

16func rn_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: rn_keymain calls 1: sys_write
17func rn_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: rn_keymain calls 2: sys_mmapsys_write
18func rn_key(name: *u8) -> i64 { rn_q(); rn_puts(name); rn_q(); rn_puts(":" as *u8); return 0 }
called by 1: main calls 2: rn_qrn_puts
23func rn_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
24func rn_atoi(a: *u8) -> i64
called by 1: main
34func main(argc: i64, argv: *i64) -> i64