Computer Science ›› 2015, Vol. 42 ›› Issue (11): 84-89.doi: 10.11896/j.issn.1002-137X.2015.11.017

Previous Articles     Next Articles

Automated Refactoring Framework for Java Locks

ZHANG Yang, ZHANG Dong-wen and QIU Jing   

  • Online:2018-11-14 Published:2018-11-14

Abstract: Java locks,such as synchronized,ReentrantLock,and ReadWriteLock,often obtain different performances when applied on different data structures.To learn about which lock will obtain the best performance,there is a strong need to transform from one lock to another automatically.This paper presented an automated refactoring framework for the transformation of Java locks.The framework extensively relies on static program analysis to perform the refacto-ring.The evaluation was performed using three benchmarks,such as red-black tree,producer-consumer problem and SPECjbb2005.The successful refactoring results are observed and the time of the refactoring is acceptable.

Key words: Java lock,Software refactoring,Program analysis,Bytecode transformation

[1] Kiczales G,Lamping J,Mendhekar A,et al.Aspect-oriented programming[C]∥Proceedings of European Conference on Object-Oriented Programming.Jyvaskyla,Finland,1997:241-268
[2] Barnes G.A method for implementing lock-free shared-datastructures [C]∥Proceedings of the fifth annual ACM symposium on Parallel algorithms and architectures.Velen,Germany,1993:261-270
[3] Shavit N,Touitou D.Software transactional memory[J].Distributed Computing,1997,10(2):99-116
[4] Whaley J.Joeq:A virtual machine and compiler infrastructure[J].Science of Computer Programming,2005,57(3):339-356
[5] Chiba S.Javassist—a reflection-based programming wizard for Java[C]∥Proceedings of OOPSLA’98 Workshop on Reflective Programming in C++ and Java.Denver,Colorado,1998:92-115
[6] Oracle.Java API Specification [EB/OL].(2011-11-23).http://download.oracle.com/javase/6/docs/api/java/util/concurrent/locks/package-summary.html
[7] Herlihy M,Luchangco V,Moir M.A flexible framework for implementing software transactional memory[J].ACM Sigplan Notices,2006,11(2):253-262
[8] Zhang Y,Zhang J,Zhang D.Implementing and testing Producer-consumer problem using aspect-oriented programming[C]∥Proceedings of Fifth International Conference on Information Assurance and Security.Xi’an,China,2009:749-752
[9] Adamson A,Dagastine D,Sarne S.SPECjbb2005--A year in the life of a benchmark[C]∥Proceedings of 2007 SPEC Benchmark Workshop.Austin,USA,2007:151-160
[10] Dig D,Marrero J,Ernst M D.Refactoring sequential Java code for concurrency via concurrent libraries[C]∥Proceedings of IEEE 31st International Conference on Software Engineering.Vancouver,Canada,2009:397-407
[11] Franklin L,Gyori A,Lahoda J,et al.LAMBDAFICATOR:from imperative to functional programming through automated refactoring[C]∥Proceedings of the 2013 International Conference on Software Engineering.San Francisco,USA,2013:1287-1290
[12] Schafer M,Sridharan M,Dolby J,et al.Refactoring java programs for flexible locking[C]∥Proceedings of 33rd InternationalConference on Software Engineering (ICSE).Hawaii,USA,2011:71-80
[13] Brown C,Hammond K,Danelutto M,et al.Paraphrasing:Genera-ting Parallel Programs Using Refactoring[J].Formal Methods for Components and Objects,2013,10(8):237-256
[14] Zhang C.FlexSync:An aspect-oriented approach to Java syn-chronization[C]∥Proceedings of the 31st International Confe-rence on Software Engineering.Vancouver,Canada,2009:375-385
[15] McCloskey B,Zhou F,Gay D,et al.Autolocker:synchronization inference for atomic sections[J].ACM SIGPLAN Notices,2006,23(2):346-358
[16] 赵思奇.面向并发的程序重构技术研究[D].南京:东南大学,2010 Zhao Si-qi.A novel approach of concurrency-oriented software refactoring[D].Nanjing:Southeast University,2010
[17] 吕建,杨大军,廖宇,等.一种并发面向对象同步模型研究[J].软件学报,2002,13(1):71-80 Lv Jian,Yang Da-jun,Liao Yu,et al.Research on a Concurrent Object-Oriented Synchronization Model[J].Journal of Software,2002,13(1):71-80
[18] 陶彬贤,张磊,钱巨.Java程序自动锁分解重构[J].计算机科学与探索,2013,7(5):451-459 Tao Xian-bin,Zhang Lei,Qian Ju.Automated Split Lock Refactoring for Java Programs[J].Journal of Frontiers of Computer Science and Technology,2013,7(5):451-459

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!