The purpose of this assignment is to familiarize youself with the PL/0 language and the class hierarchy of the PL/0 compiler. Help is available on building the PL/0 compiler and compiling and linking PL/0 programs. |
![]() |
Build the initial PL/0 compiler. |
---|---|
![]() |
Compile and run the PL/0 squares and fib
sample programs. They will be in the directory when you copy
your version of the compiler.
NOTE: PL/0 generates MIPS assembly code, even when you build and compile on the instructional machines, so you will need to run the PL/0-generated code on the spim program |
under the instructional unix servers.
We'll get additional documentation out to you on how to do this.
![]() |
Write, compile, and run a PL/0 convolve
program whose input is the series of numbers s0 s1
... sn-1 0 r0 r1 ... rn-1 and whose output is the
number s0*rn-1 + s1*rn-2 +... sn-1*r0 .
Hint: use recursion.
For this assignment, you only need to turnin your sample
{ceylon} (~/cse401/pl0)% turnin -c cse401 convolveNote for future assignments, that the argument convolve.0 can be a directory name (in
which case all files in the directory will be turned
in), or a file or a group of files. The man page for
turnin is also available. Just type man
turnin .
|
![]() |
Examine the description of the
cscope software .
cscope is a tool on Unix/Linux that helps
analyze some aspects of a collection of source files.
You can find the cscope program
on the instructional Unix machines at
/cse/courses/cse401/01au/bin/cscope.
Once you get your own private copy of the pl0 source code,
you can do
cscope *.c *.hand then type a single question mark for some kinds of help. |
![]() |
Produce a textual description of the inheritance hierarchy for the PL/0 compiler. You must turn in hardcopy for this assignment in class. |
401admin at cs.washington.edu