Abstract
Refactoring is the process of changing the structure of a program without changing its behaviour. Refactoring has so far only really been deployed effectively for sequential programs. However, with the increased availability of multicore (and, soon, manycore) systems, refactoring can play an important role in helping both expert and non-expert parallel programmers structure and implement their parallel programs. This paper describes the design of a new refactoring tool that is aimed at increasing the programmability of parallel systems. To motivate our design, we refactor a number of examples in C, C++ and Erlang into good parallel implementations, using a set of formal pattern rewrite rules.
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
Netflix Prize Forum/Grand Prize Award (September 2009), http://www.netflixprize.com/community/viewtopic.php?id=1537
Aldinucci, M., Danelutto, M.: Stream Parallel Skeleton Optimization. In: Proc. of PDCS: Intl. Conference on Parallel and Distributed Computing and Systems, pp. 955–962. IASTED, ACTA Press, Cambridge, Massachusetts (1999)
Aldinucci, M., Danelutto, M., Kilpatrick, P., Meneghin, M., Torquati, M.: Accelerating Code on Multi-cores with FastFlow. In: Jeannot, E., Namyst, R., Roman, J. (eds.) Euro-Par 2011, Part II. LNCS, vol. 6853, pp. 170–181. Springer, Heidelberg (2011)
Backus, J.: Can Programming be Liberated from the von Neumann Style? Communications of the ACM 21(8), 613–641 (1978)
Benkner, S., Pllana, S., Träff, J.L., Tsigas, P., Dolinsky, U., Augonnet, C., Bachmayer, B., Kessler, C.W., Moloney, D., Osipov, V.: PEPPHER: Efficient and Productive Usage of Hybrid Computing Systems. IEEE Micro 31(5), 28–41 (2011)
Bird, R.S.: Lectures on Constructive Functional Programming. In: Broy, M. (ed.) Constructive Methods in Computer Science. NATO ASI Series F, vol. 55, pp. 151–218. Springer (1988); Also available as Technical Monograph PRG-69, from the Programming Research Group, Oxford University
Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/xt 0.17. A Language and Toolset for Program Transformation. Sci. Comput. Program. 72(1-2), 52–70 (2008)
Brown, C., Li, H., Thompson, S.: An Expression Processor: A Case Study in Refactoring Haskell Programs. In: Page, R., Horváth, Z., Zsók, V. (eds.) TFP 2010. LNCS, vol. 6546, pp. 31–49. Springer, Heidelberg (2011)
Brown, C., Loidl, H.-W., Hammond, K.: ParaForming: Forming Parallel Haskell Programs Using Novel Refactoring Techniques. In: Peña, R., Page, R. (eds.) TFP 2011. LNCS, vol. 7193, pp. 82–97. Springer, Heidelberg (2012)
Burstall, R.M., Darlington, J.: A Transformation System for Developing Recursive Programs. J. ACM 24(1), 44–67 (1977)
Cesarini, F., Thompson, S.: ERLANG Programming, 1st edn. O’Reilly Media, Inc. (2009)
Dig, D.: A Refactoring Approach to Parallelism. IEEE Softw. 28, 17–22 (2011)
Gemulla, R., Haas, P.J., Sismanis, Y., Teflioudi, C., Makari, F.: Large-Scale Matrix Factorization with Distributed Stochastic Gradient Descent. In: NIPS 2011 Workshop on Big Learning, Sierra Nevada, Spain (December 2011)
Hammond, K., Aldinucci, M., Brown, C., Cesarini, F., Danelutto, M., González-Vélez, H., Kilpatrick, P., Keller, R., Rossbory, M., Shainer, G.: The ParaPhrase: Project: Parallel Patterns for Adaptive Heterogeneous Multicore Systems. In: Beckert, B., de Boer, F., Bonsangue, M., Damiani, F. (eds.) FMCO 2011. LNCS, vol. 7542, pp. 218–236. Springer, Heidelberg (2012)
Klusik, U., Loogen, R., Priebe, S., Rubio, F.: Implementation Skeletons in Eden: Low-Effort Parallel Programming. In: Mohnen, M., Koopman, P. (eds.) IFL 2000. LNCS, vol. 2011, pp. 71–88. Springer, Heidelberg (2001)
Koren, Y., Bell, R., Volinsky, C.: Matrix Factorization Techniques for Recommender Systems. IEEE Computer 42(8), 30–37 (2009)
Li, H., Thompson, S.: A Comparative Study of Refactoring Haskell and Erlang Programs. In: SCAM 2006, pp. 197–206. IEEE (September 2006)
Li, H., Thompson, S.: A Domain-Specific Language for Scripting Refactorings in Erlang. Technical Report 5-11, University of Kent (October 2011)
Li, H., Thompson, S.: A User-extensible Refactoring Tool for Erlang Programs. Technical Report 4-11, University of Kent (October 2011)
Matsuzaki, K., Iwasaki, H., Emoto, K., Hu, Z.: A Library of Constructive Skeletons for Sequential Style of Parallel Programming. In: Proceedings of the 1st International Conference on Scalable Information Systems, InfoScale 2006. ACM, New York (2006)
Mens, T., Tourwé, T.: A Survey of Software Refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)
Moore, G.E.: Cramming more components onto integrated circuits. In: Readings in Computer Architecture, pp. 56–59. Morgan Kaufmann Publishers Inc., San Francisco (2000)
Nugteren, C., Corporaal, H., Mesman, B.: Skeleton-based Automatic Parallelization of Image Processing Algorithms for GPUs. In: ICSAMOS 2011, pp. 25–32 (2011)
Opdyke, W.F.: Refactoring Object-Oriented Frameworks. PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign, Champaign, IL, USA (1992)
Padioleau, Y., Lawall, J.L., Muller, G.: SmPL: A Domain-Specific Language for Specifying Collateral evolutions in Linux device drivers. In: International ERCIM Workshop on Software Evolution, Lille, France (April 2006)
Partsch, H., Steinbruggen, R.: Program Transformation Systems. ACM Comput. Surv. 15(3), 199–236 (1983)
Sankaran, S., Squyres, J.M., Barrett, B., Lumsdaine, A., Duell, J., Hargrove, P., Roman, E.: The LAM/MPI Checkpoint/Restart Framework: System-Initiated Checkpointing. International Journal of High Performance Computing Applications 19(4), 479–493 (2005)
Skillicorn, D.B.: The Bird-Meertens Formalism as a Parallel Model. In: Software for Parallel Computation. NATO ASI Series F, vol. 106, pp. 120–133. Springer (1993)
Wloka, J., Sridharan, M., Tip, F.: Refactoring for Reentrancy. In: ESEC/FSE 2009, pp. 173–182. ACM, Amsterdam (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Brown, C., Hammond, K., Danelutto, M., Kilpatrick, P., Schöner, H., Breddin, T. (2013). Paraphrasing: Generating Parallel Programs Using Refactoring. In: Beckert, B., Damiani, F., de Boer, F.S., Bonsangue, M.M. (eds) Formal Methods for Components and Objects. FMCO 2011. Lecture Notes in Computer Science, vol 7542. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35887-6_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-35887-6_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-35886-9
Online ISBN: 978-3-642-35887-6
eBook Packages: Computer ScienceComputer Science (R0)