Skip to main content

Flattening Is an Improvement

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1824))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Blelloch, G.E.: Vector Models for Data-Parallel Computing. MIT Press, Cambridge (1990)

    Google Scholar 

  2. Blelloch, G.E.: NESL: A nested data-parallel language (version 3.0). Technical report, Carnegie-Mellon University, Department of Computer Science (1994)

    Google Scholar 

  3. Blelloch, G.E.: Programming parallel algorithms. Communications of the ACM 39(3) (1996)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. Blelloch, G.E., Greiner, J.: A provable time and space efficient implementation of NESL. In: International Conference on Functional Programming (1996)

    Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. Blelloch, G.E., Sabot, G.W.: Compiling collection-oriented languages onto massively parallel computers. Journal of Parallel and Distributed Computing 8, 119–134 (1990)

    Article  Google Scholar 

  8. Brent, R.P.: The parallel evaluation of generic arithmetic expressions. Journal of the ACM 21(2), 201–206 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  9. Engelhardt, D., Wendelborn, A.: A partitioning-independent paradigm for nested data parallelism. International Journal of Parallel Programming 24(4), 291–317 (1996)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. Hermenegildo, M., Carro, M.: Relating data-parallelism and (and-)parallelism in logic programs. The Computer Languages Journal 22(2/3), 143–163 (1996)

    Article  Google Scholar 

  14. Hudak, P., Peyton Jones, S., Wadler, P.: Report on the programming language Haskell version 1.2. ACM SIGPLAN notices, 27(5) (May 1992)

    Google Scholar 

  15. C. Jay. The FISh language definition. http://www-staff.socs.uts.edu.au/~cbj/ Publications/fishdef.ps.gz, 1998.

    Google Scholar 

  16. Jay, C.: Costing parallel programs as a function of shapes. Science of Computer Programming (1999)

    Google Scholar 

  17. Keller, G.: Transformation-Based Implementation of Nested Data-Parallelism for Distributed Memory Machines. PhD thesis, TU Berlin (1999)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Palmer, D.W.: Efficient Execution of Nested Data Parallel Programs. PhD thesis, University of North Carolina (1996)

    Google Scholar 

  21. Palmer, D.W., Prins, J.F., Westfold, S.: Work-efficient nested data-parallelism. In: Frontiers 1995 (1995)

    Google Scholar 

  22. Pontelli, E., Gupta, G.: Nested parallel call optimization. In: International Parallel Processing Symposium, IEEE Computer Society Press, Los Alamitos (1996)

    Google Scholar 

  23. Prins, J., Ballabio, M., Boverat, M., Hodous, M., Maric, D.: Fast primitives for irregular computations on the nec sx-4. Crosscuts 6(4) (1997)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. Ramakrishnan, V., Sherson, I., Subramanian, R.: Efficient techniques for fast nested barrier synchronization. In: ACM Symposium on Parallel Algorithms and Architectures (1995)

    Google Scholar 

  26. 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)

    Google Scholar 

  27. Riely, J.: Applications of Abstraction for Concurrent Programs. PhD thesis, University of North Carolina at Chapel Hill (1999)

    Google Scholar 

  28. 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)

    Google Scholar 

  29. Sands, D.: Proving the correctness of recursion-based automatic program transformations. Theoretical Computer Science 167(10) (October 1996)

    Google Scholar 

  30. 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)

    Article  MathSciNet  Google Scholar 

  31. Skillicorn, D.B., Cai, W.: A cost calculus for parallel functional programming, Queens University Department of Computer Science TR-93-348 (1994)

    Google Scholar 

  32. 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)

    Google Scholar 

  33. Suciu, D.: Parallel Programming Languages for Collections. PhD thesis, University of Pennsylvania (1995)

    Google Scholar 

  34. 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)

    Google Scholar 

  35. Wadler, P.: Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science 73, 231–248 (1990)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics