The first phase is type-analysis. It has five subordinate phases: ClassFinder, ResolveParents, ClassFiller, Inheritance, and HPJavaTypeChecker.
The second phase is reachability analysis, carrying out a conservative flow analysis to make sure all statements are reachable. The idea of Reachability is that there must be some possible execution path from the beginning of the constructor, method, instance initializer or static initializer that contains the statement to the statement itself. The analysis takes into account the structure of statements. Except for the special treatment of while, do, and for statements whose condition expression has the constant value true, the values of expressions are not taken into account in the flow analysis.
The third phase is definite (un)assignment analysis. It consists of two parts, DefAssign and DefUnassign, which checks the definite (un)assignment rules for Java, implementing the flow analysis of the Java language specification.
The three phases are basically inspired by carefully organizing The Java Language Specification, Second Edition (JLS) . The current HPJava type-checker system only supports exactly what JLS says (plus the HPJava extensions, of course). But the Java language itself keeps evolving in a slow manner. For example, Sun's SDK 1.4 Java compiler supports some changes to JLS, and the 1.5 release will add many more. We expect to update the HPJava type-checker system when the new edition of JLS is eventually published. Figure 5 shows the complete architecture of HPJava front-end.