Re: Compiler textbook available online



On Mar 19, 12:38 pm, torb...@xxxxxxxxxxxxx (Torben Ægidius Mogensen)
wrote:
PS: I recall some months ago that a Danish univ. released a nice (but
old) compiler named Alvilda. Does your work/research have any
connection to Alvilda?

No, that 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.

Assume we're talking about
http://not.meko.dk/Hacks/Alvilda/The%20Alvilda%20Optimizing%20Compiler.html

-1. It wasn't a "Danish univ.", but rather one long-ago graduated
student cleaning old files :-)

0. Jens Palberg (now at UCLA) ran the course, and I am greatful to him
for having allowed us great freedom to go our own way.

1. We _had_ to write in C, and although not necessarily the worlds
greatest programming language, it _is_ hands-down the most portable,
has the most programmers in the world (outside COBOL), and have great
tool support, notably debuggers. I would choose C again for those
reasons, even though I'm fond of Haskell.

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).

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).

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.

Regards
Tommy
.



Relevant Pages

  • Re: Compiler textbook available online
    ... Compiler Design". ... old) compiler named Alvilda. ... the students get a compiler ... for a very small language and are asked to make various extensions to ...
    (comp.compilers)
  • Re: Java compiler courses
    ... Who cares what language the compiler is written in in ... exceptions I think the only people who really study compiler ... students later in will use their knowledge in projects using C. ... programming skills are an integral part of a CS ...
    (comp.compilers)
  • Re: Free UNIX for non-commerical use.
    ... I thought my $100 included a compiler. ... I think it makes more sense to encourage students ... >> will never gain any extra revenue from hardware sales. ... >> One can't expect SCO to give away SCO UNIX, as again they will gain no ...
    (comp.unix.solaris)
  • Re: why teach about compilers, was Java compiler courses
    ... There is no reason why students ... programming skills are an integral part of a CS ... Even a simple compiler touches on all of these things. ...
    (comp.compilers)
  • Re: Top ten errors
    ... >> seems like your students dont know how to use their compiler ... I sometimes wish the error messages had been ... My students, however, can't read code and spot the error ...
    (alt.comp.lang.learn.c-cpp)