code wiki / _hdl_build / _eg_gate.nx
_eg_gate.nx
buildroot/runtime/_hdl_build/_eg_gate.nx
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
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
| 17 | func 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 } |
| 18 | func 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 } |
| 19 | func 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 } |
| 22 | func g_run(prog: *u8, a1: *u8, a2: *u8, a3: *u8) -> i64 |
| 45 | func g_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 57 | func g_body(path: *u8, out: *u8, cap: i64) -> i64 |
| 80 | func g_hash(buf: *u8, n: i64) -> i64 called by 1: main |
| 87 | func main() -> i64 |