The current HPJava translator has two major translation phases. The first phase, pre-translation, reduces the input HPJava program to some other, equivalent HPJava program, coded in a restricted subset of the full HPJava language. The translation phase proper follows pre-translation, and converts the intermediate HPJava program to a standard Java program. Thus the restricted form emitted by the pretranslator should be suitable for processing in the translation phase. This restricted form, which is described in the following subsection, disallows certain complex expressions involving multiarrays. The pre-translator reduces these complex expressions to simpler expressions, by introducing temporaries if necessary.
While straightforward in principle, in general the simplification of expressions induces non-trivial reorganizations of declarations and control constructs appearing in the program. These transformations are documented in detail later in this section. It turns out that the separation of the pre-translator from the translator helps keep issues related to intricacies in the Java base language (which are largely the province of the pre-translator) cleanly separated from issues related to translation of the extended syntax of HPJava (which are the province of the translator).