----------------------------------------------------------------------

CSE 401 Autumn 2001 (Henry)

($Revision: 1.4 $)

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

Assignments 8 (Type Checking)

----------------------------------------------------------------------

Due Wednesday, November 28, 2001

Implement typechecking and other semantic checking and analysis for the extended PL/0 language. This assignment involves not only coding the type checking, but deciding what type checking should be done.

Think both about determining the type of an object, and other checks that must ensure that it is used legally in its context. The examples illustrated in class will help you get started.

Run the extended compiler with the "-p -s -S" options to print the abstract parse tree, the symbol table, and then stop.

As usual, follow the printing instructions and turnin instructions posted in the Help Section. Turn in printouts for {decl,expr,stmt}.tc.c, symtab.{h,c}, and type.{h,c}. You may need to change some of your AST .h files, because methods you had only declared are now actually going to be implemented; however, these changes are minor, so you don't have to turn in printouts for them. Turn in your whole working directory electronically, even if you only changed a couple of files.

Please highlight the changes you make on the paper copy, and include a short desciption of what semantic errors you think your typechecker should catch and what kinds of tests you tried to verify that it catches these errors. Note that there should be a lot of overlap here: you can list the semantic errors you think your typechecker should catch and just say, "We tested each of these individually." If you test programs with multiple errors, be sure to mention what combinations you tried.

As usual, you will be graded on correctness of your implementation, on clarity and good design of your implementation, and on sufficiency of any additional test cases you must write.

Since this chunk of the project is fairly sizable, please begin early on your design and implementation! Making a list of those checks you need to include might be a good place to start.

----------------------------------------------------------------------

401admin at cs.washington.edu