Compiling a Subset of APL Into a Typed Intermediate Language

Compiling a Subset of APL Into a Typed Intermediate Language

by Martin Elsman, Martin Dybdal

Traditionally, APL is an interpreted language ... In this paper, we present a compiler that compiles a subset of APL into a typed intermediate representation, which should serve as a practical and well-defined intermediate format for targeting parallel-architectures through a large number of existing tools and frameworks. The intermediate language is conceptually close to the language Repa. It supports shape-polymorphic functions and types that classify shapes. The compiler takes a simplified approach to certain aspects of APL. Following other APL compilation approaches, the compiler is based on lexical (i.e., static) identifier scoping and has no support for dynamic compilation (APL execute).
Terseness of APL is legendary, for good or bad. I keep finding more and more papers by Haskell community (and especially GHC contributors) working on efficient (parallel) arrays in Haskell.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Link to paper?

The link points back to LtU!

The perils of copy/paste

Thank you!

Haskell/APL, bridging the gap

I like your connection between Haskell and APL (ie: Haskell folks working on efficient array calculations).

We've been exploring similar ideas with hobbes, where type classes and structural types let us do similar things to what we'd do in APL but retaining type safety (Morgan Stanley has a long history of working with APL-like languages).