Final Exam/Assignment

Fall 2011

Add list processing to the LET Language

Assigned: Tue, Dec 8
Due: Thu, Dec 15, 9–11am

Description

Your final assignment (exam) for this semester will be to add list processing to the LET Language of EoPL chapter 3. Copy the starter code to your course directory from the command prompt as follows:

$ cd ~/cs235
$ cp -r /home/cs235/interps/lecture03/let-lang ./
$ mv let-lang/ final-exam/

Here is Exercise 3.9 from the EOPL3 text:

Exercise 3.9 [**] Add list processing operations to the language, including cons, car, cdr, null? and emptylist. A list should be able to contain any expressed value, including another list. Give the definitions of the expressed and denoted values of the language, as in section 3.2.2. For example,

  let x = 4
  in cons(x,
          cons(cons(-(x,1),
                    emptylist),
               emptylist))

should return an expressed value that represents the list (4 (3)).

Test your solution by running it on the tests already in tests.scm, plus the tests you add for the new list processing operations.

Turn in a single package with

  • all of your new specification rules in lang.scm,
    • for a new kind of expression (a list expression), and
    • the new list processing operations (cons, car, cdr, null?, and emptylist)
  • your extensions to the interpreter in interp.scm,
  • your extensions to the expressed values in data-structures.scm, and
  • your tests for the new list processing operations in tests.scm.

Electronic submission:

  • submit your assignment electronically via the submit235 script
  • do not print out (save the trees!)
courses/cs235-201103/assigns/final.txt · Last modified: 2011/12/08 19:58 by mlsmith
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0