code wiki / _hdl_build / nx_symdrop_gate.nx

nx_symdrop_gate.nx

buildroot/runtime/_hdl_build/nx_symdrop_gate.nx

9327 B170 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_symdrop_gate.nx -- proves the symbol-drop guard actually DETECTS a drop, and does not cry wolf. The tooth that matters is T5: a baseline symbol that is GONE from the current file must be reported. A guard that never fires is indistinguishable from no guard at all, and this one exists precisely because the failure it watches for (a stale whole-file write-back erasing a landed fix) leaves every other signal GREEN. So the fixtures below feed it a real removal and demand the alarm. The mirror teeth matter as much: additions and reorderings must NOT fire, or the sweep row goes RED on every normal edit and gets muted -- a muted alarm is worse than none. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_symdrop.nx nx_syscalls.nx nx_symdrop_gate.nx

imports: nx_symdrop.nxnx_syscalls.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 sg_cpy sd_symbols sd_starts sd_slen sd_identch sd_has sg_bite sg_puts sys_write sg_slen sd_fnv1a sd_hist_probe sd_slen ↻ sg_puts ↻ sg_putn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

13const SG_BUF: i64 = 65536
14const SG_OUT: i64 = 1

functions

16func sg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: sg_puts
17func sg_puts(s: *u8) -> i64 { sys_write(SG_OUT, s, sg_slen(s)); return 0 }
called by 2: sg_bitemain calls 2: sys_writesg_slen
18func sg_putn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
29func sg_bite(bad: i64, id: *u8, why: *u8) -> i64
called by 1: main calls 1: sg_puts
34func sg_cpy(dst: *u8, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[i] = s[i]; i = i + 1 } dst[i] = 0 as u8; return i }
called by 1: main
36func main(argc: i64, argv: *i64) -> i64