Rewriting Strategies
So I’ve been rambling lately about term rewriting, and possibly using a domain specific language (DSL) to express optimizations. Inspired by Prolog I’ve come up with a prototype DSL. A small sample follows:
inverse(swap, swap)
inverse(’a add, ‘a sub)
$f $g | inverse($f, $g) == id
I have posted an extended example of how this language might look to the concatenative mailing list.