CSE401 Assignment 1

Assigned: Monday 9/25/00

Readings (in the Dragon Book)
Read before the lecture on the specified day

9/27/00 Wednesday Chapter 1
9/29/00 Friday Sections 3.1, 3.3, 3.4 [skip Chapter 2]
10/2/00 Monday revised! Sections 3.6, 3.7



9/29/00 Friday Build initial PL/0 compiler
  Compile and run the PL/0 squares and fib sample programs
  Write, compile and run a PL/0 powers program that, for each positive number X input, outputs the number 2X, until a 0 is input.
  Write, compile and run a PL/0 dotproduct  program whose input is the series of numbers s1 s2 ... sn 0 rn rn-1 ... r1
and whose output is the number
s1*r1 + s2*r2 + ... sn*rn.
(Hint: use recursion, noting that the r's come in reverse order of the s's.)
  Hand in source code for the powers and dotproduct programs plus execution traces on sample input