code wiki / _hdl_build / nx_loottable_gate.nx

nx_loottable_gate.nx

buildroot/runtime/_hdl_build/nx_loottable_gate.nx

8871 B211 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_loottable_gate.nx -- CERTIFICATION of nx_loottable (the LAST hard GAP on the gamebench board). T1 ★EVERY TIER REACHABLE -- 100k rolls must observe every declared tier at least once. This is the off-by-one killer: legendaries that can never drop. T2 ★DISTRIBUTION MATCHES DECLARED WEIGHTS -- observed frequency per tier within 10% relative of expected T3 DETERMINISM -- the same seed yields the identical item (tier, affixes, values) T4 NO DUPLICATE AFFIXES -- across 20k items, no item carries the same affix twice T5 VALUES IN RANGE -- every rolled value lies within its affix's declared [lo,hi] T6 TIER DRIVES AFFIX COUNT -- higher tiers grant more affixes, exactly as the data says T7 ★ANTI-VACUITY -- items genuinely VARY across seeds. A generator returning one fixed item would satisfy determinism, range and no-duplicate perfectly. T8 composes with nx_gamesave: a rolled item round-trips through save/load license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_loottable.nx nx_gamesave.nx nx_loottable_gate.nx

imports: nx_syscalls.nxnx_loottable.nxnx_gamesave.nx

imported by: nobody (leaf or entry point)

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

main lw sys_write sys_mmap lt_roll sys_mmap ↻ lt_rng lt_pick lt_affix_count ln sys_write ↻ sys_mmap ↻ lt_affix_count ↻ sys_unlinkat gs_save sys_mmap ↻ put64 gsc_put64 gs_cksum gsc_fold_bytes joinsuf slen sys_mmap ↻ sys_openat_wr sys_write ↻ sys_fsync sys_close sys_unlinkat ↻ gs_exists sys_openat_rd sys_close ↻ sys_renameat gs_load sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻

structs

none

consts

none

functions

17func lw(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
18func ln(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
28func main() -> i64