code wiki / _hdl_build / nx_eoe_oplist.nx

nx_eoe_oplist.nx

buildroot/runtime/_hdl_build/nx_eoe_oplist.nx

5670 B103 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic eoe
docsdependenciesstructsconstsfunctions

about

nx_eoe_oplist.nx -- EMITTER-OF-EMITTERS, GENERALITY RUNG 2: COMPUTATION-from-spec. WHY (the value): the team's autonomous-capability keystone is the emitter-of- emitters (nx_eoe, X-AUT-006c/e) -- the parser's DUAL: a STRUCTURAL SPEC as DATA -> pretty-print NishiLang SOURCE -> nx_cc compiles it (codegen DELEGATED to the compiler the team owns). nx_eoe synthesizes control-flow DEPTH (N nested loops) from {depth,bound}; the COMPUTATION it performs is a FIXED shape (sum of index products). This organ takes the next generality rung: the spec is now an ARBITRARY OP-LIST (a sequence of operations as DATA), so the COMPUTATION itself is synthesized from the spec -- DIFFERENT op-lists emit DIFFERENT programs with DIFFERENT correct results, which a fixed-shape emitter provably cannot do. This is a MEASURED step up the generality ladder toward general organ synthesis (the end of which would let the team self-author organs + close the Claude-authored- scaffold debt). HONEST SCOPE: this synthesizes a single linear arithmetic function -- NOT yet functions/types/imports/syscalls, so NOT yet "back-fill a TLS server"; it is ONE rung, not the summit. nx_eoe_oplist <basename> <start> <op...> op = a<n> | m<n> | s<n> a<n> = acc + n, m<n> = acc * n, s<n> = acc - n (applied left-to-right) -> writes runtime/_hdl_build/<basename>.nx whose main() applies the op-list to <start> and prints "RESULT=<acc>\n". Compile+run via nx_sov_build_run. no-false-green plan (X-AUT-006d, mirrors nx_eoe's validation): two DIFFERENT op-lists compile + compute DIFFERENT correct results; tampering one op changes the result. Sovereign, no gcc/.sh. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_eoe_oplist.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 eol_p sys_write eol_atoi_from sys_mmap eol_cat eol_catn eol_catn ↻ sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close

structs

none

consts

27const K_MAGIC_65536: i64 = 65536

functions

29func eol_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
30func eol_catn(dst: *u8, off: i64, v: i64) -> i64
called by 2: eol_catnmain calls 2: eol_catnsys_mmap
42func eol_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
44func eol_atoi_from(s: *u8, from: i64) -> i64
called by 1: main
50func main(argc: i64, argv: *i64) -> i64