code wiki / (root) / nx_uxf_decode_gate.nx

nx_uxf_decode_gate.nx

buildroot/runtime/nx_uxf_decode_gate.nx

4744 B95 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic uxf
docsdependenciesstructsconstsfunctions

about

nx_uxf_decode_gate.nx -- the D001 MIGRATION of nx_uxf_decode_test onto nx_gate_verdict (2026-09-06). This is the operator's HOUSE-OF-CARDS fix made mechanical: a reader that preserves fields it does not understand, proven by CID EQUALITY after a round-trip rather than by inspection. It is the load-bearing half of law 4 (data and functionality on independent clocks), and it was unpromotable because the original hand-rolls its counters and verdict line, so nothing outside could read its outcome. ALL FOUR TEETH PRESERVED IN ORDER AND PREDICATE. What changes: gv_check owns the counting so declared and executed cannot diverge, the neg-control is NAMED so the gate-law census can find it, and gv_kv emits the three CIDs and the field count so this gate's GREEN can be contradicted by anyone who re-encodes the record. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_gate_verdict.nx nx_syscalls.nx nx_canon_cid.nx nx_uxf_cid.nx nx_uxf_decode.nx nx_uxf_decode_gate.nx

imports: nx_gate_verdict.nxnx_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 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_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni

structs

none

consts

18const UD_PTRTAB: i64 = 64
19const UD_DECTAB: i64 = 128
20const UD_CANON: i64 = 4096
21const UD_CIDBUF: i64 = 128
22const UD_NFIELDS: i64 = 3
23const UD_KNOWN_FIELDS: i64 = 2 // what an INTOLERANT reader would keep: it does not know 'c'
24const UD_MAXDEC: i64 = 16

functions

26func ud_streq(a: *u8, b: *u8) -> i64
called by 1: main
36func main(argc: i64, argv: *i64) -> i64