Date: Mon, 21 Sep 2009 09:54:47 -0700 From: Joe Marshall <jmarsh...@alum.mit.edu>
It'd be nice if the optimizations were rule-based rather than having these deep, ad-hoc conditionals. Then the description of the transform would *be* the transform. Would it be possible to get the *parser to involved here to simplify this sort of stuff? Well, *PARSER works only on strings. The runtime's structure parser works on more general sequences of objects, but whatever rule language you use, it would have to be fairly sophisticated to capture many of these rules. I gave several simple examples, but actually the pattern is doubly recursive: it descends down a tree of combinations whose operators are procedures whose bodies are combinations (recursion #1), *or* of combinations whose operators can be transformed according to the same rule (recursion #2). That ignores the complications of declarations and sequences, too. If you can come up with a nice rule language to express this, I'd be happy to try it! But I haven't tried to come up with one because I don't think I'm clever enough to do so. _______________________________________________ MIT-Scheme-devel mailing list MIT-Scheme-devel@gnu.org http://lists.gnu.org/mailman/listinfo/mit-scheme-devel