An APL ompiler

  • Authors:
  • Tilman P. Otto

  • Affiliations:
  • Paul-Martin-Ufer 13, 68163 Mannheim, Germany

  • Venue:
  • APL '00 Proceedings of the international conference on APL-Berlin-2000 conference
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Even if APL is the best-suited programming language for multi-dimensional data, nowadays computer applications additionally require complex graphical user interfaces, internet and database access. Combining software written in C, C++ or Java with interpreted APL programs is difficult. A homogeneous solution has been found by automatically converting APL programs into native C code. A complete APL2 like system including interpreter and session manager has been implemented in ISO C from scratch based on the standard C library. It is the property of the author and not yet commercially available. It has been successfully compiled on several operating systems. The built in system call APL2C allows one to compile any APL function including all referenced functions or operators within the workspace into native C code and completely removes the interpreter using direct calls to the C coded APL primitives. Only obvious restrictions (no runtime execution of character arrays or dynamic creation of functions via FX) apply. In addition, a makefile is created to enable the simple build of standalone executable files. The C files, generated by APL2C, can be easily mixed with other C/C++ source files and compiled on any platform provided that the required library for the APL primitives is available.