code wiki / (root) / nx_dr_ocm_cli.nx

nx_dr_ocm_cli.nx

buildroot/runtime/nx_dr_ocm_cli.nx

4363 B89 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_ocm_cli.nx -- callable MCP/API surface for the opportunity-cost ranker (DR-6). Ranks candidate research vectors by Priority=(V*M)/C, reports each pick's OPPORTUNITY COST (forgone best alternative), and does budget-aware greedy selection. nx_dr_ocm <budget> [v m c]... v=value m=momentum c=cost (per vector, 3 ints) e.g. nx_dr_ocm 10 8 9 3 9 8 6 5 10 1 10 10 10 -> {"tool":"nx_dr_ocm","selected":3,"spent":10,"forgone_priority":10000,"ranking":[...]} license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_dr_ocm.nx nx_itoa_lib.nx nx_syscalls.nx nx_dr_ocm_cli.nx

imports: nx_dr_ocm.nxnx_itoa_lib.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 oc_puts sys_write oc_key oc_q sys_mmap sys_write ↻ oc_puts ↻ oc_q ↻ sys_exit oc_atoi sys_mmap ↻ ocm_fill_priorities ocm_priority ocm_rank sys_mmap ↻ ocm_opp_cost ocm_select oc_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

none

functions

12func oc_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: oc_keymain calls 1: sys_write
13func oc_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: oc_keymain calls 2: sys_mmapsys_write
14func oc_key(name: *u8) -> i64 { oc_q(); oc_puts(name); oc_q(); oc_puts(":" as *u8); return 0 }
called by 1: main calls 2: oc_qoc_puts
19func oc_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
20func oc_atoi(a: *u8) -> i64
called by 1: main
30func main(argc: i64, argv: *i64) -> i64