code wiki / _hdl_build / nx_voxchunk_gate.nx

nx_voxchunk_gate.nx

buildroot/runtime/_hdl_build/nx_voxchunk_gate.nx

11060 B265 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_voxchunk_gate.nx -- CERTIFICATION of nx_voxchunk (gamebench gap-queue rank 1: voxel-world-chunked). The craft world is a FIXED volume; the capability's bar is Minecraft-class STREAMING: unbounded land through a bounded resident set. Each tooth is one way real chunked engines die: T1 DETERMINISTIC REGEN -- load->evict->reload of virgin land is bit-identical; two worlds same seed agree T2 EDITS SURVIVE EVICTION -- a dirty chunk is flushed (nx_gamesave) before slot reuse and reloaded from disk, not regenerated; losing edits on eviction is THE chunk-corruption class T3 BOUNDED RESIDENCY -- a 200-chunk walk never exceeds `cap` resident chunks; memory is bounded BY CONSTRUCTION, and evictions actually happened (the bound was exercised, not idle) T4 SEAM + GEN CONSISTENCY -- world-coordinate access at chunk borders matches the pure height function on both sides of the seam, resident or not T5 WHOLE-WALK DETERMINISM -- two worlds, same seed, same 300-op edit/read script with eviction churn -> identical probes and identical live checksum T6 SESSION DURABILITY -- flush + whole-arena gs_save -> load into a ZEROED arena -> identical continued behaviour; knowledge/nx_voxchunk_world.sav is the board evidence T7 ANTI-VACUITY -- distinct chunks genuinely differ, edits genuinely change blocks, the disk path was genuinely taken (flushes>0, disk_loads>0) T8 BOUNDED + LOUD -- out-of-range y / block value refuse with a DISTINCT code and change nothing license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_voxchunk.nx nx_voxchunk_gate.nx

imports: nx_syscalls.nxnx_voxchunk.nx

imported by: nobody (leaf or entry point)

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

main vxc_words sys_unlinkat sys_mmap vxc_path vxc_itoa_at sys_mmap ↻ vxc_init vxc_o_slot chunksig vxc_get vxc_cdiv vxc_ensure vxc_find vxc_cap vxc_o_slot ↻ vxc_o_slot ↻ vxc_victim vxc_cap ↻ vxc_o_slot ↻ vxc_flush_slot vxc_o_slot ↻ sys_mmap ↻ vxc_path ↻ vxc_blocks gs_save vxc_disk_load sys_mmap ↻ vxc_path ↻ vxc_blocks ↻ gs_load sys_mmap ↻ sys_read_file get64 gs_cksum vxc_gen vxc_height vxc_hash vxc_hash ↻ vxc_blocks ↻

structs

none

consts

21const K_MAGIC_6364136223: i64 = 6364136223
22const K_MAGIC_1442695041: i64 = 1442695041
23const K_MAGIC_20260730: i64 = 20260730
24const K_MAGIC_4242: i64 = 4242
25const K_MAGIC_31337: i64 = 31337
26const K_MAGIC_60631: i64 = 60631
27const K_MAGIC_1785430000: i64 = 1785430000

functions

29func vlcg(s: *i64) -> i64 { s[0] = ((s[0]*K_MAGIC_6364136223)+K_MAGIC_1442695041) & 0x7FFFFFFFFFFF; return s[0] }
called by 1: main
31func chunksig(a: *i64, cx: i64, cz: i64) -> i64
called by 1: main calls 1: vxc_get
49func churn(a: *i64, base: i64, n: i64) -> i64
called by 1: main calls 1: vxc_get
55func main() -> i64