Refactoring Sequential Java']Java Code for Concurrency via Concurrent Libraries

被引:73
作者
Dig, Danny [1 ]
Marrero, John [1 ]
Ernst, Michael D. [1 ]
机构
[1] MIT, Comp Sci & Artificial Intelligence Lab, Cambridge, MA 02139 USA
来源
2009 31ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS | 2009年
关键词
D O I
10.1109/ICSE.2009.5070539
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 of writing thread-safe and scalable programs is hidden in the library. To use this package, programmers still need to reengineer existing code. This is tedious because it requires changing many lines of code, is error-prone because programmers can use the wrong APIs, and is omission-prone because programmers can miss opportunities to use the enhanced APIs. This paper presents our tool, CONCURRENCER, that enables programmers to refactor sequential code into parallel code that uses three j. u. c. concurrent utilities. CONCURRENCER does not require any program annotations. Its transformations span multiple, non-adjacent, program statements. A find-and-replace tool can not perform such transformations, which require program analysis. Empirical evaluation shows that CONCURRENCER refactors code effectively CONCURRENCER correctly identifies and applies transformations that some open-source developers overlooked. and the converted code exhibits good speedup.
引用
收藏
页码:397 / 407
页数:11
相关论文
共 16 条
[1]  
ALLEN JR, 1984, SUPERCOMPUTERS DESIG, P186
[2]  
BALABAN I, OOPSLA 05, P265
[3]  
Bik AJC, 1997, CONCURRENCY-PRACT EX, V9, P1181, DOI 10.1002/(SICI)1096-9128(199711)9:11<1181::AID-CPE335>3.0.CO
[4]  
2-F
[5]  
Dig D., 2008, MITCSAILTR2008053
[6]  
Freisleben B, 1995, COMPUT ARTIF INTELL, V14, P579
[7]  
Goetz B., 2006, Java Concurrency in Practice
[8]  
KENNEDY K, ICS 91, P433
[9]  
LEA D, 1999, CONCURRENT PROGRAMIN
[10]  
LEA D, JAVA 00, P36