code wiki / _hdl_build / _eg_gate.nx

_eg_gate.nx

buildroot/runtime/_hdl_build/_eg_gate.nx

7198 B129 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic eg
docsdependenciesstructsconstsfunctions

about

_eg_gate.nx -- gate for the GENERALIZED emitter-of-emitters (X-AUT-006e-GEN, the daemon-class rung). nx_eoe.nx proved the keystone on a BOUNDED shape (depth-counting loops). THIS gate proves the generalization removed the ceiling: the ORGAN nx_eg pretty-prints an emitter whose CONTROL FLOW (socket/bind/listen/`while accept`/`if cfd<0 continue`/fork/flat-if /health dispatch/send) is ABSENT from every prior emitter, FROM A STRUCTURAL-DATA spec, byte-identical to a hand reference, hands-off. NO mocks. The gate runs the REAL nx_eg ELF to (1) author the daemon from spec 1 and assert its spec-synthesized BODY is byte-identical to the hand reference _eg_httpd_ref.nx (PROOF-2 + PROOF-1 regression guard in one: the generalized walker re-authors the reference byte-identical), and (2) re-author with tamper=1 (one F_ARG0 route literal flipped) and assert the authored BODY now DIFFERS (NO-FAKE-GREEN: a green here cannot be reached by constant-lifting -- the control flow + route are synthesized from the spec table, so flipping a spec field changes the emitted source). Compile + bind + GET /health 200 are proven by the driver harness; this gate proves the AUTHORSHIP invariants that constant-lifting provably cannot satisfy. Evidence -> knowledge/status/eg.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx _eg_gate.nx

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

main g_p sys_write sys_openat_append g_run sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ g_body sys_mmap ↻ g_read sys_openat_rd sys_read sys_close g_hash g_fn sys_mmap ↻ sys_write ↻ g_fp sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻ sys_exit ↻

structs

none

consts

none

functions

17func g_p(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
18func g_fp(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
19func g_fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; 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 }
called by 1: main calls 2: sys_mmapsys_write
22func g_run(prog: *u8, a1: *u8, a2: *u8, a3: *u8) -> i64
45func g_read(path: *u8, buf: *u8, cap: i64) -> i64
57func g_body(path: *u8, out: *u8, cap: i64) -> i64
called by 1: main calls 2: sys_mmapg_read
80func g_hash(buf: *u8, n: i64) -> i64
called by 1: main
87func main() -> i64