Publication
Software - Practice and Experience
Paper

Does APL really need run‐time checking?

View publication

Abstract

APL in its present interpretive implementations provides an ideal tool for the development of programs. The interpretive overhead, however, often prohibits the running of large production programs. Our results indicate that the overhead involved in checking type and size compatibility of the arguments of APL primitive functions during execution can be substantially avoided without loss of error detection. Using a large sample of syntactically correct APL programs, a statistical analysis was performed on the required conformability checks for each function. We have compiled (for each type of conformability check in each program) statistics on the percentage of checks that could be eliminated by static analysis and verification. The programs analysed contained 1,454 primitive functions. Of the 2,412 rank, length, domain and value checks required by a ‘naïve’ interpreter, 1,966 (80 per cent) can be validated statically. Index checks were required only thirty‐one times, but essentially all must be evaluated at run time. This suggests that compilation of APL programs to conventional target codes may be feasible as a high performance implementation whenever the cost of such translation does not dominate. Copyright © 1974 John Wiley & Sons, Ltd

Date

Publication

Software - Practice and Experience

Authors

Share