code wiki / _hdl_build / nx_pattern_emit.nx

nx_pattern_emit.nx

buildroot/runtime/_hdl_build/nx_pattern_emit.nx

9698 B129 linesdepth 2pulls 2 transitivereach 43 importersview sourcekind librarytopic pattern
docsdependenciesstructsconstsfunctions

about

nx_pattern_emit.nx -- PATTERN EMITTERS: the Builder authors the real CORE per shape (operator: keep building the team; the flagged lever to drive bp_claude_touch->0). The scaffold author emits the boilerplate + a stub core; the pattern library CLASSIFIES the shape. This is the missing piece -- an emitter PER pattern that authors the actual working CORE LOGIC from a small spec, so for a covered shape the team authors a complete, gated capability with ZERO Claude logic-authoring. Proven by the Engineer verifying the AUTHORED module's test (real KATs, not return-42). RACI: the BUILDER's verb is AUTHOR -- this is its capability. Composes the ma_emit_* / scaffold source-emission pattern (fd writes, \" escapes, name + integer-param injection). LAWS: struct-free, integer-only. license_tier: ORIGINAL

dependencies 1 imports · 21 importers

nx_syscalls.nx nx_pattern_emit.nx nx_math_gate_emit.nx nx_mathspec_atan.nx nx_mathspec_erf.nx nx_mathspec_erfc.nx nx_mathspec_gamma.nx nx_mathspec_pow.nx nx_mathspec_sincos.nx nx_mathspec_sinhcosh.nx nx_mathspec_tan.nx nx_pattern_emit12.nx

diagram shows first 10 each side; +0 more imports, +11 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_math_gate_emit.nxnx_mathspec_atan.nxnx_mathspec_erf.nxnx_mathspec_erfc.nxnx_mathspec_gamma.nxnx_mathspec_pow.nxnx_mathspec_sincos.nxnx_mathspec_sinhcosh.nxnx_mathspec_tan.nxnx_pattern_emit12.nxnx_pattern_emit2_demo.nxnx_pattern_emit3.nxnx_pattern_emit4.nxnx_pattern_emit5.nxnx_pattern_emit6.nxnx_pattern_emit6_erf.nxnx_pattern_emit6_erfc.nxnx_pattern_emit6_gamma.nxnx_pattern_emit6_log2.nxnx_pattern_emit_demo.nxnx_warden_build.nx

structs

none

consts

none

functions

11func pe_w(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 }
12func pe_wn(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 }
17func pe_emit_verdict_gate(fd: i64, name: *u8, lo: i64, hi: i64) -> i64
called by 1: pe_author calls 2: pe_wpe_wn
25func pe_emit_verdict_test(fd: i64, name: *u8, lo: i64, hi: i64) -> i64
39func pe_emit_accumulator(fd: i64, name: *u8) -> i64
45func pe_emit_accumulator_test(fd: i64, name: *u8) -> i64
58func pe_emit_comparator(fd: i64, name: *u8) -> i64
64func pe_emit_comparator_test(fd: i64, name: *u8) -> i64
78func pe_emit_threshold_table(fd: i64, name: *u8, x0: i64, y0: i64, x1: i64, y1: i64, x2: i64, y2: i64) -> i64
89func pe_emit_threshold_test(fd: i64, name: *u8, x0: i64, y0: i64, x1: i64, y1: i64, x2: i64, y2: i64) -> i64
109func pe_author(pattern: i64, name: *u8, modpath: *u8, testpath: *u8, lo: i64, hi: i64) -> i64
123func pe_author_threshold(name: *u8, modpath: *u8, testpath: *u8, x0: i64, y0: i64, x1: i64, y1: i64, x2: i64, y2: i64) -> i64