ACM Home Page
Please provide us with feedback. Feedback
Refactoring for reentrancy
Full text PdfPdf (579 KB)
Source
Foundations of Software Engineering archive
Proceedings of the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering on European software engineering conference and foundations of software engineering symposium table of contents
Amsterdam, The Netherlands
SESSION: Software quality & performance table of contents
Pages 173-182  
Year of Publication: 2009
ISBN:978-1-60558-001-2
Authors
Jan Wloka  Rutgers University, Piscataway, NJ, USA
Manu Sridharan  IBM T. J. Watson Research Center, Yorktown Heights, NY, USA
Frank Tip  IBM T. J. Watson Research Center, Yorktown Heights, NY, USA
Sponsors
ACM: Association for Computing Machinery
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 16,   Downloads (12 Months): 53,   Citation Count: 0
Additional Information:

abstract   references   index terms  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1595696.1595723
What is a DOI?

ABSTRACT

A program is reentrant if distinct executions of that program on distinct inputs cannot affect each other. Reentrant programs have the desirable property that they can be deployed on parallel machines without additional concurrency control. Many existing Java programs are not reentrant because they rely on mutable global state. We present a mostly-automated refactoring that makes such programs reentrant by replacing global state with thread-local state and performing each execution in a fresh thread. The approach has the key advantage of yielding a program that is obviously safe for parallel execution; the program can then be optimized selectively for better performance. We implemented this refactoring in Reentrancer, a practical Eclipse-based tool. Reentrancer successfully eliminated observed reentrancy problems in five single-threaded Java benchmarks. For three of the benchmarks, Reentrancer enabled speedups on a multicore machine without any further code modification.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
BCEL: The Byte Code Engineering Library. http://jakarta.apache.org/bcel/.
 
2
Static version of Coco/R. http://www.ssw.unilinz.ac.at/coco/static.html.
 
3
C# language specification, 2006. http://www.ecmainternational.org/publications/les/ECMA-ST/Ecma-334.pdf.
 
4
D. Dig. Automated upgrading of component-based applications. PhD thesis, University of Illinois at Urbana-Champaign, 2007.
 
5
D. Dig, J. Marrero, and M. Ernst. Refactoring sequential Java code for concurrency. In Proc. ICSE'09, 2009.
 
6
D. Dig, J. Marrero, and M. D. Ernst. How do programs become more concurrent? a story of program transformations. Technical Report MIT-CSAIL-TR-2008-053, MIT CSAIL, Cambridge, MA, Sept. 5, 2008.
 
7
H. Do, S. Elbaum, and G. Rothermel. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Soft. Eng., 10(4), 2005.
 
8
M. Fähndrich, D. Garbervetsky, and W. Schulte. A static analysis to detect re-entrancy in object oriented programs. J. Object Technology, 7(5), 2008.
 
9
M. Fowler. Refactoring. Improving the Design of Existing Code. Addison-Wesley, 1999.
 
10
M. Frigo, P. Halpern, C. E. Leiserson, and S. Lewin-Berlin. Reducers and other Cilk++ hyperobjects. In Symposium on Parallelism in Algorithms and Architectures (SPAA), 2009.
 
11
R. Fuhrer, F. Tip, A. Kieżun, J. Dolby, and M. Keller. Efficiently refactoring Java applications to use generic libraries. In Proc. ECOOP'05, pages 71--96, Glasgow, Scotland, 2005.
 
12
W. G. Griswold. Program Restructuring as an Aid to Software Maintenance. PhD thesis, University of Washington, 1991. Tech. Rep. 91-08-04.
 
13
JavaCC. https://javacc.dev.java.net/.
 
14
M. Jordan, G. Czajkowski, K. Kouklinski, and G. Skinner. Extending a J2EE server with dynamic and exible resource management. In Proc. 5th ACM/IFIP/USENIX Int. Conf. on Middleware (Middleware'04), pages 439--458, 2004.
 
15
D. H. Ken Arnold, James Gosling. The Java Language Specification. Prentice Hall, 3rd edition, 2005.
 
16
T. Mens and T. Tourwé. A survey of software refactoring. IEEE Trans. on Softw. Eng., 30(2):126{139, Feb. 2004.
 
17
W. F. Opdyke. Refactoring Object-Oriented Frameworks. PhD thesis, University Of Illinois at Urbana-Champaign, 1992.
 
18
J. Quinonez, M. S. Tschantz, and M. D. Ernst. Inference of reference immutability. In Proc. ECOOP'08, pages 616--641, Paphos, Cyprus, 2008.
 
19
W. Stallings. Operating Systems: Internals and Design Principles. Prentice Hall, 2008.
 
20
M. S. Tschantz and M. D. Ernst. Javari: Adding reference immutability to Java. In Proc. OOPSLA'05, San Diego, CA, 2005.
 
21
T. J. Watson Libraries for Analysis (WALA). http://wala.sf.net.
 
22
Apache XML Security. http://santuario.apache.org/.
 
23
Y. Zibin, A. Potanin, M. Ali, S. Artzi, A. Kieżun, and M. D. Ernst. Object and reference immutability using Java generics. In Proc. ESEC/FSE'07, 2007.