Certain problems in compiling dynamic, array-oriented languages such as APL are addressed. Compiling APL is difficult because the language design favors consistent treatment of its high-level data structures, multidimensional arrays, over efficient use of the underlying computer hardware. Analysis of how data arrays evolve during program execution, named “array morphology” by the author, discloses information needed by the compiler to optimize the code it generates. In the absence of such information, the compiler would need to provide much the same environment and consequent overhead as a traditional APL interpreter. In addition to array analysis, the use of “assertions” can improve the quality of compilation. An assertion in APL is an executable statement that determines the properties of a data array more precisely than if there were no assertion. Much of APL’s execution overhead involves checking arrays to make sure they are treated correctly when numerical functions act on them. By its action, an assertion greatly narrows the amount of checking required at runtime, thus allowing a compiler to produce better code.
This paper is well organized and well written, and contains a solid list of references. It thoroughly covers the analysis of arrays needed for optimized compilation of APL code. The paper would appeal to those interested in compilers, code optimization, and the internal workings of APL systems.