Computer Science Department
Programming Methods Laboratory

Compilation     winter 00/01
Ecole Polytechnique Federale de Lausanne
Assignment 4
15.12.2K

In this assignment you have to implement the semantic analysis of your j0 compiler. The semantic analyzer has to perform two tasks: name analysis (i.e. finding the corresponding definitions to all identifiers) and type checking (i.e. deriving types for all j0 constructs and checking their consistency).

For your implementation, we provide several supporting classes:

Your main task is to complete the new visitor Analyzer.java which performs both name analysis and type checking. Furthermore you have to complete the Type class by providing implementations of function types and array types.


You should present your solution in the tutorial on Friday, 12.01.01.