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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Moore, G.E.: Readings in Computer Architecture, pp. 56–59. Morgan Kaufmann Publishers Inc., San Francisco (2000)
Peyton Jones, S., Hammond, K.: Haskell 98 Language and Libraries, the Revised Report. Cambridge University Press (2003)
Opdyke, W.F.: Refactoring Object-Oriented Frameworks. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign, Champaign, IL, USA (1992)
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)
Hallgren, T.: Haskell Tools from the Programatica Project. In: ACM SIGPLAN Workshop on Haskell, pp. 103–106. ACM Press, Uppsala (2003)
Lämmel, R., Visser, J.: A Strafunski Application Letter. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 357–375. Springer, Heidelberg (2002)
Trinder, P.W., Hammond, K., Loidl, H.W., Peyton Jones, S.L.: Algorithm + Strategy = Parallelism. J. of Functional Programming 8(1), 23–60 (1998)
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)
Loogen, R., Ortega-Mallén, Y., Peña-Marí, R.: Parallel Functional Programming in Eden. J. of Functional Programming 15(3), 431–475 (2005)
Brown, C.: Tool Support for Refactoring Haskell Programs. PhD thesis, Computing Laboratory, University of Kent, Canterbury, Kent, UK (September 2008)
Li, H.: Refactoring Haskell Programs. PhD thesis, School of Computing, University of Kent, Canterbury, Kent, UK (September 2006)
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)
Kennedy, K., McKinley, K.S., Tseng, C.W.: Interactive Parallel Programming using the ParaScope Editor. IEEE Trans. Parallel Distrib. Syst. 2, 329–341 (1991)
Wloka, J., Sridharan, M., Tip, F.: Refactoring for Reentrancy. In: ESEC/FSE 2009, pp. 173–182. ACM, Amsterdam (2009)
Dig, D.: A Refactoring Approach to Parallelism. IEEE Softw. 28, 17–22 (2011)
Hammond, K., Berthold, J., Loogen, R.: Automatic Skeletons in Template Haskell. Parallel Processing Letters 13(3), 413–424 (2003)
Scaife, N., Horiguchi, S., Michaelson, G., Bristow, P.: A Parallel SML Compiler Based on Algorithmic Skeletons. J. Funct. Program. 15, 615–650 (2005)
Marlow, S., Newton, R., Peyton Jones, S.: A Monad for Deterministic Parallelism. In: Intl. Conference on Functional Programming (ICFP 2011) (2011) (submitted)
Epstein, J., Black, A., Peyton Jones, S.: Towards Haskell in the Cloud. In: 4th ACM SIGPLAN Symposium on Haskell. ACM Press, Tokyo (2011)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)