code wiki / _hdl_build / nx_bite_sweep.nx

nx_bite_sweep.nx

buildroot/runtime/_hdl_build/nx_bite_sweep.nx

10997 B231 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_artifact_root.nx nx_bite_sweep.nx

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

main w sys_write sys_exit sys_mmap bs_read sys_openat_rd sys_read sys_close ar_resolve ar_resolve_with ar_exists sys_openat_rd ↻ sys_close ↻ sys_mmap ↻ ar_read sys_openat_rd ↻ sys_read ↻ sys_close ↻ bs_field bs_target bs_run sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4 wn sys_mmap ↻ sys_write ↻ sys_openat_wr ↻ wf sys_write ↻ wnf sys_mmap ↻ sys_write ↻ sys_now_realtime_sec sys_mmap ↻

structs

none

consts

22const BS_MAGIC_65536: i64 = 65536
23const BS_MAGIC_65535: i64 = 65535
25const BS_MAXROW: i64 = 2048

functions

27func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
28func 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 }
called by 1: main calls 2: sys_mmapsys_write
29func 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 }
called by 1: main calls 1: sys_write
30func 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 }
called by 1: main calls 2: sys_mmapsys_write
32func bs_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
46func bs_field(buf: *u8, s: i64, e: i64, want: i64, out: *u8, cap: i64) -> i64
called by 1: main
72func bs_target(elf: *u8, out: *u8) -> i64
called by 1: main
88func bs_run(bite: *u8, target: *u8, subject: *u8, sites: *u8, outpath: *u8) -> i64
111func main(argc: i64, argv: *i64) -> i64