code wiki / (root) / nx_xport_gate.nx

nx_xport_gate.nx

buildroot/runtime/nx_xport_gate.nx

24216 B503 linesdepth 5pulls 16 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_xport_gate.nx -- GATE for DC12: one authored asset into four consumers, measured by one ruler. The claim under test is not "the exporters run". It is that the geometry a consumer RECEIVES is the geometry that was authored, within a bound that was derived rather than chosen. So every number below comes back OUT OF AN ARTIFACT ON DISK, and the ruler is nx_mmdev's md_measure -- the estate's one millimetre deviation ruler, already proven to read a known 5.0 mm lift as 5.0 mm. Three things make this more than a green light: - a POSITIVE CONTROL: the source measured against ITSELF must read exactly zero on every axis, so the ruler is known to be wired and oriented before any consumer claim rests on it; - an ANTI-VACUITY tooth: one vertex is moved a known 3.0 mm and must be DETECTED at 3.0 mm, so a comparator that always answered zero could not pass; - a MIRROR that has ZERO deviation and is still wrong. It is here because it proves the deviation ruler alone is insufficient, which is the entire reason orientation and scale are separate axes. The fixture is assembled at RUNTIME under /tmp/nx_xport_gate so this gate never shares scratch with a production beat, and it is idempotent: re-running overwrites its own artifacts and asserts nothing about what was there before. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_vecmath.nx nx_nxmesh_lib.nx nx_mmdev_lib.nx nx_xport_lib.nx nx_xport_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_vecmath.nxnx_nxmesh_lib.nxnx_mmdev_lib.nxnx_xport_lib.nx

imported by: nobody (leaf or entry point)

structs

none

consts

29const XG_DIR: *u8 = "/tmp/nx_xport_gate"
30const XG_EMPTY: *u8 = "/tmp/nx_xport_gate/empty"
31const XG_MODE_0755: i64 = 493
36const XG_SUB: i64 = 4
37const XG_BX: i64 = 4000
38const XG_BY: i64 = 17000
39const XG_BZ: i64 = 2500
40const XG_FACES: i64 = 6
44const XG_PERT: i64 = 30
47const XG_PI: i64 = 1
48const XG_PJ: i64 = 1
49const XG_FACE_PX: i64 = 3
53const XG_SLACK: i64 = 2
56const XG_SCALE_NUM: i64 = 5
57const XG_SCALE_DEN: i64 = 4

functions

59func xg_tpf() -> i64 { return 2 * XG_SUB * XG_SUB }
60func xg_ntris() -> i64 { return XG_FACES * xg_tpf() }
61func xg_pert_tri() -> i64 { return XG_FACE_PX * xg_tpf() + 2 * (XG_PJ * XG_SUB + XG_PI) }
66func xg_facetab(t: *i64) -> i64
75func xg_pt(t: *i64, f: i64, a: i64, b: i64, axis: i64) -> i64
79func xg_box(buf: *u8) -> i64
121func xg_copy(src: *u8, dst: *u8) -> i64
130func xg_perturb(buf: *u8) -> i64
147func xg_mirror(src: *u8, dst: *u8) -> i64
169func xg_rescale(src: *u8, dst: *u8) -> i64
190func xg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
191func xg_near(a: i64, b: i64) -> i64
200func xg_report(res: *i64, c: i64) -> i64
227func xg_teeth(res: *i64, c: i64, n1: *u8, n2: *u8, n3: *u8, n4: *u8, n5: *u8, ctr: *i64) -> i64
246func main() -> i64