期刊文献+

一种基于类型传播分析的泛型实例重构方法 被引量:3

Refactoring Generic Instantiations Based on Type Propagation Analysis
下载PDF
导出
摘要 重构泛型实例有利于提高软件的复用性和类型安全,但现有重构方法的时间复杂度较高,不适用于即时持续的重构.分析了变量类型传播分析方法在重构中的不足,提出了一种改进的泛型变量类型传播分析方法.该方法通过引入一种可以描述复杂参数化类型关系的泛型类型传播图,以复制节点的方式实现泛型变量属性敏感的类型分析,并通过解决别名问题来提高分析的精度.实例研究表明,可以在与程序规模呈近似线性增长的时间复杂度内实施重构,取得了较满意的效果. Refactoring generic instantiation is valuable for improving reusability and type safety of software. Most of the existing approaches of refactoring legacy code are not suitable for on-line and persistent refactoring because of their complexity. This paper proposes an instantiation refactoring approach for Java programs based on an extended variable type analysis algorithm. A generic type propagation graph is constructed, and new constructs used to express generic type analysis are added to the graph, so it is suitable to do a generic variable field sensitive type analysis. The paper also discusses how to use alias information to improve the refactoring. The case study shows that the results are satisfactory.
出处 《软件学报》 EI CSCD 北大核心 2009年第10期2617-2627,共11页 Journal of Software
基金 国家自然科学基金Nos.90818027 60633010 国家高技术研究发展计划(863)No.2009AA01Z147~~
关键词 泛型 软件重构 类型传播分析 别名分析 软件重用 generic software refactoring type propagation analysis alias analysis software reuse
  • 相关文献

参考文献2

二级参考文献13

  • 1徐宝文.Ada95保护对象与面向数据的同步[J].计算机研究与发展,1997,34(1):72-77. 被引量:6
  • 2Li Bangqing,Proceedings of ACMSIGAda Annual International Conference (SIGAda’98),1998年,240页
  • 3J Gosling,B Joy,G Steele, G Bracha.The Java Language Specification, Third Edition[ M]. Addison-Wesley Longman Publishing Co. ,Inc. , Boston , MA , USA,2005.
  • 4Fowler,M. Refactoring. Improving the Design of Existing Code [M]. Addison-Wesley, 1999.
  • 5F Tip,A Kiezun,D Baumer. Refactoring for generalization using type constraints[ A] .In ACM Symposium on Object Oriented Programming: Systems, Languages, and Applications ( OOPSLA) [C]. Anaheim,CA,2003.13 - 26.
  • 6Seguin C. Refactoring tool challenges in a strongly typed language[A]. In OOPSLA' 00 Companion[ C]. October 2000. 101 - 102.
  • 7Halloran T J, Scherlis W L. Models of thumb: assuring best practice source code in large Java software systems[R]. Tech Rep Fluid Project, School of Computer Science/ISRI, Carnegie Mellon University, 21XE.
  • 8Eclipse. org. Eclipse [ OL]. http://www. eclipse. org.
  • 9JETBRAINS, INC. IntelliJ IDEA[OL]. http://www. intellij. com.
  • 10Kiezun, M D Ernst, F Tip, R Fuhrer. Refactoring for parameterizing Java classes[A].In ICSE'07, Proceedings of the 29th International Conference on Software Engineering[C]. Minneapolis,MN, USA,May 23 - 25,2007.

共引文献2

同被引文献19

引证文献3

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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