Re: why teach about compilers, was Java compiler courses

torbenm@app-7.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
7 May 2007 09:39:42 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: why teach about compilers, was Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-29)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-04-29)
Re: why teach about compilers, was Java compiler courses bobduff@shell01.TheWorld.com (Robert A Duff) (2007-04-29)
Re: why teach about compilers, was Java compiler courses danwang74@gmail.com (Daniel C. Wang) (2007-05-04)
Re: why teach about compilers, was Java compiler courses cdsmith@twu.net (Chris Smith) (2007-05-04)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-05-04)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
Re: why teach about compilers, was Java compiler courses stevem@ans.com.au (Steve Murray) (2007-05-09)
Re: why teach about compilers, was Java compiler courses danwang74@gmail.com (Daniel C. Wang) (2007-05-10)
| List of all articles for this month |
From: torbenm@app-7.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: 7 May 2007 09:39:42 -0400
Organization: Department of Computer Science, University of Copenhagen
References: 07-04-074 07-04-098 07-04-120 07-04-149 07-04-153 07-04-155 07-05-005
Keywords: courses
Posted-Date: 07 May 2007 09:39:42 EDT

"Daniel C. Wang" <danwang74@gmail.com> writes:


> Robert A Duff wrote:
>
> I would give the students a complete working implementation and ask
> them to modify it from parsing to code-gen to support new
> features. I've personally learned a lot more by modifying and reading
> good code than writing it from scratch.


This is exactly what I do in my compiler course at DIKU.


> In the past writing an interesting compiler was something you could
> accomplish in a semester. These days there's so much you should cover
> that there's no way to cover it all and have students produce a full
> compiler end-to-end without having them cursing your course.


Some students curse my mourse even if they do get a complete compiler
to modify. :-) And even if the modifications can be done in a few
hours if you know what to do (which they initially don't).


> I would not want students to write a compiler for a "modern" language
> that produced native code end-to-end, or compile a "legacy" language end
> to end. The former is too much work. The latter so dated as to be a
> disservice.


Indeed. My students get a small toy language to extend. Typically,
the initial language has only integers and they need to extend with
arrays or linked lists (no GC, though) and a few extra control
structures. I always make sure they need to add an extra attribute to
the translation functions to make the extensions, as using attributes
is one of the central points. They translate into almost-real machine
code (a subset of MIPS) which is run on an emulator.


Torben



Post a followup to this message

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