code wiki / (root) / nx_abstat_gate.nx

nx_abstat_gate.nx

buildroot/runtime/nx_abstat_gate.nx

8987 B151 linesdepth 7pulls 11 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_abstat_gate.nx -- THE REFEREE FOR THE A/B CONTRAST CORE (nx_abstat_lib). A statistics organ is the one kind of organ whose output nobody can eyeball, so every claim it makes has to be bitten here. The teeth below are ordered by what they would cost if they were wrong: a detector that fires on noise is worse than no detector, so the false-positive control comes before the sensitivity one. Every tooth prints the numbers it tested (gv_check_eq / gv_kv), because a PASS-only gate is unfalsifiable from the outside and makes an independent second method structurally impossible. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_abstat_lib.nx nx_abstat_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_abstat_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap ab_welford_matches_incumbe _mc_welford_update ab_init ab_push ab_valid ab_base ab_base ↻ ab_crit_t_q10 _mv_bonferroni_critical_t_ gv_check ↻ ab_min_n abg_region

structs

none

consts

14const ABG_N: i64 = 40 // comfortably over NX_MC_MIN_N so the sample floor is not what is under test
15const ABG_TIGHT: i64 = 100 // a run of 100 samples for the below-MDE tooth

functions

18func abg_saw(i: i64, centre: i64, spread: i64) -> i64
called by 2: abg_fillmain
27func abg_fill(r: *i64, axis: i64, arm: i64, n: i64, centre: i64, spread: i64) -> i64
called by 1: main calls 2: ab_pushabg_saw
33func abg_region() -> *i64
called by 1: main calls 2: sys_mmapab_init
39func main() -> i64