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.
- 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.
- ResolveParents resolves class's proper super class
and super interfaces using the information from ClassFinder.
- 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.
- Inheritance collects and resolves the method inheritance,
overriding, and hiding information to be used in
HPJavaTypeChecker.
- 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