code wiki / _hdl_build / nx_self_repair_cycle_test.nx

nx_self_repair_cycle_test.nx

buildroot/runtime/_hdl_build/nx_self_repair_cycle_test.nx

5728 B125 linesdepth 9pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic self
docsdependenciesstructsconstsfunctions

about

nx_self_repair_cycle_test.nx -- the self-build cycle UPGRADED to self-REPAIR, drawing on the growable RESEARCHER knowledge base (nx_research_basis). Cardinal #25: when a proposal is bad, REWRITE it better -- don't just filter it. On UNSOUND, the loop: (1) diagnoses the failure (counterexample = WHY, CEGIS), (2) the RESEARCHER consults the basis for a modern, CITED alternative, (3) the VERIFIER re-proves the alternative 1:1, (4) ABSORBS the repaired capability -- and ESCALATES (hard no) ONLY when the basis has no alternative. Star case (real, verified both ways): `(mul x 2^k) == (shl x k)` is UNSOUND at the k>=W boundary; the basis's research-grounded fix is the k<W validity guard (egg POPL21; Hacker's Delight). Guarded, it is sound for all k<W, all x. Known answer: 2 unsound proposals -> 1 REPAIRED+ABSORBED + 1 ESCALATED. exit 0.

dependencies 3 imports · 0 importers

nx_rule_soundness.nx nx_crew_council.nx nx_research_basis.nx nx_self_repair_cycle_test.nx

imports: nx_rule_soundness.nxnx_crew_council.nxnx_research_basis.nx

imported by: nobody (leaf or entry point)

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

main cc_puts sys_write sr_mulpow2_unguarded_sound nx_rs_mulpow2_boundary_uns nx_rs_mask nx_rs_mulpow2_oracle nx_rs_mask ↻ nx_rule_shl_wbit nx_rs_mask ↻ sr_repair_lookup rb_has rb_fix rb_citation sr_mulpow2_guarded_sound nx_rs_certify_mulpow2 nx_rs_mask ↻ nx_rs_pow2 nx_rs_mask ↻ nx_rs_mulpow2_oracle ↻ nx_rs_mk div_const div_op2 nx_gsim_run nx_gsim_kind_supported nx_gsim_eval_cell nx_tri_pass_strict nx_tri_check nx_rs_mulpow2_witness_a nx_rs_mask ↻ nx_rs_pow2 ↻ cc_set cc_council cc_verdict_name

structs

none

consts

20const SR_W: i64 = 8

functions

23func sr_repair_lookup(id: i64, fix_out: *i64, cite_out: *i64) -> i64
called by 1: main calls 3: rb_hasrb_fixrb_citation
34func sr_mulpow2_unguarded_sound() -> i64
called by 1: main calls 1: nx_rs_mulpow2_boundary_unsound
44func sr_mulpow2_guarded_sound(vals: *i64, cells: *NxGsimCell, g: *NxGsim,
called by 1: main calls 1: nx_rs_certify_mulpow2
59func main() -> i64