Compiling a subset of APL into a typed intermediate language

Martin Elsman, Martin Dybdal

6 Citationer (Scopus)

Abstract

We present a compiler and a typed intermediate language for a subset of APL. The intermediate language treats all numeric data as multi-dimensional arrays and the type system makes explicit the ranks of arrays. Primitive operators are polymorphic in rank and in the type of the underlying data operated on. The frontend of the APL compiler deals with much of the gory details of the APL language, including infix resolution, resolution of identity items for reduce operations, resolution of default element values for empty arrays, scalar extensions, and resolution of certain kinds of overloading. We demonstrate the usefulness of the intermediate language by showing that it can be compiled efficiently, using known techniques, such as delayed arrays, into a C-like language. We also demonstrate that the language is sufficiently expressive that some primitive operators, such as APL's inner product operator, which works on arrays of arbitrary dimensions, can be compiled using more primitive operators..

OriginalsprogEngelsk
TitelProceedings of ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (ARRAY’14) : ARRAY'14
Antal sider6
ForlagAssociation for Computing Machinery
Publikationsdato9 jun. 2014
Sider101-106
ISBN (Trykt)978-1-4503-2937-8
DOI
StatusUdgivet - 9 jun. 2014
BegivenhedACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming 2014 - Edinburgh, Storbritannien
Varighed: 12 jun. 201413 jun. 2014

Konference

KonferenceACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming 2014
Land/OmrådeStorbritannien
ByEdinburgh
Periode12/06/201413/06/2014

Fingeraftryk

Dyk ned i forskningsemnerne om 'Compiling a subset of APL into a typed intermediate language'. Sammen danner de et unikt fingeraftryk.

Citationsformater