code wiki / (root) / nx_parquet_gate.nx

nx_parquet_gate.nx

buildroot/runtime/nx_parquet_gate.nx

24227 B448 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_parquet_gate.nx -- GATE for the sovereign parquet reader (nx_parquet_lib), driven IN-PROCESS. Every wire rule the reader relies on is proven on PLANTED bytes with a known answer and a neg-control that must refuse: thrift varints and zigzag (a 150, a -1, an eleven-byte overrun, a truncated one), field headers (short and long form, delta accumulation, STOP), list headers (short and long form), the container skipper (a nested struct, a map, and a nesting deeper than the bound), the RLE and bit-packed hybrid (an RLE run, a bit-packed group, a mixed stream, width zero, a truncated run, a count over capacity), snappy (literal plus copies of all three offset widths, an overlapping copy, an offset before the buffer, a declared length the stream does not produce, an output that does not fit), and pq_open (not a parquet file, a footer length past the file, a truncated tail, a footer length bumped by five bytes). Then the REAL bytes: the BRIGHT pony examples and documents files (search.refs brightds26, pinned in knowledge/fetched) must reproduce the counts the dataset card declares (112 examples, 7894 documents), resolve a list column by its column name and not by its element name, reconstruct 2219 gold_ids over 112 rows with repetition levels, decode the first query and the first ids to their known bytes, refuse an out-of-range leaf or row group, and write the documents TSV deterministically (two writes byte-identical, 7894 rows, no null rows, the first row starting with the first document id). The real-file teeth SKIP, never acquit, when the fixtures are absent. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_parquet_lib.nx nx_parquet_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_parquet_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_head gv_puts sys_write 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 ↻ sys_mkdir sys_mmap ↻ tc_init gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap tc_varint tc_byte tc_zz tc_varint ↻ tc_field tc_byte ↻ tc_zz ↻ tc_list_head tc_byte ↻

structs

none

consts

21const G_ROOT: *u8 = "/tmp/nx_parquet_gate"
22const G_NOTPQ: *u8 = "/tmp/nx_parquet_gate/not_parquet.bin"
23const G_BADLEN: *u8 = "/tmp/nx_parquet_gate/footer_past_eof.parquet"
24const G_TRUNC: *u8 = "/tmp/nx_parquet_gate/truncated.parquet"
25const G_BUMPED: *u8 = "/tmp/nx_parquet_gate/footer_bumped.parquet"
26const G_TSV_A: *u8 = "/tmp/nx_parquet_gate/docs_a.tsv"
27const G_TSV_B: *u8 = "/tmp/nx_parquet_gate/docs_b.tsv"
28const G_EX_A: *u8 = "knowledge/fetched/cmp_search_bright_examples_pony.parquet"
29const G_EX_B: *u8 = "../knowledge/fetched/cmp_search_bright_examples_pony.parquet"
30const G_DOC_A: *u8 = "knowledge/fetched/cmp_search_bright_documents_pony.parquet"
31const G_DOC_B: *u8 = "../knowledge/fetched/cmp_search_bright_documents_pony.parquet"
32const G_NOTPQ_BYTES: *u8 = "hello world, not a parquet file"
33const G_MODE_DIR: i64 = 0x1ed
34const G_I64: i64 = 8
35const G_FIX_CAP: i64 = 128
36const G_OUT_CAP: i64 = 64
37const G_OUT_SMALL: i64 = 4
38const G_TRUNC_KEEP: i64 = 20000
39const G_BUMP: i64 = 5
40const G_DEEP: i64 = 70
41const G_CH_A: i64 = 97
42const G_CH_B: i64 = 98
43const G_CH_C: i64 = 99
44const G_CH_D: i64 = 100
45const G_CH_E: i64 = 101
46const G_CH_F: i64 = 102
47const G_CH_X: i64 = 120
48const G_CH_Z: i64 = 122
49const G_BAD_LEAF: i64 = 99
50const G_BAD_RG: i64 = 5
52const G_EX_ROWS: i64 = 112
53const G_EX_LEAVES: i64 = 7
54const G_EX_RGS: i64 = 1
55const G_EX_LEAF_QUERY: i64 = 0
56const G_EX_LEAF_ID: i64 = 2
57const G_EX_LEAF_GOLD: i64 = 5
58const G_EX_GOLD_ENTRIES: i64 = 2219
59const G_EX_GOLD_DICT: i64 = 43
60const G_EX_PAGES: i64 = 2
61const G_EX_ENCMASK_RLE_DICT: i64 = 256
62const G_EX_QUERY0_LEN: i64 = 237
63const G_QUERY_PREFIX: *u8 = "I will use the programming language pony"
64const G_DOC_ROWS: i64 = 7894
65const G_DOC_RGS: i64 = 8
66const G_DOC_LEAVES: i64 = 2
67const G_DOC_TSV_BYTES: i64 = 2317793
68const G_DOC_FIRST_ID: *u8 = "Pony/src-builtin-runtime_options-_1.txt"
69const G_SNAPPY_OUT: *u8 = "abcdefabcdz"
70const G_SNAPPY_OUT_LEN: i64 = 11
71const G_SNAPPY2_OUT: *u8 = "abcdabcd"
72const G_SNAPPY2_OUT_LEN: i64 = 8
73const G_SNAPPY3_OUT: *u8 = "aaaaa"
74const G_SNAPPY3_OUT_LEN: i64 = 5
75const G_HYBRID_N: i64 = 8
76const G_HYBRID_MIXED_N: i64 = 10
77const G_RLE_N: i64 = 5
78const G_RLE_VALUE: i64 = 3
79const G_VARINT_150: i64 = 150
80const G_LIST_LONG: i64 = 20

functions

82func g_slen(s: *u8) -> i64
87func g_write_bytes(path: *u8, buf: *u8, n: i64) -> i64
100func g_starts(buf: *u8, off: i64, len: i64, s: *u8) -> i64
called by 2: g_bytes_aremain calls 1: g_slen
107func g_bytes_are(buf: *u8, off: i64, len: i64, s: *u8) -> i64
called by 1: main calls 2: g_sleng_starts
111func g_files_equal(a: *u8, b: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
126func g_open2(pq: *i64, a: *u8, b: *u8) -> i64
called by 1: main calls 1: pq_open
132func g_read2(a: *u8, b: *u8, lenp: *i64) -> *u8
called by 1: main calls 1: sys_read_file
140func main() -> i64