Regions: An Abstraction for Expressing Array Computation

Bradford L. Chamberlain
E Christopher Lewis
Calvin Lin
Lawrence Snyder

In Proceedings of the 1999 ACM/SIGAPL International Conference on Array Programming Languages (APL99), pages 41-49, August 1999
(an earlier version of this work appeared as technical report UW-CSE-98-10-02)

Abstract: Most array languages, such as Fortran 90, Matlab, and APL, provide support for referencing arrays by extending the traditional array subscripting construct found in scalar languages. We present an alternative approach that exploits the concept of regions -- a representation of index sets that can be named, manipulated with high-level operators, and syntactically separated from array references. This paper develops the concept of region-based programming and describes its benefits in the context of an idealized array language called RL. We show that regions simplify programming, reduce the likelihood of errors, and enable code reuse. Furthermore, we describe how regions accentuate the locality of array expressions and how this locality is important when targeting parallel computers. We also show how the concepts of region-based programming have been used in ZPL, a fully-implemented practical parallel programming language in use by scientists and engineers. In addition, we contrast region-based programming with the array reference constructs of other array languages.

postscript | PDF