code wiki / _hdl_build / nx_bite_sweep.nx
nx_bite_sweep.nx
buildroot/runtime/_hdl_build/nx_bite_sweep.nx
about
nx_bite_sweep.nx -- run the non-vacuity proof across every declared gate of a domain (closes seq1366).
nx_gate_bite answers "can THIS gate fail?" for one gate. This is the orchestration around it: walk a
domain's .gates, take each row's declared SUBJECT (field 3), and require every gate to kill a mutant.
Single responsibility kept separate on purpose (rule 9) -- measuring one gate and driving a fleet are
different jobs, and folding them into one organ is how a measurement tool grows a scheduler.
★NO SILENT CAPS. A row with no declared subject is reported as NO-SUBJECT and counted against the
domain, never skipped quietly. That distinction is the whole point: a gate we did not test and a gate
that cannot fail must not look the same in the output, or the sweep becomes the very thing it audits.
★WHY THE SUBJECT IS DECLARED, NOT DERIVED: the obvious convention (nx_X_gate.elf -> runtime/nx_X.nx) is
wrong often enough to matter -- nx_raci_gate's subject is runtime/_hdl_build/nx_raci.nx. A guessed path
that fails to open produces "no mutant killed", which reads identically to a vacuous gate. Guessing here
would manufacture false accusations against working gates.
usage: nx_bite_sweep <domain> [max_sites] (CWD = nxc2 root)
exit 0 = every declared gate BITES · 1 = at least one vacuous or untestable · 2 = usage/no gates
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_artifact_root.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
| 22 | const BS_MAGIC_65536: i64 = 65536 |
| 23 | const BS_MAGIC_65535: i64 = 65535 |
| 25 | const BS_MAXROW: i64 = 2048 |
functions
| 27 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 28 | func wn(v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 29 | func wf(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 } |
| 30 | func wnf(fd: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(fd,b,k); return 0 } |
| 32 | func bs_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 46 | func bs_field(buf: *u8, s: i64, e: i64, want: i64, out: *u8, cap: i64) -> i64 called by 1: main |
| 72 | func bs_target(elf: *u8, out: *u8) -> i64 called by 1: main |
| 88 | func bs_run(bite: *u8, target: *u8, subject: *u8, sites: *u8, outpath: *u8) -> i64 |
| 111 | func main(argc: i64, argv: *i64) -> i64 |