We consider the problem of converting C pointers to the less flexible concept of references. Our main application is converting scientific applications from C to Java. We provide a general method to model essentially all features of pointers using references. The model is easily implemented in Java. We give optimizations that map key facilities like arrays and structures onto the obvious Java equivalents, arrays and objects. These improvements make the conversion ‘optimal’ for all typed pointers. For untyped pointers, we can still fall back on the general model, hence providing general automatic conversion from C to Java code, whose efficiency improves with the quality of the C code. © 1998 John Wiley & Sons, Ltd.
[1]
Geoffrey C. Fox,et al.
A prototype of Fortran-to-Java converter
,
1997
.
[2]
Yves Roudier,et al.
The Extensible Java Preprocessor Kit and a Tiny Data-Parallel Java
,
1997,
ISCOPE.
[3]
Charles Consel,et al.
Harissa: A Flexible and Efficient Java Environment Mixing Bytecode and Compiled Code
,
1997,
COOTS.
[4]
Xiaoye S. Li,et al.
SuperLU Users'' Guide
,
1997
.
[5]
James Demmel,et al.
A Supernodal Approach to Sparse Partial Pivoting
,
1999,
SIAM J. Matrix Anal. Appl..
[6]
Guy L. Steele,et al.
The Java Language Specification
,
1996
.