code wiki / (root) / nx_uxf_tsv_migrate.nx

nx_uxf_tsv_migrate.nx

buildroot/runtime/nx_uxf_tsv_migrate.nx

7291 B156 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind tooltopic uxf
docsdependenciesstructsconstsfunctions

about

nx_uxf_tsv_migrate.nx -- UXF arc R2: the ORIGINAL crash goal made real -- REPLACE A TSV. Reads a real registry TSV, turns EACH data row into a canonical content-addressed record (keys = positional column ids c0..cN, vals = the row's tab-separated fields), and stamps a profiled CID (UXF_DATA). General over ANY TSV (no per-file schema): skip '#' comment lines, split rows on TAB, positional keys. Proves on real data (Rule 7): T1 parsed real rows ; T2 row0 round-trips through nx_uxf_decode to the SAME CID ; T3 DEDUP -- the CID is field-ORDER-INDEPENDENT (canonicalization => same logical row => one CID, regardless of how the fields were ordered) ; T4 distinct rows => distinct CIDs. Composes the proven envelope: canon_encode + uxf_cid_profiled + canon_decode. No hardware writes (Rule 26). First corpus = sci_units.tsv (small/structured per the substrate spec). expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_uxf_cid.nx nx_uxf_decode.nx nx_uxf_tsv_migrate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_uxf_cid.nxnx_uxf_decode.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close mg_puts sys_write sys_exit mg_keyname sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap uxf_cid_profiled sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ uxf_nib_hex mg_cpcid mg_putn sys_mmap ↻

structs

none

consts

16const K_MAGIC_65536: i64 = 65536

functions

18func mg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
19func mg_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(1, "-" as *u8, 1) } let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { bb[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
21func mg_streq(a: *u8, b: *u8) -> i64
called by 1: main
32func mg_keyname(idx: i64, dst: *u8) -> i64
called by 1: main calls 1: sys_mmap
45func mg_cpcid(src: *u8, dst: *u8) -> i64 { var i: i64 = 0; while i < 73 { dst[i] = src[i]; i = i + 1 } return 0 }
called by 1: main
47func main() -> i64