|tree rewriting in compiler construction (Re: Lambda calculus vs. graph firstname.lastname@example.org (1998-07-30)|
|Re: tree rewriting in compiler construction (Re: Lambda calculus vs. g email@example.com (1998-07-31)|
|From:||firstname.lastname@example.org (Dwight VandenBerghe)|
|Date:||31 Jul 1998 10:52:33 -0400|
|Organization:||http://www.supernews.com, The World's Usenet: Discussions Start Here|
|References:||<35B38CAE.C4809603@doc.ic.ac.uk> <email@example.com> <firstname.lastname@example.org> <email@example.com> 98-07-241|
On 30 Jul 1998 23:23:59 -0400, firstname.lastname@example.org (Roberto Lupi)
>I have also found a nice declarative tool to create compiler called
>Gentle (http://www.first.gmd.de/gentle), I have played with it for
>just a week but it seems quite productive...
Yes, indeed. There's a book on it out now, published in Germany,
which I contributed a little bit to. Gentle is a very, very nice
system, if you're in C.
>Now, I'd like to know where I can find articles/papers on the
>implementation in functional and/or tree rewriting system of compiler
>for imperative languages. In particular I am intersted in optimization
>at the AST and at the machine code (peephole?) level.
>Do you have any references on that subject?
Well, there's an interesting system called UCGE that is a freely
usable tree rewriting system in C, done at the U of Vermont
years ago, but I just looked for it as a reference and I seem
to have lost it. (Anyone else out there have a URL handy?)
One seminal text is O'Donnell's "Equational Logic as a Programming
Language", as mentioned before, from MIT Press.
The current reference of choice is Appel's "Modern Compiler
Implementation in ML", NOT the "Basic" edition. Lots of cool
tricks for writing compilers in strict functional languages.
Peephole optimization turns out to be quite easy, compared to
the other kinds of optimizations. You can write a peephole
optimizer in about 100 lines of Awk.
Return to the
Search the comp.compilers archives again.