|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 (Roberto Lupi)|
|Date:||30 Jul 1998 23:23:59 -0400|
|Organization:||ASCU - http://www.ascu.unian.it/|
|References:||<35B38CAE.C4809603@doc.ic.ac.uk> <email@example.com> <firstname.lastname@example.org> <email@example.com>|
On Tue, 21 Jul 1998 22:14:28 GMT, firstname.lastname@example.org (Dwight
>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?
Return to the
Search the comp.compilers archives again.