code wiki / _hdl_build / nx_boolsynth_test.nx

nx_boolsynth_test.nx

buildroot/runtime/_hdl_build/nx_boolsynth_test.nx

3415 B71 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_boolsynth_test.nx -- prove the new BOOLEAN search space finds the PROVABLY-MINIMAL circuit for 3-input functions, verified EXACTLY (the truth-table byte covers all 8 inputs). Targets: majority 0xE8, parity 0x96, mux a?b:c 0xD8, and an arbitrary 0x69. For each it finds the shortest circuit over {and,or,xor,not} and RE-EVALUATES it to confirm the output truth table equals the target. Known answer: every one solved + re-verified -> exit 0.

dependencies 1 imports · 0 importers

nx_boolsynth.nx nx_boolsynth_test.nx

imports: nx_boolsynth.nx

imported by: nobody (leaf or entry point)

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

main bt_main bt_puts bt_one bl_find sys_mmap bl_enum bl_is_unary bl_eval bl_enum ↻ bt_reeval bl_eval ↻ bt_puts ↻ bt_num bl_opname bt_slot bt_puts ↻ bt_num ↻ bl_is_unary ↻ tally

structs

none

consts

none

functions

9func bt_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
10func bt_num(v: i64) -> i64
called by 2: bt_slotbt_one
18func tally(r: *i64, n: i64) -> i64 { var ec: i64 = 0; var i: i64 = 0; while i < n { if r[i] != 1 { if ec == 0 { ec = i + 1 } } i = i + 1 } return ec }
called by 1: main
21func bt_reeval(op: *i64, a: *i64, b: *i64, L: i64) -> i64
called by 1: bt_one calls 1: bl_eval
30func bt_slot(s: i64) -> i64
called by 1: bt_one calls 2: bt_putsbt_num
35func bt_one(target: i64, label: *u8, r: *i64, slot: i64) -> i64
54func bt_main(r: *i64) -> i64
called by 1: main calls 2: bt_putsbt_one
65func main() -> i64
calls 2: bt_maintally