code wiki / _hdl_build / nx_record_tsv_gate.nx

nx_record_tsv_gate.nx

buildroot/runtime/_hdl_build/nx_record_tsv_gate.nx

6513 B150 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic record
docsdependenciesstructsconstsfunctions

about

nx_record_tsv_gate.nx -- referee for the TSV <-> NXR1 compatibility bridge (seq1326 rung 2). T1 IS THE TOOTH THAT MAKES ADOPTION SAFE: a real tab-delimited line survives tsv -> NXR1 -> tsv BYTE-IDENTICAL. Without that, migrating a plane's physical format silently rewrites its data and every legacy reader is a liar. With it, a plane can be stored as NXR1 today and its existing decoders keep reading the exact same bytes (rule 19) until each is migrated deliberately. T5 IS THE TOOTH THAT KEEPS THE BRIDGE HONEST: a record holding a value TSV cannot represent must be REFUSED at render time, not silently emitted as extra columns. T6 is its non-vacuity partner -- the same record with the offending byte removed MUST render fine, proving T5 refuses because of the TAB and not because rendering is simply broken. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate.nx nx_record_tsv.nx nx_record_tsv_gate.nx

imports: nx_gate.nxnx_record_tsv.nx

imported by: nobody (leaf or entry point)

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

main rtv_to_nxr nxr_init nxr_w16 nxr_add_i64 nxr_w16 ↻ nxr_w32 nxr_w64 nxr_r16 rtv_atoi nxr_add nxr_w16 ↻ nxr_w32 ↻ nxr_r16 ↻ rtv_to_tsv nxr_find nxr_valid nxr_r16 ↻ nxr_r32 nxr_r16 ↻ nxr_r32 ↻ rtv_itoa sys_munmap nxr_r64 sys_munmap ↻ rg_same nxr_get_i64 sys_mmap nxr_find ↻ nxr_r64 ↻ sys_munmap ↻ nxr_count nxr_r16 ↻ nxr_init ↻ nxr_add ↻ gw sys_write rg_row gw ↻ gn

structs

none

consts

17const RG_TEETH: i64 = 8
18const RG_BUF: i64 = 4096
19const RG_A: i64 = 97
20const RG_B: i64 = 98
21const RG_C: i64 = 99
22const RG_X: i64 = 120
23const RG_Y: i64 = 121
24const RG_Z: i64 = 122
25const RG_D4: i64 = 52
26const RG_D2: i64 = 50
27const RG_TAB9: i64 = 9
28const RG_VAL42: i64 = 42
29const RG_DEF: i64 = 0 - 7
30const RG_TINYCAP: i64 = 2

functions

32func rg_row(name: *u8, ok: i64) -> i64
called by 1: main calls 1: gw
37func rg_same(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
44func main() -> i64