code wiki / _hdl_build / nx_math_gate_emit.nx
nx_math_gate_emit.nx
buildroot/runtime/_hdl_build/nx_math_gate_emit.nx
about
nx_math_gate_emit.nx -- PATTERN EMITTER: MATH_GATE (GATE_AUTHORING shape).
The Builder authors a live-oracle ULP gate from DATA -- edge raws, band
descriptors, function/oracle names -- with the PROVEN helper templates baked
in. Motivation (measured, 2026-06-10 session): every defect found while
closing ch4 was in a HAND-WRITTEN gate, never in a team organ --
(1) unmasked >>63 sign-extension, (2) flat identity bars at large args,
(3) raw-literal arithmetic slips. Template (1) is impossible here (the
helpers mask), (3) shrinks to the data rows, (2) stays oracle-gate domain.
Emits a SINGLE-FUNCTION gate: kernelfn vs oraclefn, banded xorshift points +
edge list, signed-ordered-map ULP, GREEN iff worse=0.
strs: [0]=gatepath [1]=MARKER [2]=kernelfn [3]=oraclefn [4..4+ni) imports
nums: [0]=ni [1]=seed [2]=npoints [3]=signrandom [4]=nedges
[5..5+nedges) edge raws, then 8 = 4 x (efbase, efmask)
license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_pattern_emit.nx
imported by: nx_math_gate_demo.nx
structs
| none |
consts
| none |
functions
| 19 | func mge_wlit(fd: i64, v: i64) -> i64 |
| 29 | func mge_author(strs: *i64, nums: *i64) -> i64 |