Out: October 29, 2009
Due: November 5, 2009
FAQs for this assignment are collected here. You should check this archive before asking a question. These refer to a previous version of this problem set, but should still be applicable to you.
For this problem, you will modify the interpreter and type inferencer, interps/inferred.
Type ::= listof Type Expression ::= list ( Expression* ) Expression ::= cons ( Expression, Expression) Expression ::= null? (Expression) Expression ::= car (Expression) Expression ::= cdr (Expression) Expression ::= emptylist
The rules for list, cons, and
null? are given in the book on page 247. The rule for
emptylist should be:
(type-of emptylist tenv) = listof t(not what's in the book, which is for CHECKED). For this problem you must
As usual, you should turn in 3 sets of modules, in directories named
mp6-1, mp6-2, and mp6-3.
Observe that the tests in interps/inferred/tests.scm are not very good. You should add additional tests to better exercise the inferencer, and to demonstrate the extensions you write for this problem. Your tests must include both programs that pass your type checker and those that fail, to show that it rejects all the programs it should. Your tests should include running the programs, not just typechecking them.
Last modified: Fri Nov 13 13:14:30 Eastern Standard Time 2009