code wiki / (root) / nx_mhtarget_gate.nx

nx_mhtarget_gate.nx

buildroot/runtime/nx_mhtarget_gate.nx

7936 B158 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_mhtarget_gate.nx -- BITE-PROOF for the MakeHuman target dialect, both directions. IT DRIVES THE SHIPPING CODE: every tooth calls nx_mhtarget_lib directly -- the same mht_probe, mht_decode, mht_row and mht_num_micro the CLI calls. FIXTURES ARE WRITTEN AT RUNTIME under /tmp/<gate>/ (bodies are plain constants -- no quote hazard in this dialect). Every path is unlinked before it is written (idempotence). Unlike the BodySlide sibling, the REAL corpus here is CC0 and already fetched -- the real-file verification rides the CLI smoke on the fetched corpus and the banked-mirror watch row; this gate proves the arithmetic and the refusals exactly. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_mhtarget_lib.nx nx_mhtarget_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_mhtarget_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 sys_mmap ↻ mg_slen mg_write sys_unlinkat sys_openat_wr sys_write ↻ sys_close gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_need gv_puts ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read

structs

none

consts

17const MG_DIR: *u8 = "/tmp/nx_mhtarget_gate" as *u8
18const MG_F_GOOD: *u8 = "/tmp/nx_mhtarget_gate/good.target" as *u8
19const MG_F_BAD: *u8 = "/tmp/nx_mhtarget_gate/bad.target" as *u8
20const MG_F_JUNK: *u8 = "/tmp/nx_mhtarget_gate/junk.txt" as *u8
21const MG_F_EMPTY: *u8 = "/tmp/nx_mhtarget_gate/empty.target" as *u8
22const MG_BUFCAP: i64 = 65536
23const MG_MAXROWS: i64 = 64
25const MG_R0_DX: i64 = 17000 // .017 -- the LEADING-DOT form the real corpus uses
26const MG_R0_DY: i64 = 0 - 50000 // -0.05
27const MG_R0_DZ: i64 = 0 // 0
28const MG_R1_DX: i64 = 1500000 // 1.5
29const MG_R1_DY: i64 = 0 // 0
30const MG_R1_DZ: i64 = 123000 // .123
31const MG_R2_DX: i64 = 0 - 1000 // -0.001
32const MG_R2_DY: i64 = 250000 // 0.25
33const MG_R2_DZ: i64 = 0 - 1000000 // -1 (whole negative)
35const MG_GOOD_BODY: *u8 = "# fixture comment one\n# fixture comment two\n17 .017 -0.05 0\n18 1.5 0 .123\n\n42 -0.001 0.25 -1\n" as *u8
36const MG_BAD_BODY: *u8 = "# one comment\n17 .017 -0.05 0\n19 abc 0 0\n21 1 1 1\n" as *u8
37const MG_JUNK_BODY: *u8 = "this prose has no four token numeric rows at all\nand neither does this line\n" as *u8

functions

39func mg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
40func mg_write(path: *u8, body: *u8, n: i64) -> i64
49func main(argc: i64, argv: *i64) -> i64