code wiki / (root) / nx_queries_merge_gate.nx

nx_queries_merge_gate.nx

buildroot/runtime/nx_queries_merge_gate.nx

4658 B76 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_queries_merge_gate.nx -- the referee for nx_queries_merge_lib: a three-file union is row-aligned and space-joined, CRLF inputs merge without their CR, a mismatched id is REFUSED naming the row and input, a row-count mismatch is REFUSED naming the input, and a killed run leaves no half file (the write is tmp + rename). Fixtures live in /tmp/nx_queries_merge_gate/ (fixture-ratchet law), truncate-written at setup so the gate is idempotent. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_queries_merge_lib.nx nx_gate_verdict.nx nx_queries_merge_gate.nx

imports: nx_queries_merge_lib.nxnx_gate_verdict.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 ↻ qg_write qm_write_all sys_write ↻ qm_slen qm_cat qm_merge sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close qm_count_rows qm_row_at qm_ids_equal qm_cat ↻ sys_openat_wr qm_write_all ↻

structs

none

consts

9const QG_DIR: *u8 = "/tmp/nx_queries_merge_gate" as *u8
10const QG_A: *u8 = "/tmp/nx_queries_merge_gate/a.tsv" as *u8
11const QG_B: *u8 = "/tmp/nx_queries_merge_gate/b.tsv" as *u8
12const QG_C: *u8 = "/tmp/nx_queries_merge_gate/c.tsv" as *u8
13const QG_D: *u8 = "/tmp/nx_queries_merge_gate/d.tsv" as *u8
14const QG_E: *u8 = "/tmp/nx_queries_merge_gate/e.tsv" as *u8
15const QG_OUT: *u8 = "/tmp/nx_queries_merge_gate/out.tsv" as *u8
16const QG_OUT2: *u8 = "/tmp/nx_queries_merge_gate/out2.tsv" as *u8
17const QG_MODE_DIR: i64 = 493
18const QG_IN3: i64 = 3
19const QG_IN2: i64 = 2

functions

21func qg_write(p: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(p, QM_FILE_MODE); if fd < 0 { return 0 - 1 } qm_write_all(fd, s, qm_slen(s)); sys_close(fd); return 0 }
called by 1: main calls 2: qm_write_allqm_slen
22func qg_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main
23func qg_read_eq(p: *u8, want: *u8) -> i64
called by 1: main calls 1: qm_slen
33func main(argc: i64, argv: *i64) -> i64