Automated support for program refactoring using invariants

被引:75
作者
Kataoka, Y [1 ]
Ernst, MD [1 ]
Griswold, WG [1 ]
Notkin, D [1 ]
机构
[1] Univ Washington, Dept Comp Sci & Engn, Seattle, WA 98195 USA
来源
IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS: SYSTEMS AND SOFTWARE EVOLUTION IN THE ERA OF THE INTERNET | 2001年
关键词
D O I
10.1109/ICSM.2001.972794
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Program refactoring - transforming a program to improve readability, structure, performance, abstraction, maintainability, or other features - is not applied in practice as much as might be desired. One deterrent is the cost of detecting candidates for refactoring and of choosing the appropriate refactoring transformation. This paper demonstrates the feasibility of automatically finding places in the program that are candidates for specific refactorings. The approach uses program invariants: when a particular pattern of invariant relationships appears at a program point, a specific refactoring is applicable. Since most programs lack explicit invariants, an invariant detection tool called Daikon is used to infer the required invariants. We developed an invariant pattern matcher for several common refactorings and applied it to an existing Java code base. Numerous refactorings were detected, and one of the developers of the code base assessed their efficacy.
引用
收藏
页码:736 / 743
页数:4
相关论文
共 25 条
[1]  
[Anonymous], 2000, THESIS U WASHINGTON
[2]  
BAKER HG, 1995, SIGPLAN NOTICES, V30, P45, DOI 10.1145/199818.199860
[3]  
Beck K., 1999, EXTREME PROGRAMMING
[4]  
BOWDIDGE RW, 1998, ACM T SOFTWARE ENG M, V7
[5]  
BOWDIDGE RW, 1995, CS95457 U CAL DEP CO
[6]  
Ernst M. D., 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium, P449, DOI 10.1109/ICSE.2000.870435
[7]  
Ernst M. D., 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002), P213, DOI 10.1109/ICSE.1999.841011
[8]  
Ernst M. D., 1999, P INT C SOFTW ENG, P1
[9]   Dynamically discovering likely program invariants to support program evolution [J].
Ernst, MD ;
Cockrell, J ;
Griswold, WG ;
Notkin, D .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2001, 27 (02) :99-123
[10]  
Fowler M., 2018, Refactoring: improving the design of existing code, V2nd