Re: Tools for code generation in undergraduate courses?

Bob Wilson <bwilson@shasta.Stanford.EDU>
Sat, 24 Jun 1995 04:33:09 GMT

          From comp.compilers

Related articles
Tools for code generation in undergraduate courses? mackey@cse.ucsc.edu (1995-06-01)
Re: Tools for code generation in undergraduate courses? bwilson@shasta.Stanford.EDU (Bob Wilson) (1995-06-24)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Bob Wilson <bwilson@shasta.Stanford.EDU>
Keywords: courses, tools
Organization: Compilers Central
References: 95-06-010
Date: Sat, 24 Jun 1995 04:33:09 GMT
Status: RO

mackey@cse.ucsc.edu (Wesley Mackey ) wrote:


> Question about tool usage in compiler courses.
>
> I am lecturing a two-course sequence in compiler design at the
> UNDERGRADUATE level. course A = scanning, parsing, symtables,
> icode generation course B = optimization, storage management,
> code generation
>
> [ background deleted ]
>
> Using anything from the gcc internals is likely too complex and
> insufficiently documented to be of use for a compiler for a toy
> language. SUIF (Stanford), Eli (Colorado), and Cocktail
> (Karlsruhe) appear to be too large to scale down for one quarter
> of code generation at the undergraduate level. Ox (Iowa State)
> does not appear to have code generation tools in it.


The SUIF compiler includes a simplified interface (SimpleSUIF)
that is designed for use in a one-quarter course on compiler
optimizations. We have used it for several years at Stanford,
and it has recently been used at several other universities.
The SimpleSUIF interface is written in C (instead of C++) and is
small enough for students to learn in a very short time.


SimpleSUIF is only intended for teaching compiler optimizations.
To my knowledge, no one has used SimpleSUIF for teaching code
generation. In fact, I'm not sure that it would be possible since
much of the information needed to generate code is hidden behind
the simplified interface.


One advantage of this system is that it is not just a toy compiler.
Students can use any C or Fortran programs as test inputs for their
optimizers. I'm not sure if that makes much of a difference in
helping students learn about compilers, but it certainly seems to
make them more interested in the programming assignments.


> As an added note, the tools should be free and take up a small
> enough amount of disk space that students can run them at home
> on their Linux PC's.


Although the complete SUIF system is quite large, you only need
a small subset to support the SimpleSUIF system. I have run it
on my Linux PC with no problems at all.


--Bob
--


Post a followup to this message

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