next up previous contents
Next: Reachability and Definite (Un)assignment Up: Type-Checker Previous: Type-Checker   Contents


Type Analysis

The first phase is type-analysis. It has five subordinate phases: ClassFinder, ResolveParents, ClassFiller, Inheritance, and HPJavaTypeChecker.
  1. ClassFinder collects some simple information about top-level and nested class or interface declarations, such as names of the classes, the names of super class, and the names of super interfaces.
  2. ResolveParents resolves class's proper super class and super interfaces using the information from ClassFinder.
  3. ClassFiller fulfills a more complicated missions. It collects all of the rest information about top-level and nested class or interface declarations, such as field declarations, method declarations, constructor declarations, anonymous class allocations, and so on. ClassFiller also collects and resolves single-type-import declarations and type-import-on-demand declarations.
  4. Inheritance collects and resolves the method inheritance, overriding, and hiding information to be used in HPJavaTypeChecker.
  5. HPJavaTypeChecker does type-checking on statements, statement expressions, and expressions, including all ordinary Java and newly introduced HPJava constructs, multiarrays, etc.


Bryan Carpenter 2004-06-09