Files
R8Forge/include
dsh 346cbdc6e4 %synth: emit the tape-optimal program, not the fewest-layer one
The layer search still runs first (7.7 seconds) but only to get a bound; the
cost search then takes over and its answer is what goes on the tape.  A caller
that wants its own layout can say 'layout 0 2 4 6 8 10' inside the block.

examples/full_add.r8asm now assembles to 90 characters of tape instead of 95:
cost 75 in 6 blocks after 415M states and about 21 minutes, against the 82 the
five layer program needs.  Assembly getting slower is the whole point -- it is
the price of the shortest tape.

For scale: one bit_raw_add slice is 179 characters with the cells adjacent, and
the synthesised slice is 82.  A whole raw_add call is 1650 characters today, so
eight synthesised slices would land near 700.
2026-11-06 09:48:39 +08:00
..