code wiki / (root) / nx_tar_gate.nx

nx_tar_gate.nx

buildroot/runtime/nx_tar_gate.nx

7641 B185 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic tar
docsdependenciesstructsconstsfunctions

about

nx_tar_gate.nx -- proves the USTAR reader/writer by ROUND-TRIP. T4 builds a real two-file archive and walks it back, recovering both names, both sizes and every content byte. Symmetric proof: only a correct pair can pass, since a writer bug and a matching reader bug would still have to agree with the absolute assertions in T1-T3. T2 pins OCTAL, not binary: size 8 must be the ASCII digits "10", because tar's numeric fields are octal text. A binary writer produces headers that look fine in a hex dump and no tar on earth can read. T6 pins the two-block terminator. One zero block is not an archive end; readers scan for two. T7 is the integrity proof: corrupt one header byte and the entry must be REFUSED by checksum, then restored and re-accepted so the test is shown to have measured that byte. NON-VACUITY: T8 covers refusals -- an over-long name, an oversize field, a short output buffer and a bad magic must each be rejected. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tar.nx nx_tar_gate.nx

imports: nx_syscalls.nxnx_tar.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 nxtar_octal_w nxtar_octal_r nxtar_header_build nxtar_strlen nxtar_octal_w ↻ nxtar_checksum nxtar_checksum ↻ nxtar_append nxtar_header_build ↻ nxtar_finalize nxtar_read nxtar_octal_r ↻ nxtar_checksum ↻ g_puts sys_write sys_exit g_putn sys_mmap ↻ sys_write ↻

structs

none

consts

none

functions

26func g_puts(s: *u8) -> i64
called by 1: main calls 1: sys_write
33func g_putn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
46func main() -> i64