TITLE: Looking Forward: Preparing for Compilers
AUTHOR: Eugene Wallingford
DATE: January 10, 2012 4:05 PM
Spring semester is underway. My compilers course met for
the first time today. After all these years, I still get
excited at the prospect of writing a compiler. On top of
that, we get to talk about programming languages and
programming all semester.
I've been preparing for the course since last semester,
during the programming languages course I
I've written blog entries as I planned previous offerings
of the compiler course, on topics such as
teaching by example,
fifteen compilers in fifteen weeks
teaching the course backwards.
I haven't written anything yet this time for one of the same
reasons I haven't been writing
about my knee rehab:
I haven't had much to say. Actually, I have two small things.
First, on textbooks. I found that the textbook I've used for
the last few offering of the course now costs students over
$140, even at Amazon. That's no
but sheesh. I looked at several other popular undergrad
compiler texts and found them all to be well over $100. The
books my students might want to keep for their professional
careers are not suitable for an undergrad course, and the ones
that are suitable are expensive. I understand the reasons why
yet can't stomach hitting my students with such a large bill.
The Dragon book
is the standard, of course, but I'm not convinced it's a good
book for my audience -- too few examples, and so much material.
(At least it's relatively inexpensive, at closer to $105.)
I found a few compiler textbooks available free on-line,
that $275 book
I like. Ultimately I settled on Torben Mogensen's
Basics of Compiler Design.
It covers the basic material without too much fluff, though
it lacks a running example with full implementation. I'll
augment it with my own material and web readings. The price
is certainly attractive. I'll let you know how it works
Second, as I was filing a pile of papers over break, I ran
across the student assessments from
last offering of the course.
Perfect timing! I re-read them and am able to take into
account student feedback. The last group was pretty pleased
with the course and offered two broad suggestions for
improvement: more low-level details and more code examples.
I concur in both. It's easy when covering so many new ideas
to stay at an abstract level, and the compiler course is no
exception. Code examples help students connect the ideas we
discuss with the reality of their own projects.
These are time consuming improvements to make, and time will
be at a premium with a new textbook for the course. This new
text makes them even more important, though, because it has
few code examples. My goal is to add one new code example
to each week of the course. I'll be happy if I manage one
really good example every other week.
And we are off.