_simhash_popcount_gate.nx
buildroot/runtime/_simhash_popcount_gate.nx
about
_simhash_popcount_gate.nx -- byte-identity KAT for SPD-ALG-SEARCH-01 (search-popcount-swar).
Proves nx_simhash_hamming (now the SWAR nx_bits_popcount64_soft) returns the EXACT Hamming
distance over ALL distances 0..64 + sign-bit/high-bit vectors (the SWAR arithmetic-shift hazard),
with a NEG control proving the gate has teeth (a constant-returning impl is rejected). The old
64-iter bit-test loop and the new SWAR both equal popcount(a^b), so equality here = byte-identical.
Emits the SPDGATE probe the speed census (speed_audit_ref.tsv) re_has-matches. Sovereign native
lane: exit 0 = GREEN, N = first failed assertion. Judge by exit/printed marker (LM-010), one build+run.
dependencies 2 imports · 0 importers
imports: syscalls.nxnx_simhash.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const SG_LOG: *u8 = "knowledge/status/speed_gate.log" |
functions
| 13 | func gw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } called by 1: main |
| 15 | func main() -> i64 |