Re: Compiler textbook available online

"Uncle Noah" <nkavv@skiathos.physics.auth.gr>
23 Mar 2007 22:17:11 -0400

          From comp.compilers

Related articles
Compiler textbook available online torbenm@app-5.diku.dk (2007-03-16)
Re: Compiler textbook available online nkavv@skiathos.physics.auth.gr (Uncle Noah) (2007-03-16)
Re: Compiler textbook available online Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2007-03-17)
Re: Compiler textbook available online asaivineetp@gmail.com (Computer Wizard) (2007-03-19)
Re: Compiler textbook available online torbenm@app-4.diku.dk (2007-03-19)
Re: Compiler textbook available online torbenm@app-4.diku.dk (2007-03-19)
Re: Compiler textbook available online tommy.thorn@gmail.com (Tommy Thorn) (2007-03-21)
Re: Compiler textbook available online nkavv@skiathos.physics.auth.gr (Uncle Noah) (2007-03-23)
Re: Compiler textbook available online torbenm@app-6.diku.dk (2007-03-26)
| List of all articles for this month |

From: "Uncle Noah" <nkavv@skiathos.physics.auth.gr>
Newsgroups: comp.compilers
Date: 23 Mar 2007 22:17:11 -0400
Organization: Compilers Central
References: 07-03-06007-03-068 07-03-081
Keywords: books
Posted-Date: 23 Mar 2007 22:17:11 EDT

Tommy Thorn wrote:
> > Alvilda was made by some students at another university (Aarhus,
> > where I'm from Copnhagen). I can see from their webpage that Alvilda
> > ws written in C. I would not choose C as a langauge in which to write
> > a compiler.


OK.


> 2. Our Alvilda compiler was trying out a new internal representation,
> CoRTL, that ? had proposed in a Thesis proposal, but never finished.
> It was an interesting, but we discovered (Lesson #0) that the
> structual constraints of CoRTL were a pain to deal with. Today I would
> have gone with Thinned-Gated SSA. ("One" day, I'll do this for a C
> subset).


Just had a glance over the Alvilda website. I recall donwloading the
compiler about a year ago. It made a very good impression to me as a
proof-of-concept. CFG/SSA is the natural choice as a target from the
AST (that would be generated by the frontend). I personally like
better two examples of compilers that use SSA: COINS
(http://www.coins- project.org) and Machine-SUIF. They are both clean
and comprehensible. I have a (relatively) hard time in following-up
to GCC internals these days (however enjoying the fact that
fixed-point arithmetic support that will eventually be in 4.3
release).


> 3. Lesson #1 was that going straight from parse actions to our IR was
> A Bad Idea. Building an abstract syntax tree as an immediate would
> have simplified things enormously. (Obvious to all I hope).


I agree.


> 4. I haven't looked at Torben's book (stellar I'm sure), but I'm feel
> there all together too much focus, in academia and in this newsgroup,
> on a long solved and not so interesting problem. If I were to run a
> compiler course, I would _give_ the students the front end. All the
> really fun stuff is in the back end.


Although this book discusses extensively frontend issues it is quite
descent on the backend side as well.


I do believe as well that the backend is the fun side (i come from a
hardware-oriented discipline)! Personally, i've never taken a course
to deal with DFAs and NDFAs not to mention lexical/syntactical
analysis (i've a B.Sc. on Physics, and my M.Sc. was more on an
electronics theme). I use lex/yacc for 6 years know, have produced
more than 20-30 frontends for a variety of input languages. I believe
that many people since the introduction of lex and yacc in 1975 can
live well without frontend theory.


And still we lack at the backend! I've searched for something freebie
for a hands-on and things look quite immature yet (maybe in 5-to-10
years this will not be the case). Just have a look at
compilertools.net. About 20-25 frontend tools are mentioned and 3
backend, from which not all are free. Of course there are examples
(within their constraints) like GCC, LCC, or even MLRISC (impressive
but not sure if anyone is using with a "real" C/Pascal/Java frontend)
etc but there is no Swiss army knife for generating a backend for a
target machine or VM architecture.




Kind regards
Nikolaos Kavvadias



Post a followup to this message

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