Abstract
In this paper we introduce the uniqueness and completeness problems of array comprehensions. An array comprehension has the uniqueness property if it defines each array element at most once. Uniqueness is a necessary condition for correctness in single assignment languages such as Haskell, Id, and Sisal. The uniqueness problem can be stated as a data dependence problem, which in itself can be reformulated as an integer linear programming problem. We derive algorithms to solve uniqueness using the Omega Test, an Integer Linear Programming tool. An array comprehension has the completeness property if all its elements are defined. Completeness is a necessary condition for strict arrays. We present an algorithm that tests for completeness and describe an implementation of the algorithm based on multivariate polynomials.
This work is supported in part by NSF Grant MIP-9113268
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A.V. Aho, R. Sethi, and J. D. Ullman. Compilers. Principles, Techniques and Tools. Addison-Wesley, Reading MA, 1986.
Steven Anderson and Paul Hudak. Compilation of Haskell Array Comprehensions for Scientific Computing. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation, pages 137–149, June 1990.
Arvind, and Rishiyur S. Nikhil. I-Structures: Data Structures for Parallel Computing. ACM Transactions on Programming Languages and Systems, 11(4):598–632, October 1989.
Utpal Banerjee. Dependence Analysis for Supercomputing. Kluwer Academic Publishing, 1988.
Utpal Banerjee. Loop Transformations for Restructuring Compilers. The Foundations. Kluwer Academic Publishing, 1993.
A.P.W. Böhm, D. C. Cann, J. T. Feo, and R. R. Oldehoeft. SISAL 2.0 Reference Manual. Technical Report CS-91-118, Computer Science Department, Colorado State University, Fort Collins, CO, November 1991.
Michael Burke and Ron Cytron. Interprocedural Analysis and Parallelization. In ACM SIGPLAN '86 Symposium on Compiler Construction, pages 162–175, June 1986.
D. C. Cann. Compilation Techniques for High Performance Applicative Computation. Ph.D. thesis, Colorado State University, Computer Science Department, Fort Collins, CO, 1989.
B.W. Char, K.O. Geddes, G.H. Gonnet, B.L. Leong, M.B. Monagan, S.M.Watt, Maple V Library Reference Manual. Springer-Verlag and Waterloo Maple Publishing, 1991.
G. R. Gao, and Robert Kim Yates. An Efficient Monolithic Array Constructor. ACAPS Technical Memo 19, School of Computer Science, McGill University, Montreal, Canada, June 1990.
Paul Havlak, Ken Kennedy. Experience with Interprocedural Analysis of Array Side Effects. In Supercomputing '90, pages 952–962, 1990.
P. Hudak et. al. Report on the programming Language Haskell — A non-strict, Purely Functional Language — version 1.0, Technical report, Yale University, April 1990.
Zhiyuan Li and Pen-Chung Yew. Efficient Interprocedural Analysis for Program Parallelization and Restructuring. In ACM SIGPLAN PPEALS, pages 85–99, 1988.
J. R. McGraw, S. K. Skedzielewski, S. J. Allan, R. R. Oldehoeft, J. Glauert, C. Kirkham, W. Noyce, and R. Thomas. SISAL: Streams and iteration in a single assignment language: Reference manual version 1.2., Manual M-146, Rev. 1, Lawrence Livermore National Laboratory, Livermore, CA, March 1985.
R.S. Nikhil, Id (versíon 90.0) Reference Manual. TR CSG Memo 284-1, MIT LCS 1990.
William Pugh. The Omega Test: a fast and practical integer programming algorithm for dependence analysis. In Supercomputing 1991, pages 4–13, November 1991.
William Pugh. A Practical Algorithm for Exact Array Dependence Analysis. Communications of the ACM, 35(8):102–114, August 1992.
Alexander Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, New York, New York, 1987.
Rémi Triolet, Francois Irigoin, and Paul Feautrier. Direct Parallelization of Call Statements. In Proceedings of the SIGPLAN '86 Symposium on Compiler Construction, pages 176–185, June 1986.
Hans Zima with Barbara Chapman. Supercompilers for Parallel and Vector Computers. ACM Press, NY, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Garza-Salazar, D., Böhm, W. (1994). Uniqueness and completeness analysis of array comprehensions. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_41
Download citation
DOI: https://doi.org/10.1007/3-540-58485-4_41
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58485-8
Online ISBN: 978-3-540-49005-0
eBook Packages: Springer Book Archive