code wiki / _hdl_build / nx_search_governor_test.nx

nx_search_governor_test.nx

buildroot/runtime/_hdl_build/nx_search_governor_test.nx

4344 B67 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic search
docsdependenciesstructsconstsfunctions

about

nx_search_governor_test.nx -- PROOF the team UNDERSTANDS the principle (not just one function): the SAME governor (sg_decide / sg_cost_cap) judges TWO unrelated search spaces, each fed by a REAL shortest-program search. If one judgment drives both multiply-by-constant AND boolean circuits, the team has internalized the general idea (cost-bounded shortest-program search / resource-bounded Kolmogorov complexity), not memorized a multiply rule. Space 1 -- MULTIPLY: real chain search; baseline = imul (3 cyc); op_cost = 1 cyc/op. Space 2 -- BOOLEAN: real minimal-circuit search; baseline = naive 2-level sum-of-products (~3m+2 two-input gates for m minterms -- what un-optimized logic emits); op_cost = 1. Exit 0 only if every verdict matches and equals sg_decide recomputed independently. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_mulchain_deep.nx nx_boolsynth.nx nx_syscalls.nx nx_search_governor_test.nx

imports: nx_mulchain_deep.nxnx_boolsynth.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 gt_puts sys_write sys_mmap sg_cost_cap gt_num sys_mmap ↻ sys_write ↻ gt_mul sys_mmap ↻ mulchain_deep_verified mulchain_find_deep mc_abs mcd_enum mcd_reach mc_abs ↻ mcd_maxmag mc_abs ↻ mc_avslot mc_abs ↻ mcd_enum ↻ mc_eval gt_bool sys_mmap ↻ bl_find sys_mmap ↻ bl_enum bl_is_unary bl_eval bl_enum ↻ gt_popcount sys_exit

structs

none

consts

none

functions

16func gt_puts(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
17func gt_num(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; 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); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func gt_popcount(v: i64) -> i64 { var n: i64 = 0; var x: i64 = v & 255; while x > 0 { n = n + (x & 1); x = x >> 1 } return n }
called by 1: gt_bool
22func gt_mul(c: i64, cap: i64, imul_cost: i64) -> i64
called by 1: main calls 2: sys_mmapmulchain_deep_verified
28func gt_bool(tt: i64, maxL: i64) -> i64
called by 1: main calls 3: sys_mmapbl_findgt_popcount
35func main() -> i64