code wiki / (root) / nx_dr_refute_cli.nx

nx_dr_refute_cli.nx

buildroot/runtime/nx_dr_refute_cli.nx

4688 B91 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_refute_cli.nx -- callable MCP/API surface for the adversarial refutation stage (DR-2). Aggregates N verifier votes on a claim under a correlation estimate and decides KILL vs SURVIVE, encoding the decorrelation discount (correlated verifiers count less). nx_dr_refute <rho_permil> <bar_permil> <votes_csv> votes = comma-separated per-verifier verdicts: 0=refute 1=abstain 2=support rho_permil = estimated correlation among verifiers (0=independent, 1000=one voice) bar_permil = confidence bar in EFFECTIVE independent refutations (e.g. 2000 = 2 votes) e.g. nx_dr_refute 0 2000 0,0,0,0,2 -> {"killed":1,"verdict":"KILLED",...} nx_dr_refute 1000 2000 0,0,0,0,2 -> {"killed":0,"verdict":"SURVIVED",...} (correlated) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_dr_refute.nx nx_syscalls.nx nx_dr_refute_cli.nx

imports: nx_dr_refute.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 rb_puts sys_write rb_key rb_q sys_mmap sys_write ↻ rb_puts ↻ rb_q ↻ sys_exit rb_atoi sys_mmap ↻ rb_parse_csv rb_strlen rf_tally rf_effective_n rf_effective_refutes rf_effective_n ↻ rf_kill rf_effective_refutes ↻ rb_num sys_mmap ↻ sys_write ↻

structs

none

consts

13const K_MAGIC_1024: i64 = 1024

functions

15func rb_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: rb_keymain calls 1: sys_write
16func rb_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: rb_keymain calls 2: sys_mmapsys_write
17func rb_key(name: *u8) -> i64 { rb_q(); rb_puts(name); rb_q(); rb_puts(":" as *u8); return 0 }
called by 1: main calls 2: rb_qrb_puts
18func rb_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
30func rb_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: rb_parse_csv
31func rb_atoi(a: *u8) -> i64
called by 1: main
40func rb_parse_csv(s: *u8, out: *i64, maxn: i64) -> i64
called by 1: main calls 1: rb_strlen
53func main(argc: i64, argv: *i64) -> i64