期刊文献+

Java程序自动锁分解重构 被引量:1

Automated Split Lock Refactoring for Java Programs
下载PDF
导出
摘要 许多并发程序存在同步粒度过粗的问题,可以通过锁分解等代码重构来逐步演化同步结构,提高程序并行性。然而,手工重构一方面识别重构契机较为困难,另一方面代码转换也容易出错。为克服手工重构中存在的问题,提出了一种针对Java程序的自动锁分解重构方法。它可以根据已有的同步代码,自动识别锁分解重构契机,并对相关代码进行转换。实验表明,该方法可以有效识别真实程序中的可重构代码,并准确实施转换,为并发程序的演化提供支持。 Many concurrent programs use too coarse synchronizations to protect the accesses of shared data structures. To optimize such synchronizations, people use refactorings, e.g., split lock refactoring, to gradually evolve the synchronization code for better parallelization. However, manually identifying the refactoring opportunities is difficult and code transformations by hand are error-prone. To address the problems of manual refactoring, this paper proposes an automated split lock refactoring approach for Java programs. It can automatically analyze the source code to find the refactoring opportunities and make proper code transformations. The experiment shows that the approach can find effective split lock refactoring opportunities in real projects and correctly transform the refactoring code. This indicates that the approach is helpful for concurrent program evolution.
出处 《计算机科学与探索》 CSCD 2013年第5期451-459,共9页 Journal of Frontiers of Computer Science and Technology
基金 国家自然科学基金Nos.60903026 61100034~~
关键词 JAVA 并发 同步 锁分解 重构 Java concurrency synchronization split lock refactoring
  • 相关文献

参考文献20

  • 1Aldrich J, Chambers C, Sirer E G, et al. Static analyses foreliminating unnecessary synchronization from Java pro-grams[C]//Proceedings of the 6th International Symposiumon Static Analysis (SAS ’99),Venezia, Italy, 1999. London,UK: Springer-Verlag, 1999: 19-38.
  • 2Bogda J, Holzle U. Removing unnecessary synchronizationin Java[C]//Proceedings of the 14th ACM SIGPLAN Con-ference on Object-Oriented Programming Systems,Languages,and Applications (OOPSLA’99),Colorado, USA, 1999. NewYork, NY, USA: ACM, 1999: 35-46.
  • 3Choi J-D, Gupta M, Serrano M, et al. Escape analysis forJava[C]//Proceedings of the 14th ACM SIGPLAN Confer-ence on Object-Oriented Programming Systems, Languages,and Applications (OOPSLA’99),Colorado, USA, 1999. NewYork,NY, USA: ACM, 1999: 1-19.
  • 4Ruf E. Effective synchronization removal for Java[C]//Pro-ceedings of the 2000 ACM SIGPLAN Conference on Pro-gramming Language Design and Implementation (PLDI,00),Berlin, Germany, 2002. New York, NY, USA: ACM,2002:208-218.
  • 5Stoodley M,Sundaresan V. Automatically reducing repetitivesynchronization with a just-in-time compiler for Java[C]//Proceedings of the International Symposium on Code Gen-eration and Optimization (CGO ’05), San Jose, California,USA, 2005. Washington, DC, USA: IEEE Computer Society,2005: 27-36.
  • 6Goetz B, Peierls T, Bloch J, et al. Java concurrency in prac-tice[M]. [S.l.]. Addison-Wesley, 2006.
  • 7Greenhouse A, Halloran T J, Scherlis W L. Observations onthe assured evolution of concurrent Java programs[J]. Sci-ence of Computer Programming, 2005,58(3): 384-411.
  • 8Lea D. Concurrent programming in Java: design principlesand patterns[M]. 2nd ed. [S.I.]. Addision-Wesley, 1999.
  • 9Dig D, Marrero J, Ernst M D. Refactoring sequential Java codefor concurrency via concurrent libraries[C]//Proceedings ofthe 31st IEEE International Conference on Software Engi-neering (ICSE,09),Vancouver, Canada, 2009. Washington,DC,USA: IEEE Computer Society, 2009: 397-407.
  • 10Sixth and Red River Software. LockSmith: powerful concurrency-oriented refactorings for IntelliJ IDEA[EB/OL]. [2012-06].http://www.sixthandredriver.com/locksmith.html.

同被引文献16

  • 1Kiczales G,Lamping J,Mendhekar A,et al. Aspect-oriented pro-gramming[C]//Proceedings of European Conference on Object-Oriented Programming. Jyvaskyla, Finland, 1997 ; 241-268.
  • 2Barnes G. A method for implementing lock-free shared-datastructures [C]//Proceedings of the fifth annual ACM symposiumon Parallel algorithms and architectures. Velen. Germany.1993 :261-270.
  • 3Shavit N, Touitou D. Software transactional memory [J]. Dis-tributed Computing, 1997,10(2) :99-116.
  • 4Whaley J. Joeq: A virtual machine and compiler infrastructure[J]. Science of Computer Programming, 2005,57 (3) : 339-356.
  • 5Chiba S. Javassist—a reflection-based programming wizard forJava[C] //Proceedings of OOPSLA,98 Workshop on ReflectiveProgramming in C++ and Java. Denver,Colorado,1998:92-115.
  • 6Oracle. Java API Specification [EB/OIJ. (2011-11-23). http://download oracle. com/javase/6/docs/api/java/util/concurrent/locks/package-summary, html.
  • 7Herlihy Mi Luchangco V,Moir M. A flexible framework for im-plementing software transactional memory [J]. ACM SigplanNotices, 2006,11(2): 253-262.
  • 8Zhang Y, Zhang J, Zhang D. Implementing and testing Producer-consumer problem using aspect-oriented programming [Cj //Proceedings of Fifth International Conference on InformationAssurance and Security. Xi7an,China,2009:749-752.
  • 9Adamson A,Dagastine D.Sarne S. SPECjbb2005—A year in thelife of a benchmark[C] //Proceedings of 2007 SPEC BenchmarkWorkshop. Austin, USA.2007 : 151-160.
  • 10Dig D, Marrero J, Ernst M D. Refactoring sequential Java codefor concurrency via concurrent libraries [C] // Proceedings ofIEEE 31st International Conference on Software Engineering.Vancouver, Canada,2009:397-407.

引证文献1

二级引证文献4

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部