面向Java多线程机制的软件重构方法  被引量:9

Software Refactoring for Java Threads

在线阅读下载全文

作  者:张杨[1] 柳晨光[1] 张冬雯[1] 郑琨[1] 郑雅洁[1] ZHANG Yang;LIU Chen-guang;ZHANG Dong-wen;ZHENG Kun;ZHENG Ya-jie(School of Information Science and Engineering,Hebei University of Science and Technology, Shijiazhuang,Hebei 050000,China)

机构地区:[1]河北科技大学信息科学与工程学院,河北石家庄050000

出  处:《北京理工大学学报》2018年第11期1149-1155,共7页Transactions of Beijing Institute of Technology

基  金:国家自然科学基金资助项目(61440012);河北省自然科学基金资助项目(F2016208007);河北省自然科学基金重点基础研究专项(18960106D);河北省高等学校青年拔尖人才计划项目(BJ2014023);河北省教育厅科学研究项目(QN2016139)

摘  要:针对Java语言中Thread和Executor两种线程机制在线程管理模式、代码编写量和性能上的不同,提出了一种面向Java多线程机制的软件自动重构方法,该方法可以实现Thread和Executor之间的自动重构转换,进而帮助程序员选择更适合的线程机制.在Eclipse JDT环境下实现了从Thread到Executor的自动重构工具Rethreader.在实验中,使用Rethreader对JGF基准测试程序套件中的Series、Crypt、Lufact、Sparsematmult和Montecarlo等基准程序进行了重构测试,实验结果表明,Rethreader可以在小于1s的短时间内实现从Thread到Executor的转换.Java thread mechanisms,such as Thread and Executor,are different in the thread management pattern,code and the performance.To implement the automated refactoring between different thread mechanism and help programmers to choose the right thread mechanism,an automated refactoring method was proposed for Java thread mechanism able refactoring between Thread and Executor.To test the validity of the method,an automated refactoring tool named Rethreader was developed in Eclipse JDT.In the experimentation,several programs in the Java Grande Form(JGF)were tested,including Series,Crypt,Lufact,Sparsematmult and montecarlo.The experimental results show that the Rethreader can successfully implement the automatic refactoring from Thread to Executor within 1 s.

关 键 词:Thread框架 Executor框架 软件重构 软件分析 抽象语法树 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象