next up previous contents index
Next: Schematic algorithm Up: Expression simplification Previous: Expression simplification   Contents   Index


Special subexpressions

We will identify three classes of expressions that need special treatment: composite expressions, multiply referenced values, and multiply referenced variables.

The singled-out expressions in the current HPJava translation scheme are listed in Figure A.4. To a large extent this table encapsulates the HPJava-specific features of the pre-translation scheme described in this section. With minor changes here and there, the rest of the specification of the pretranslator could probably be adapted easily to any source-to-source translator that was adding new aggregate types to the base Java language.

Figure A.4: Special expressions in the current HPJava translation scheme.
Composite expressions:
  1. Multiarray creation expressions.
  2. Multiarray-valued method invocation expressions.
  3. Multiarray section expressions.
  4. Multiarray restriction expressions.
Multiply referenced values:
  1. The target object in accesses to multiarray-valued fields.
  2. The boolean expression in a multiarray-valued conditional expressions.
  3. The multiarray operand in array element reference and array section expression1.
  4. The multiarray operand in array-restriction expression.
  5. The array operand of multiarray inquiry operations (rng(), grp(), etc).
  6. The range and group parameters of multiarray creation expressions.
  7. The range expression in the header of overall and at constructs.
1 Assuming the language enforces the restriction discussed in section A.2.1--that the target of multiarray subscripting be the name of a final variable--the pretranslator will not need to do any simplification to ensure this operand is simple.


next up previous contents index
Next: Schematic algorithm Up: Expression simplification Previous: Expression simplification   Contents   Index
Bryan Carpenter 2003-04-15