code wiki / _hdl_build / nx_superopt_strength_test.nx

nx_superopt_strength_test.nx

buildroot/runtime/_hdl_build/nx_superopt_strength_test.nx

3444 B74 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic superopt
docsdependenciesstructsconstsfunctions

about

nx_superopt_strength_test.nx -- watch the GENERATOR author optimizations itself. For a set of constants it has NEVER been told how to lower, the search discovers the cheapest verified `x*C` rewrite, prints it, and proves it 1:1. I did not write any of these lowerings -- the search did. Known answer: every authored plan is verified == x*C, and every reducible constant beats the multiply. exit 0.

dependencies 1 imports · 0 importers

nx_superopt_strength.nx nx_superopt_strength_test.nx

imports: nx_superopt_strength.nx

imported by: nobody (leaf or entry point)

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

main sot_puts so_best so_verify so_eval so_cost sot_num sot_show sot_puts ↻ sot_num ↻ so_verify ↻

structs

none

consts

none

functions

9func sot_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 2: sot_showmain
10func sot_num(v: i64) -> i64
called by 2: sot_showmain
20func sot_show(out: *i64) -> i64
called by 1: main calls 2: sot_putssot_num
30func main() -> i64