code wiki / _hdl_build / nx_phys3d_gate.nx

nx_phys3d_gate.nx

buildroot/runtime/_hdl_build/nx_phys3d_gate.nx

10776 B238 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_phys3d_gate.nx -- gate for the unified sovereign rigid-body core (the 07-01 census's named gap). The CLASSIC engine proofs, all integer-deterministic: T1 integrator exactness (free fall matches the loop-computed analytic sum EXACTLY) T2 restitution: e=0.5 bounce apex ~1/4 of drop height; e=0 body RESTS on the ground and stays T3 THE STACK: 8 dynamic boxes on a static ground -- 1200 ticks, bounded drift, ALL ASLEEP at the end T4 friction is real: mu=0.78 slider STOPS; mu=0 slider KEEPS SLIDING (same push, same ticks) T5 determinism: two worlds, same script -> all body slots IDENTICAL after 500 ticks T6 elastic head-on equal masses: velocities SWAP integer-exact (e=1) T7 inelastic head-on (e=0): both stop (momentum symmetric) license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_phys3d.nx nx_phys3d_gate.nx

imports: nx_syscalls.nxnx_phys3d.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap ph_bytes ph_init ph_hdr ph_acc ph_warm ph_tgt ph_add ph_hdr ↻ ph_body ph_step ph_hdr ↻ ph_body ↻ ph_pair ph_body ↻ ph_isqrt ph_contact ph_body ↻ ph_acc ↻ ph_warm ↻ ph_tgt ↻ ph_imax ph_isqrt ↻ ph_min ph_min ↻ ph_imax ↻ ph_acc ↻ ph_warm ↻ ph_tgt ↻ ph_body ↻ hw sys_write pn sys_mmap ↻ sys_write ↻ mk_ground ph_add ↻ gabs ph_set_vel

structs

none

consts

none

functions

14func hw(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
15func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
27func gabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
29func mk_ground(base: i64) -> i64 { return ph_add(base, 1, 0, 0 - 512, 0, 100000, 512, 100000, 0, 0, 200) }
called by 1: main calls 1: ph_add
31func main() -> i64