code wiki / (root) / nx_swhid_gate.nx

nx_swhid_gate.nx

buildroot/runtime/nx_swhid_gate.nx

7673 B136 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_swhid_gate.nx -- GATE for nx_swhid_lib (SWHID, ISO/IEC 18670:2025). EVERY EXPECTED VALUE BELOW WAS PRODUCED BY AN INDEPENDENT IMPLEMENTATION -- git 2.49.0's `git hash-object --stdin` -- and NOT by this code, not by hand, and not from memory. That is the difference between a test and a tautology: a suite whose expectations are computed by the subject passes for any self-consistent bug. This is the estate's ORACLE evidence class: agreement with an independent implementation over published inputs. The vectors were chosen to cross the constructions that actually break: 0 bytes -- the empty-object case a digit loop silently drops 1, 3 bytes -- below one SHA-1 block two 3-byte inputs -- same LENGTH, different CONTENT (a header-only hash would collide them) 11, 12 bytes -- with and without a trailing newline 64 bytes -- EXACTLY one SHA-1 block, before the header pushes it over 256, 1000 bytes -- multi-block, and past the length where the decimal digit count changes license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_swhid_lib.nx nx_swhid_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_swhid_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_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 ↻ swg_fill sys_mmap ↻ gv_check gv_puts ↻ swg_is sys_mmap ↻ swhid_cnt sys_mmap ↻ sw_cat sw_decimal sys_mmap ↻ sys_munmap sha1 sys_mmap ↻ sha1_process_block if_ge sw_hex sys_munmap ↻ swg_lit sw_len

structs

none

consts

none

functions

22func swg_is(data: *u8, n: i64, want: *u8) -> i64
called by 1: main calls 2: sys_mmapswhid_cnt
35func swg_fill(c: i64, n: i64) -> *u8
called by 1: main calls 1: sys_mmap
42func swg_lit(s: *u8) -> *u8
called by 1: main calls 2: sw_lensys_mmap
51func main(argc: i64, argv: *i64) -> i64