code wiki / _hdl_build / _diff_cmp_gate_authored.nx
_diff_cmp_gate_authored.nx
buildroot/runtime/_hdl_build/_diff_cmp_gate_authored.nx
about
_diff_cmp_gate_authored.nx -- gate for R1-T1-002 (dual-lane compare).
No mocks: the REAL organ elf over the REAL corpus through BOTH real
toolchains, twice. Checks:
ROWS-8 batch=8 produces exactly 8 DIFFCMP rows (run 1)
SUM-GREEN summary row present, instrument verdict GREEN
PARTITION agree+disagree == 8 (extracted from the summary)
REPRO-TEETH disagree>0 -> DIFFBUG row present AND the _dgbug repro file
exists (live divergence already known: _dgp0); disagree==0
-> trivially pass with a printed note (honest conditional)
DET run 2 agree count == run 1 agree count (determinism)
Markers: DCG-*; final DCGATE row -> knowledge/status/diff_cmp.log
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| none |
functions
| 16 | func dcg_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func dcg_f(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 } |
| 18 | func dcg_n(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 } |
| 20 | func dcg_chk(label: *u8, ok: i64, bad: *i64) -> i64 |
| 27 | func dcg_spawn(elf: *u8, a1: *u8, outpath: *u8) -> i64 |
| 46 | func dcg_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 56 | func dcg_count(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 74 | func dcg_extract(buf: *u8, n: i64, pat: *u8, occ: i64) -> i64 called by 1: main |
| 109 | func main() -> i64 |