|Target machine for compiler course Mike.Spivey@comlab.oxford.ac.uk (1994-06-01)|
|Re: Target machine for compiler course email@example.com (Marc Brandis) (1994-06-03)|
|Re: Target machine for compiler course firstname.lastname@example.org (Andrew Tucker) (1994-06-03)|
|Re: Target machine for compiler course email@example.com (1994-06-03)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-03)|
|Re: Target machine for compiler course email@example.com (1994-06-11)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-05)|
|Re: Target machine for compiler course email@example.com (1994-06-13)|
|Re: Target machine for compiler course firstname.lastname@example.org (Mark 'Maxx' Simmons) (1994-06-11)|
|Re: Target machine for compiler course email@example.com (1994-06-16)|
|From:||firstname.lastname@example.org (Daniel J. Salomon)|
|Organization:||Computer Science, University of Manitoba, Winnipeg, Canada|
|Date:||Fri, 3 Jun 1994 17:22:45 GMT|
Mike.Spivey@comlab.oxford.ac.uk (Mike Spivey) writes:
> I'd like to hear what people think about the choice of a target
> machine for a first course in compilers.
> It might be nice to generate code for the SPARCstations that my
> students will use for their practicals. But isn't generating code for
> RISC machines with register windows, delay slots, etc. too much for a
> first detailed look?
I teach a senior-year course in compiler construction in which the
students generate SPARC code. They have access to the SPARC assembler
language manual (available in the SUN manual set) and the SPARC
architecture manual (available from Prentice-Hall ISBN 0-13-825001-4).
I have to give them an intro to the SPARC Architecture, and lots of
examples, but they pick it up. Since the SPARC is a modern
architecture, the students get the feeling that they are doing real
compiler writing, and that motivates them to take the project
seriously. I get a very low drop out rate from the course (about 5%)
and all of the students that complete it get a reasonable amount of
SPARC code generation working (at least expression evaluation, and
control structures.) The register windows and delay slots are not trivial
concepts to teach, but not that hard to generate code for, unless you
are implementing serious code optimization, which we do not.
> Some people would advocate a hypothetical stack machine, but that
> doesn't expose the problems in generating good code for real machines,
> and suffers from the same credibility gap.
For a graduate course in programming-language design and
implementation, I give a first assignment that is intended to be a
refresher in the use of lex and yacc. The students have to implement a
compiler for a trivial language called "EASY", and generate
stack-machine code for a hypothetical machine. They then have to
generate real VAX code which easily emulates the hypothetical stack
machine. Sadly, our VAX has recently been decommissioned, so I will have to
think of another target machine for this problem.
Daniel J. Salomon -- salomon@cs.UManitoba.CA
Dept. of Computer Science / University of Manitoba
Winnipeg, Manitoba, Canada R3T 2N2 / (204) 474-8687
Return to the
Search the comp.compilers archives again.