The HPJava language itself doesn't currently provide an integrated mechanism for dealing with multiarrays of unspecified rank. In principle the language could be extended to provide support for such arrays. The set of operations on the envisaged abstract multiarrays would be limited: one would not be able to create an instance of an abstract multiarray directly, and no normal subscripting operations would be allowed on an expression of this type. However the standard inquiries on multiarrays would be available. Through the kind of low-level programming described in chapter 7 it would be possible to directly manipulate abstract multiarrays within the HPJava language.
A proposed syntax for abstract multiarray type signatures has the form:
This level of support requires fairly extensive changes to the translation
rules given in this appendix. For now the HPJava translator supports these
abstract multiarray types in a much more restrictive way. There is no
special syntax within the HPJava language, but it is possible for
externally defined methods and constructors to have parameters
of abstract multiarray type. Here ``externally defined'' presumably
means ``implemented in standard Java'' (following HPJava-compliant
calling conventions). This extension requires minor changes to the
HPJava type checker, and only one change to the translation scheme:
in the definition of the macro TRANS_ARG in section
A.4.15, if
is a multiarray expression of rank
, and the corresponding
formal parameter of the method or constructor is an abstract multiarray,
thenA.8