tree rewriting in compiler construction (Re: Lambda calculus vs. graph rewriting?)

lupex@ascu.unian.it (Roberto Lupi)
30 Jul 1998 23:23:59 -0400

          From comp.compilers

Related articles
tree rewriting in compiler construction (Re: Lambda calculus vs. graph lupex@ascu.unian.it (1998-07-30)
Re: tree rewriting in compiler construction (Re: Lambda calculus vs. g dwight@pentasoft.com (1998-07-31)
| List of all articles for this month |
From: lupex@ascu.unian.it (Roberto Lupi)
Newsgroups: comp.lang.functional,comp.compilers
Date: 30 Jul 1998 23:23:59 -0400
Organization: ASCU - http://www.ascu.unian.it/
References: <35B38CAE.C4809603@doc.ic.ac.uk> <35b516fa.72056812@news.accessone.com> <6p1ib0$jn4@ephor.tusc.com.au> <35b50f8d.17721161@news.accessone.com>
Keywords: tools

On Tue, 21 Jul 1998 22:14:28 GMT, dwight@pentasoft.com (Dwight
VandenBerghe) wrote:


>I was looking into
>PCCTS' "Sorcerer" tree-processing system, which basically just
>gives you an automated walk over a tree, but without the declarative
>style. That's the real difference: with standard tree rewriting
>techniques you manage the tree walk yourself, keeping track of
>what can be done where, and if you have to add something new, you
>have to go in and figure out how it will work with all the other
>things you're doing by hand. With a tree-rewriting system you
>just specify the transformations and let it figure out all the
>details. To add something new, you just add it, sort of like
>you would in a Prolog database, and poof, the system now has
>a new transformation that it applies for you automatically.


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: yesterday in the afternoon
I started and completed a prototype of a compiler for a Pascal-style
language to the assembler of the 68000 (my target machine is the TI-92
graphing calculator from Texas Instruments). It works quite well, now
I am adding optimizations.


>Another text that is still of some interest is Pittman's "The
>Art of Compiler Design" which shows how you can use transformation
>attribute grammars (that is, tree rewriting systems) to perform
>most of the standard optimizations that are implemented in compilers
>these days. He has a lot of example code in that book, but it
>suffers from some arcanity, in my opinion.


I'll read that book.


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?
--
Roberto Lupi
--


Post a followup to this message

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