code wiki / _hdl_build / nx_boolsynth_test.nx
nx_boolsynth_test.nx
buildroot/runtime/_hdl_build/nx_boolsynth_test.nx
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
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
structs
| none |
consts
| none |
functions
| 9 | func 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 } |
| 10 | func bt_num(v: i64) -> i64 |
| 18 | func 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 |
| 21 | func bt_reeval(op: *i64, a: *i64, b: *i64, L: i64) -> i64 |
| 30 | func bt_slot(s: i64) -> i64 |
| 35 | func bt_one(target: i64, label: *u8, r: *i64, slot: i64) -> i64 |
| 54 | func bt_main(r: *i64) -> i64 |
| 65 | func main() -> i64 |