code wiki / (root) / nx_rigbench_gate.nx

nx_rigbench_gate.nx

buildroot/runtime/nx_rigbench_gate.nx

9577 B134 linesdepth 6pulls 17 transitivereach 0 importersview sourcekind gate/prooftopic rigbench
docsdependenciesstructsconstsfunctions

about

nx_rigbench_gate.nx -- proves the REAL-CHARACTER REFEREE (nx_rigbench_lib) measures what it claims, then runs it on the house rig control ref9d (an artist-rigged character with SKEL, SKIN and a POSE library) so the M2 numbers are EMITTED for independent adjudication. Two layers: (1) the RULERS are proven on known answers with no file at all -- the artist-bone coverage bar is derived from a 3-joint skeleton whose bone lengths are declared, the SKIN L1 reads exactly zero on identical rows and exactly the maximum on rows sharing no joint (the neg-control that pins the scale); (2) the bench runs end to end on ref9d and every value it rests on is printed. This gate deliberately puts NO BAR on the deformation deviation: an uncalibrated ruler reports numbers, never verdicts, and the bar is set once the referee panel has graded the live surface. What it DOES assert is non-vacuity: the artist skeleton was read, our skeleton reached at least one artist joint, our weights are not disjoint from the artist's, the served player ran both rigs, and the mesh ruler judged them. SUBJECT: nx_rigbench_lib (rb_run, rb_mean_bone, rb_skin_l1), in-process. SKIPS (exit 3) with a named absence when ref9d is not on this host -- a laptop has no house rig. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_rigbench_lib.nx nx_rigbench_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_rigbench_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 ↻ sys_mkdir rg_kat_skel sys_mmap ↻ rb_mean_bone rb_jw rb_dist rb_jw ↻ gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap rb_leaves sys_mmap ↻ rb_jw ↻ rg_kat_skin sys_mmap ↻

structs

none

consts

17const RG_DIR: *u8 = "/tmp/nx_rigbench_gate"
18const RG_MODE_DIR: i64 = 493
19const RG_REF: *u8 = "sites/nishifamily/world/ref9d.nxa"
20const RG_POSE: i64 = 1
21const RG_CELLS: i64 = 96
22const RG_EXIT_SKIP: i64 = 3
24const RG_KAT_NJ: i64 = 3
25const RG_KAT_B1: i64 = 5000
26const RG_KAT_B2: i64 = 4000
27const RG_KAT_MEAN: i64 = 4500
28const RG_KAT_LEAVES: i64 = 1
30const RG_W_EQUAL: i64 = 1024
31const RG_L1_DISJOINT: i64 = 8192
32const RG_L1_DISJOINT_PERMIL: i64 = 2000
33const RG_SKIN_OTHER_BASE: i64 = 4
34const RG_KAT_NJ_SKIN: i64 = 8

functions

36func rgw(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 1: main calls 1: sys_write
37func rg_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
39func rg_kat_skel() -> *i64
called by 1: main calls 1: sys_mmap
53func rg_kat_skin(base: i64) -> *i64
called by 1: main calls 1: sys_mmap
61func main() -> i64