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..
Originalsprog | Engelsk |
---|---|
Titel | Proceedings of ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (ARRAY’14) : ARRAY'14 |
Antal sider | 6 |
Forlag | Association for Computing Machinery |
Publikationsdato | 9 jun. 2014 |
Sider | 101-106 |
ISBN (Trykt) | 978-1-4503-2937-8 |
DOI | |
Status | Udgivet - 9 jun. 2014 |
Begivenhed | ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming 2014 - Edinburgh, Storbritannien Varighed: 12 jun. 2014 → 13 jun. 2014 |
Konference
Konference | ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming 2014 |
---|---|
Land/Område | Storbritannien |
By | Edinburgh |
Periode | 12/06/2014 → 13/06/2014 |