code wiki / _hdl_build / nx_research_basis.nx

nx_research_basis.nx

buildroot/runtime/_hdl_build/nx_research_basis.nx

4979 B69 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic research
docsdependenciesstructsconstsfunctions

about

nx_research_basis.nx -- the RESEARCHER leg as a real, growable, CITED knowledge base of research-grounded repairs. When the Verifier finds a proposal unsound, the loop consults this basis for a modern, literature-backed alternative (the soundness-restoring fix) instead of a hard no. Data-driven (Cardinal #11) and every entry carries its citation (Cardinal #4: verified facts, real research). The loop GROWS this basis as it learns more fixes; today's seed = 8 canonical failure->fix patterns from compiler / hardware / numerics / power research (the last three added 2026-06-03: energy-proxy, register-allocation, and the battery-attribution caveat that grounded this session's efficiency-triangle work). license_tier: ORIGINAL (the FACTS/citations are concepts, not copied text)

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_research_basis.nx nx_research_basis_test.nx nx_self_repair_cycle_test.nx

imports: nx_syscalls.nx

imported by: nx_research_basis_test.nxnx_self_repair_cycle_test.nx

structs

none

consts

14const RB_NONE: i64 = 0
15const RB_STRENGTH_SHIFT: i64 = 1 // mul x 2^k -> shl x k
16const RB_DIV_CONST: i64 = 2 // x / c (invariant divisor)
17const RB_MIDPOINT_OVF: i64 = 3 // (a+b)/2 overflow
18const RB_FP_REASSOC: i64 = 4 // (a+b)+c == a+(b+c) for floats
19const RB_SIGNED_SHR_DIV: i64 = 5 // signed x / 2^k via shift
20const RB_ENERGY_PROXY: i64 = 6 // energy == cycles (ignores switching activity)
21const RB_REGALLOC: i64 = 7 // stack-machine codegen spills every value
22const RB_SENSOR_ATTR: i64 = 8 // battery power == CPU energy (false on AC)
23const RB_N: i64 = 8

functions

25func rb_has(id: i64) -> i64
32func rb_unsound_form(id: i64) -> *u8
called by 1: main
45func rb_fix(id: i64) -> *u8
59func rb_citation(id: i64) -> *u8