code wiki / _hdl_build / nx_ncf_quad_gate.nx

nx_ncf_quad_gate.nx

buildroot/runtime/_hdl_build/nx_ncf_quad_gate.nx

4491 B61 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic ncf
docsdependenciesstructsconstsfunctions

about

nx_ncf_quad_gate.nx -- X-AUT-NCF-001 RUNG 3: SYNTHESIZE AN AFFINE-INDEX LOOP (acc += c1*i + c0), the construct that covers x^2 and the quadratic/arithmetic-series family -- exactly the case rung 2's wiring honestly REFUSED (T4 boundary). Escalation: rung 2 simple loop (acc+c/acc*c/acc+i/acc*i) PROVABLY FAILS on x^2; the affine-index loop SUCCEEDS. Uses the shared lib nx_ncf_synth (the DRY core), so landing this rung AUTO-WIDENS the wiring (nx_ncf_route_gate now routes x^2). Construct ladder: linear < conditional < simple-loop < AFFINE-INDEX-LOOP, each with its own proving negative control. T1 linear FAILS on x^2. T2 simple-loop (rung 2) FAILS on x^2 -> the new construct is necessary. T3 affine-index loop SYNTHESIZES x^2 = acc=0; for i { acc += 2i-1 }. T4 MATERIALIZE+GOD-BUILD+run HELD-OUT {5->25, 6->36} -> 25036. T5 unified ncf_synth routes x^2 (kind=3). expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_ncf_synth.nx nx_syscalls.nx nx_ncf_quad_gate.nx

imports: nx_ncf_synth.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ncf_w sys_write sys_mmap sys_openat_wr sys_write ↻ sys_close ncf_search_linear ncf_op_eval ncf_n sys_write ↻ sys_mmap ↻ ncf_search_loop ncf_loop_eval ncf_search_loop2 ncf_loop_eval2 ncf_emit ncf_emit_branch sys_mmap ↻ ncf_cat ncf_cat_pred ncf_cat ↻ ncf_catn sys_mmap ↻ ncf_cat_ret ncf_cat ↻ ncf_catn ↻ ncf_emit_main ncf_cat ↻ ncf_cat_arg ncf_cat ↻ ncf_catn ↻ ncf_catn ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻ ncf_emit_loop sys_mmap ↻ ncf_cat ↻ ncf_catn ↻

structs

none

consts

none

functions

14func main() -> i64