Re: tree rewriting in compiler construction (Re: Lambda calculus vs. graph rewriting?) (Dwight VandenBerghe)
31 Jul 1998 10:52:33 -0400

          From comp.compilers

Related articles
tree rewriting in compiler construction (Re: Lambda calculus vs. graph (1998-07-30)
Re: tree rewriting in compiler construction (Re: Lambda calculus vs. g (1998-07-31)
| List of all articles for this month |

From: (Dwight VandenBerghe)
Newsgroups: comp.lang.functional,comp.compilers
Date: 31 Jul 1998 10:52:33 -0400
Organization:, The World's Usenet: Discussions Start Here
References: <> <> <6p1ib0$> <> 98-07-241
Keywords: tools, analysis

On 30 Jul 1998 23:23:59 -0400, (Roberto Lupi)

>I have also found a nice declarative tool to create compiler called
>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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.