Regions: An Abstraction for Expressing Array Computation

Bradford L. Chamberlain
E Christopher Lewis
Calvin Lin
Lawrence Snyder

University of Washington Technical Report UW-CSE-98-10-02
(revised version published at APL99)

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 language called RL. We show that regions simplify programming, reduce the likelihood of errors, and enable a new degree of code reuse. Furthermore, we describe how regions accentuate the locality of array expressions, enabling programmers to reason clearly about their codes' execution when targeting parallel computers. We discuss the relationship between RL and ZPL--a fully implemented region-based parallel 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