Skip to main content

ParaForming: Forming Parallel Haskell Programs Using Novel Refactoring Techniques

  • Conference paper
Trends in Functional Programming (TFP 2011)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7193))

Included in the following conference series:

Abstract

Enabling programmers to “think parallel” is critical if we are to be able to effectively exploit future multicore/manycore architectures. This paper introduces paraforming: a new approach to constructing parallel functional programs using formally-defined refactoring transformations. We introduce a number of new refactorings for Parallel Haskell that capture common parallel abstractions, such as divide-and-conquer and data parallelism, and show how these can be used by HaRe, the Haskell Refactorer. Using a paraforming approach, we are able to easily obtain significant and scalable speedups (up to 7.8 on an 8-core machine).

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Moore, G.E.: Readings in Computer Architecture, pp. 56–59. Morgan Kaufmann Publishers Inc., San Francisco (2000)

    Google Scholar 

  2. Peyton Jones, S., Hammond, K.: Haskell 98 Language and Libraries, the Revised Report. Cambridge University Press (2003)

    Google Scholar 

  3. Opdyke, W.F.: Refactoring Object-Oriented Frameworks. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign, Champaign, IL, USA (1992)

    Google Scholar 

  4. Li, H., Thompson, S., Reinke, C.: The Haskell Refactorer: HaRe, and its API. In: Proc. of the 5th Workshop on Language Descriptions, Tools and Applications (LDTA 2005). Electronic Notes in Theoretical Computer Science, vol. 141(4) (April 2005)

    Google Scholar 

  5. Hallgren, T.: Haskell Tools from the Programatica Project. In: ACM SIGPLAN Workshop on Haskell, pp. 103–106. ACM Press, Uppsala (2003)

    Chapter  Google Scholar 

  6. Lämmel, R., Visser, J.: A Strafunski Application Letter. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  7. Trinder, P.W., Hammond, K., Loidl, H.W., Peyton Jones, S.L.: Algorithm + Strategy = Parallelism. J. of Functional Programming 8(1), 23–60 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  8. Marlow, S., Maier, P., Loidl, H.W., Aswad, M.K., Trinder, P.: Seq no more: Better Strategies for Parallel Haskell. In: 3rd ACM SIGPLAN Symposium on Haskell, pp. 91–102. ACM Press, Baltimore (2010)

    Chapter  Google Scholar 

  9. Loogen, R., Ortega-Mallén, Y., Peña-Marí, R.: Parallel Functional Programming in Eden. J. of Functional Programming 15(3), 431–475 (2005)

    Article  MATH  Google Scholar 

  10. Brown, C.: Tool Support for Refactoring Haskell Programs. PhD thesis, Computing Laboratory, University of Kent, Canterbury, Kent, UK (September 2008)

    Google Scholar 

  11. Li, H.: Refactoring Haskell Programs. PhD thesis, School of Computing, University of Kent, Canterbury, Kent, UK (September 2006)

    Google Scholar 

  12. Loidl, H.W., Trinder, P., Hammond, K., Junaidu, S., Morgan, R., Peyton Jones, S.: Engineering Parallel Symbolic Programs in GpH. Concurrency — Practice and Experience 11(12), 701–752 (1999)

    Article  Google Scholar 

  13. Kennedy, K., McKinley, K.S., Tseng, C.W.: Interactive Parallel Programming using the ParaScope Editor. IEEE Trans. Parallel Distrib. Syst. 2, 329–341 (1991)

    Article  Google Scholar 

  14. Wloka, J., Sridharan, M., Tip, F.: Refactoring for Reentrancy. In: ESEC/FSE 2009, pp. 173–182. ACM, Amsterdam (2009)

    Chapter  Google Scholar 

  15. Dig, D.: A Refactoring Approach to Parallelism. IEEE Softw. 28, 17–22 (2011)

    Article  Google Scholar 

  16. Hammond, K., Berthold, J., Loogen, R.: Automatic Skeletons in Template Haskell. Parallel Processing Letters 13(3), 413–424 (2003)

    Article  MathSciNet  Google Scholar 

  17. Scaife, N., Horiguchi, S., Michaelson, G., Bristow, P.: A Parallel SML Compiler Based on Algorithmic Skeletons. J. Funct. Program. 15, 615–650 (2005)

    Article  MATH  Google Scholar 

  18. Marlow, S., Newton, R., Peyton Jones, S.: A Monad for Deterministic Parallelism. In: Intl. Conference on Functional Programming (ICFP 2011) (2011) (submitted)

    Google Scholar 

  19. Epstein, J., Black, A., Peyton Jones, S.: Towards Haskell in the Cloud. In: 4th ACM SIGPLAN Symposium on Haskell. ACM Press, Tokyo (2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Brown, C., Loidl, HW., Hammond, K. (2012). ParaForming: Forming Parallel Haskell Programs Using Novel Refactoring Techniques. In: Peña, R., Page, R. (eds) Trends in Functional Programming. TFP 2011. Lecture Notes in Computer Science, vol 7193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32037-8_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32037-8_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32036-1

  • Online ISBN: 978-3-642-32037-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics