APL2C: Difference between revisions

Jump to navigation Jump to search
Compiled APL links against a shared library for primitives
(→‎Control structures: Link to Batenburg paper that proposed the control structure system)
(Compiled APL links against a shared library for primitives)
Line 18: Line 18:
'''APL2C''' is a [[Nested array model|nested]] APL implementation consisting of a complete interpreter, and a compatible compiler with some restrictions. It supports much of the functionality specified by the Extended APL standard [[ISO/IEC 13751:2001]], including some features such as the [[Commute]] and [[Rank (operator)|Rank]] operators that were not widely supported at the time of its initial release.<ref>F.H.D. van Batenburg. [http://archive.vector.org.uk/art10000930 Conformity of APL Implementations to the ISO APL Standard]. [[Vector journal]] Volume 21, No.3. 2005-05.</ref> Development of APL2C began in 1991, and it was used in commercial applications before its public release. The compiler and its use in medical image analysis were presented at the [[APL00|2000 APL conference]].<ref>Tilman P. Otto. [https://doi.org/10.1145/570475.570498 APL Based medical image analysis] at [[APL00]].</ref><ref>Tilman P. Otto. [https://doi.org/10.1145/570475.570499 An APL Compiler] at [[APL00]].</ref> The implementation was later offered as a trial version, with a tutorial on using it presented at the 2001 APL conference.
'''APL2C''' is a [[Nested array model|nested]] APL implementation consisting of a complete interpreter, and a compatible compiler with some restrictions. It supports much of the functionality specified by the Extended APL standard [[ISO/IEC 13751:2001]], including some features such as the [[Commute]] and [[Rank (operator)|Rank]] operators that were not widely supported at the time of its initial release.<ref>F.H.D. van Batenburg. [http://archive.vector.org.uk/art10000930 Conformity of APL Implementations to the ISO APL Standard]. [[Vector journal]] Volume 21, No.3. 2005-05.</ref> Development of APL2C began in 1991, and it was used in commercial applications before its public release. The compiler and its use in medical image analysis were presented at the [[APL00|2000 APL conference]].<ref>Tilman P. Otto. [https://doi.org/10.1145/570475.570498 APL Based medical image analysis] at [[APL00]].</ref><ref>Tilman P. Otto. [https://doi.org/10.1145/570475.570499 An APL Compiler] at [[APL00]].</ref> The implementation was later offered as a trial version, with a tutorial on using it presented at the 2001 APL conference.


APL2C's compiler generates [[wikipedia:C_(programming_language)|C]] code that calls functions for primitives and other operations such as loading variables, removing interpreter dispatch overhead. Compiling allows a program to be distributed as an executable file, and allows the APL code to inter-operate with C. It restricts some dynamic functionality: compiled programs can't dynamically create APL functions with <syntaxhighlight lang=apl inline>⎕FX</syntaxhighlight>, and can't pass arrays (rather than functions) as [[operand]]s to user-defined operators.
APL2C's compiler generates [[wikipedia:C_(programming_language)|C]] code that calls functions for primitives and other operations such as loading variables, removing interpreter dispatch overhead. Compiling allows a program to be distributed as an executable file, and allows the APL code to inter-operate with C. In order to compile, the generated code must be linked against a platform-specific [[wikipedia:shared library|shared library]] containing primitive implementations, as source code for the primitives is not distributed. Some dynamic functionality is also restricted: compiled programs can't dynamically create APL functions with <syntaxhighlight lang=apl inline>⎕FX</syntaxhighlight>, and can't pass arrays (rather than functions) as [[operand]]s to user-defined operators.


== Control structures ==
== Control structures ==

Navigation menu