CSE 401 Compilers Class (Fall '99)

[Home] [Admin] [Details] [Help]

Assignments / #1


Due Friday 10/8/99

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.
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. You may assume all inputs are nonzero except the zero which marks the middle.

For this assignment, you only need to turnin your sample convolve PL/0 source using the turnin program. On the instructional Linux systems (e.g.fiji), type:

  {fiji} (~/cse401/pl0)% turnin -c cse401 convolve.0
Note 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.
Produce a textual description of the inheritance hierarchy for the PL/0 compiler. Give 2-3 sentences describing the role of each in the compiler, listing the major methods within each, etc. (Infer this from skimming class/method/variable names and comments. You do not need to do a detailed reading of all the code at this point.) This should take 3-5 pages total. Turn in hardcopy for this in class.


cse401-webmaster@cs.washington.edu (Last modified: 10/03/99)