Shape Checking of Array Programs

Shape theory provides a framework for the study of data types in which shape and data can be manipulated separately. This paper is concerned with shape checking, i.e. the detection of shape errors, such as array bound errors, without handling the data stored within. It can be seen as a form of partial evaluation in which data computations are ignored. We construct a simply-typed lambda-calculus that supports a vector type constructor, whose iteration yields types of arrays. It is expressive enough to construct all of the usual linear algebra operations. All shape errors in a term t can be detected by evaluating its shape #t. Evaluation of #t will terminate if that of t does.

[1]  C. Barry Jay,et al.  A Semantics for Shape , 1995, Sci. Comput. Program..

[2]  C. Barry Jay,et al.  Shape in computing , 1996, CSUR.

[3]  François Bourdoncle,et al.  Abstract debugging of higher-order imperative languages , 1993, PLDI '93.

[4]  Maarten M. Fokkinga,et al.  Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire , 1991, FPCA.

[5]  Neil Ghani,et al.  ßn-Equality for Coproducts , 1995, TLCA.

[6]  Jan Willem Klop,et al.  Combinatory reduction systems , 1980 .

[7]  Rajiv Gupta,et al.  Optimizing array bound checks using flow analysis , 1993, LOPL.

[8]  George Karypis,et al.  Introduction to Parallel Computing , 1994 .

[9]  Patrick Cousot,et al.  Abstract Interpretation Frameworks , 1992, J. Log. Comput..

[10]  Yike Guo,et al.  Parallel skeletons for structured composition , 1995, PPOPP '95.

[11]  Reinhard Wilhelm,et al.  Solving shape-analysis problems in languages with destructive updating , 1998, TOPL.

[12]  I. Duff,et al.  Direct Methods for Sparse Matrices , 1987 .

[13]  D. Skillicom Architecture-independent parallel computation , 1990 .

[14]  P. Martin-Löf An Intuitionistic Theory of Types: Predicative Part , 1975 .

[15]  Guy E. Blelloch,et al.  NESL: A Nested Data-Parallel Language , 1992 .

[16]  Andrew Wendelborn,et al.  An overview of the Adl language , 1995 .

[17]  J. J. Edwards,et al.  Exploiting shape in parallel programming , 1996, Proceedings of 1996 IEEE Second International Conference on Algorithms and Architectures for Parallel Processing, ICA/sup 3/PP '96.

[18]  Guy E. Blelloch,et al.  Vcode: a data-parallel intermediate language , 1990, [1990 Proceedings] The Third Symposium on the Frontiers of Massively Parallel Computation.

[19]  Flemming Nielson,et al.  Two-Level Functional Languages: Parameterized Semantics , 1992 .

[20]  Murray Cole Parallel Programming, List Homomorphisms and the Maximum Segment Sum Problem , 1993, PARCO.

[21]  Guy E. Blelloch,et al.  Size and access inference for data-parallel programs , 1991, PLDI '91.