基于切片度量的重构对象识别  被引量:3

Slice-based metrics for identifying refactoring

在线阅读下载全文

作  者:张重峰[1] 李必信[1] 孙小兵[1] 陶传奇[1] 

机构地区:[1]东南大学计算机科学与工程学院,南京211189

出  处:《东南大学学报(自然科学版)》2010年第2期275-281,共7页Journal of Southeast University:Natural Science Edition

基  金:国家自然科学基金资助项目(60773105);国家高技术研究发展计划(863计划)资助项目(2007AA01Z141);教育部新世纪优秀人才支持计划资助项目(NCET-06-0466)

摘  要:为了提高识别重构对象的效率和正确性,提出一种自动化识别重构对象的技术.首先,在程序切片的基础上,构造一种度量函数来量化元素间的依赖程度.然后,利用度量结果识别出在原程序的位置和从属关系不合理的元素,从而自动识别出程序中的"坏味道".与以往的手动识别相比,该方法可以自动地分析源代码,指出程序中不合理的地方,从而提高重构识别的效率,并建议使用相应的重构手段对"坏味道"实施更改,使代码更加合理、易于维护.最后,利用3个重构实例显示该方法能够识别出一些重构对象,从而验证了该方法的可行性.In order to improve the efficiency and accuracy of identifying refactoring,an automated refactoring identification technology is presented.First,a measurement method based on program slicing is constructed to quantify the program dependence between the elements.Secondly,the elements with unreasonable location and affiliation in the original code are identified using measurement results,and thus program's "bad smell" is automatically identified.Compared with previous manual identification,the method can automatically analyze the source code and point out the unreasonable code,so the efficiency of refactoring identification is improved.It is recommended to change "bad smell" using the corresponding refactoring,which may make the code more reasonable and easier to maintain.Finally,three refactoring examples demonstrate that the method can identify some objects of refactoring,which verify the feasibility of the method.

关 键 词:程序切片 距离函数 控制度函数 度量 重构识别 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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