Abstract
Flattening is a program transformation that eliminates nested parallel constructs, introducing flat parallel (vector) operations in their place. We define a sufficient syntactic condition for the correctness of flattening, providing a static approximation of Blelloch’s “containment”. This is acheived using a typing system that tracks the control flow of programs. Using a weak improvement preorder, we then show that the flattening transformations are intensionally correct for all well-typed programs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Blelloch, G.E.: Vector Models for Data-Parallel Computing. MIT Press, Cambridge (1990)
Blelloch, G.E.: NESL: A nested data-parallel language (version 3.0). Technical report, Carnegie-Mellon University, Department of Computer Science (1994)
Blelloch, G.E.: Programming parallel algorithms. Communications of the ACM 39(3) (1996)
Blelloch, G.E., Gibbons, P.B., Matias, Y., Zagha, M.: Accounting for memory bank conetention and delay in high-bandwidth multiprocessors. In: Proceedings of the ACM Symposium on Parallel Algorithms and Architectures, Santa Barbara, CA, pp. 84–94. ACM Press, New York (1995)
Blelloch, G.E., Greiner, J.: A provable time and space efficient implementation of NESL. In: International Conference on Functional Programming (1996)
Blelloch, G.E., Hardwick, J.C., Sipelstein, J., Zagha, M., Chatterjee, S.: Implementation of a portable nested data-parallel language. Journal of Parallel and Distributed Computing 21(1), 4–14 (1994)
Blelloch, G.E., Sabot, G.W.: Compiling collection-oriented languages onto massively parallel computers. Journal of Parallel and Distributed Computing 8, 119–134 (1990)
Brent, R.P.: The parallel evaluation of generic arithmetic expressions. Journal of the ACM 21(2), 201–206 (1974)
Engelhardt, D., Wendelborn, A.: A partitioning-independent paradigm for nested data parallelism. International Journal of Parallel Programming 24(4), 291–317 (1996)
Garcia, P.L., Hermenegildo, M., Debray, S.K.: A methodology for granularity based control of parallelism in logic programs. J. of Symbolic Computation 22, 715–734 (1998)
Ghuloum, A.M., Fisher, A.L.: Flattening and parallelizing irregular, recurrent loop nests. In: Proceedings of the Symposium on Principles and Practice of Parallel Programming, Santa Barbara, July 1995, pp. 58–67 (1995)
Gustavsson, J., Sands, D.: A foundation for space-safe transformations of call-by-need programs. In: Gordon, A.D., Pitts, A.M. (eds.) The Third International Workshop on Higher Order Operational Techniques in Semantics. Electronic Notes in Theoretical Computer Science, vol. 26, Elsevier, Amsterdam (1999)
Hermenegildo, M., Carro, M.: Relating data-parallelism and (and-)parallelism in logic programs. The Computer Languages Journal 22(2/3), 143–163 (1996)
Hudak, P., Peyton Jones, S., Wadler, P.: Report on the programming language Haskell version 1.2. ACM SIGPLAN notices, 27(5) (May 1992)
C. Jay. The FISh language definition. http://www-staff.socs.uts.edu.au/~cbj/ Publications/fishdef.ps.gz, 1998.
Jay, C.: Costing parallel programs as a function of shapes. Science of Computer Programming (1999)
Keller, G.: Transformation-Based Implementation of Nested Data-Parallelism for Distributed Memory Machines. PhD thesis, TU Berlin (1999)
Launchbury, J., Sheard, T.: Warm fusion: deriving build-catas from recursive definitions. In: Proceedings of the Conference on Functional Programming Languages and Computer Architecture, La Jolla, CA, June 1995, pp. 314–323 (1995)
Moran, A.K., Sands, D.: Improvement in a lazy context: An operational theory for call-by- need. In: Conference Record of the ACM Symposium on Principles of Programming Languages, San Antonio, pp. 43–56. ACM Press, New York (1999)
Palmer, D.W.: Efficient Execution of Nested Data Parallel Programs. PhD thesis, University of North Carolina (1996)
Palmer, D.W., Prins, J.F., Westfold, S.: Work-efficient nested data-parallelism. In: Frontiers 1995 (1995)
Pontelli, E., Gupta, G.: Nested parallel call optimization. In: International Parallel Processing Symposium, IEEE Computer Society Press, Los Alamitos (1996)
Prins, J., Ballabio, M., Boverat, M., Hodous, M., Maric, D.: Fast primitives for irregular computations on the nec sx-4. Crosscuts 6(4) (1997)
Prins, J.F., Palmer, D.W.: Transforming high-level data-parallel programs into vector operations. In: Proceedings of the Symposium on Principles and Practice of Parallel Programming, San Diego, May 1993. ACM SIGPLAN Notices, vol. 28(7), pp. 119–128 (1993)
Ramakrishnan, V., Sherson, I., Subramanian, R.: Efficient techniques for fast nested barrier synchronization. In: ACM Symposium on Parallel Algorithms and Architectures (1995)
Ramkumar, B., Kale, L.: Compiled execution of the reduced-or process model on multiprocessors. In: North American Conference on Logic Programming, MIT Press, Cambridge (1989)
Riely, J.: Applications of Abstraction for Concurrent Programs. PhD thesis, University of North Carolina at Chapel Hill (1999)
Riely, J., Prins, J., Iyer, S.: Provably correct vectorization of nested-parallel programs. In: Programming Models for Massively Parallel Computers (MPPM 1995), Berlin (December 1995)
Sands, D.: Proving the correctness of recursion-based automatic program transformations. Theoretical Computer Science 167(10) (October 1996)
Sands, D.: Total correctness by local improvement in the transformation of functional programs. ACM Transactions on Programming Languages and Systems 18(2), 175–234 (1996)
Skillicorn, D.B., Cai, W.: A cost calculus for parallel functional programming, Queens University Department of Computer Science TR-93-348 (1994)
Steele, G.L., Hillis, W.D.: Connection machine Lisp: Fine-grained parallel symbolic processing. In: Proceedings of the ACM Conference on LISP and Functional Programming, Cambridge, MA, pp. 279–297. ACM Press, New York (1986)
Suciu, D.: Parallel Programming Languages for Collections. PhD thesis, University of Pennsylvania (1995)
Suciu, D., Tannen, V.: Efficient compilation of high-level data parallel algorithms. In: Proceedings of the ACM Symposium on Parallel Algorithms and Architectures, ACM Press, New York (1994)
Wadler, P.: Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science 73, 231–248 (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Riely, J., Prins, J. (2000). Flattening Is an Improvement. In: Palsberg, J. (eds) Static Analysis. SAS 2000. Lecture Notes in Computer Science, vol 1824. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45099-3_19
Download citation
DOI: https://doi.org/10.1007/978-3-540-45099-3_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67668-3
Online ISBN: 978-3-540-45099-3
eBook Packages: Springer Book Archive