code wiki / _hdl_build / nx_kanon_gate.nx
nx_kanon_gate.nx
buildroot/runtime/_hdl_build/nx_kanon_gate.nx
about
nx_kanon_gate.nx -- GATE (runnable) proving the k-anonymity floor primitive (nx_kanon). The
foundation under ADS-018 + W-AN-CHARTER-002 / W-CLI-C6. K is read FROM THE SOVEREIGN STORE
(adcfg:kanon_k -- pure Nishi, no conf file). Controls are parametrized by the configured K, and
the load-bearing control proves the VIOLATION DETECTOR fires (anti-false-green):
release: count==K and count>K and count==0 are releasable; count==K-1 and count==1 suppressed
apply : over [K, K-1, 0, K+5] exactly ONE cell (K-1) is suppressed; released set has 0 leaks
DETECT : a wrongly-"released" set containing K-1 makes kn_count_below FIRE (==1) -> proves the
checker catches a leak; stuck-at-0 would RED-fail this control.
Evidence -> knowledge/status/kanon_gate.log (KANON authored=organ cells_below_k=0 ... verdict=GREEN).
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_ad_store.nxnx_kanon.nxnx_syscalls.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
| 17 | const KG_LOG: *u8 = "knowledge/status/kanon_gate.log" |
functions
| 19 | func kg_w(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 } |
| 20 | func kg_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;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(fd, bb, k); return 0 } |
| 22 | func kg_emit(fd: i64, k: i64, sup: i64, below: i64, fired: i64, ok: i64) -> i64 |
| 31 | func main() -> i64 |