IBM Journal of Research and Development
IBM Skip to main content
  Home     Products & services     Support & downloads     My account  

  Select a country  
Journals Home  
  Systems Journal  
Journal of Research
and Development
    Current Issue  
    Recent Issues  
    Papers in Progress  
    Recent publications  
    Author's Guide  
  Contact Us  
  Related links:  
     IBM Research  

IBM Journal of Research and Development  
Volume 30, Number 6, Page 594 (1986)
Processing Programming Languages
  Full article: arrowPDF   arrowCopyright info


Program analysis and code generation in an APL/370 compiler

by W.-M. Ching
We have implemented an APL/370 compiler which accepts a subset of APL that includes most language features and a majority of APL primitive functions. It produces System/370 assembly code directly to be run independently of an interpreter. The compiler does not require variable declarations. Its front end, which is machine-independent, employs extensive type-shape analysis based on a type-shape calculus of the primitive functions and global dataflow analysis. Its back end does storage mapping, code generation for various primitive functions, and register management. For one-line functions, compiled code executes at 2-10 times the speed of the interpreter. On programs with many iterations, the execution time of the compiled code not only is dramatically better than that of interpretation, but is actually fairly close to that of FORTRAN. This removes the performance penalty of APL in computation-intensive applications.
Related Subjects: APL; Compilers and interpreters; Programming, programs, and programming languages