Refactoring sequential Java code for concurrency via concurrent libraries

作者: Danny Dig , John Marrero , Michael D. Ernst

DOI: 10.1109/ICSE.2009.5070539

关键词: Software maintenanceJavaProgram analysisConcurrent computingComputer scienceSource lines of codeCode refactoringSoftware engineeringConcurrencySource codeProgramming language

摘要: Parallelizing existing sequential programs to run efficiently on multicores is hard. The Java 5 package java.util.concurrent (j.u.c.) supports writing concurrent programs: much of the complexity thread-safe and scalable hidden in library. To use this package, programmers still need reengineer code. This tedious because it requires changing many lines code, error-prone can wrong APIs, omission-prone miss opportunities enhanced APIs. paper presents our tool, Concurrencer, that enables refactor code into parallel uses three j.u.c. utilities. Concurrencer does not require any program annotations. Its transformations span multiple, non-adjacent, statements. A find-and-replace tool perform such transformations, which analysis. Empirical evaluation shows refactors effectively: correctly identifies applies some open-source developers overlooked, converted exhibits good speedup.

参考文章(17)
Bernd Freisleben, Thilo Kielmann, Automated transformation of sequential divide-and-conquer algorithms into parallel programs Computing and Informatics \/ Computers and Artificial Intelligence. ,vol. 14, pp. 579- 596 ,(1995)
Joseph Bowbeer, Doug Lea, Tim Peierls, Brian Goetz, Joshua Bloch, David Holmes, Java Concurrency in Practice ,(2006)
Doug Lea, Concurrent Programming in Java. Second Edition: Design Principles and Patterns Addison-Wesley Longman Publishing Co., Inc.. ,(1999)
John R. Allen, Ken Kennedy, PFC: A Program to Convert Fortran to Parallel Form ,(1982)
Ittai Balaban, Frank Tip, Robert Fuhrer, Refactoring support for class library migration Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applications - OOPSLA '05. ,vol. 40, pp. 265- 279 ,(2005) , 10.1145/1094811.1094832
Doug Lea, A Java fork/join framework Proceedings of the ACM 2000 conference on Java Grande. pp. 36- 43 ,(2000) , 10.1145/337449.337465
Ken Kennedy, Kathryn S. McKinley, Chau-Wen Tseng, Analysis and transformation in the ParaScope editor Proceedings of the 5th international conference on Supercomputing - ICS '91. pp. 433- 447 ,(1991) , 10.1145/109025.109126
Radu Rugina, Martin Rinard, Automatic parallelization of divide and conquer algorithms acm sigplan symposium on principles and practice of parallel programming. ,vol. 34, pp. 72- 83 ,(1999) , 10.1145/301104.301111
Matteo Frigo, Charles E. Leiserson, Keith H. Randall, The implementation of the Cilk-5 multithreaded language programming language design and implementation. ,vol. 33, pp. 212- 223 ,(1998) , 10.1145/277650.277725