期刊文献+

基于源代码静态分析的C++0x泛型概念抽取 被引量:10

Using Static Analysis to Extract C++0x Concepts
下载PDF
导出
摘要 使用泛型概念对领域知识进行抽象是泛型程序设计方法的基础.在新的C++0x标准中泛型概念将成为一个新的语言设施,这将为设计可复用、可扩展的泛型软件提供坚实的基础.为了更好地利用C++0x的新特性,有必要识别C++遗产代码中的泛型概念,并通过重构得到符合C++0x标准的代码.文中提出了一种基于代码静态分析的泛型概念自动识别方法,通过对泛型程序中类型参数的使用分析,从遗产代码中提取有效表达式约束和关联类型约束,进而推导出泛型概念.将该方法应用于C++标准模板库STL,可以识别出STL算法中绝大部分潜在的泛型概念,表明该方法有助于识别遗产代码中的泛型概念. Using Concepts to abstract domain knowledge is the basis for generic programming. Concept will be a new language feature in C++0x, which provides solid base for developing reusable and extendable generic software. To make better use of new generic programming features of C++0x, it is necessary to identify Concepts in legacy C++ programs, and refactor them to C++0x programs. This paper presents an automatic method to identify Concepts with static analysis, analyzes the usages of type parameters in legacy programs to extract valid expression constraints and associate type constraints. Concepts can be inferred by these constraints. The approach is applied to the C++ Standard Template Library to identify most of the potential Concepts in STIr. The study convinces that this method is helpful to identify Concepts in legacy C++ programs.
作者 陈林 徐宝文
出处 《计算机学报》 EI CSCD 北大核心 2009年第9期1792-1803,共12页 Chinese Journal of Computers
基金 国家自然科学基金重大研究计划(90818027) 重点项目(60633010) 国家"八六三"高技术研究发展计划目标导向类项目(2009AA01Z147)资助~~
关键词 泛型程序设计 软件重构 泛型概念 C++0x 约束分析 generic programming software refactoring Concept C++ 0x constraint analysis
  • 相关文献

参考文献17

  • 1Austern M H. Generic Programming and the STL. Professional Computing Series. Boston: Addison-Wesley, 1999.
  • 2Andrei Alexandrescu. Modern C ++ Design: Generic Pro gramming and Design Patterns Applied. Boston, MA: Addison-Wesley Longman Publishing Co. , Inc. , 2001.
  • 3Plauger P, Stepanov A A, Lee M, Musser D R. The C++ Standard Template Library. Prentice Hall PTR, 2000.
  • 4Gregor D, Jarvi J, Siek J, Stroustrup B, DosReis G, Lumsdaine A. Concepts: Linguistic support for generic programming in C++//Proceedings of the Object-Oriented Programruing, Systems, Languages, and Applications(OOPSLA'06). Portland, Oregon, USA, 2006:291- 310.
  • 5Sick J, Lumsdaine A. Language requirements for large-scale generic libraries//Proceedings of the 4th International Conference on Generative Programming and Component Engi neering (GPCE'05). Tailinn, Estonia, 2005. New York: ACM, 2006:405-421.
  • 6Garcia R, Jarvi J, Lumsdaine R et al. A comparative study of language support for generic programming//Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, Anaheim, California, USA, 2003:115-134.
  • 7Chen Lin, Xu Bao Wen, Zhou Tian-Lin, Shi Liang, He Yan-Xiang. Refactoring C++ programs with concepts//Proceedings of the 9th IASTED International Conference on Software Engineering and Applications. Phoenix, AZ, USA, 2005.
  • 8Chen Lin, Xu Bao-wen, Zhou Tian-lin, Zhou Yu-Ming. Applying generalization refactoring to Java generic programs// Proceedings of the 1st IEEE International Workshop on Semantic Computing and Systems. Huangshan, China, 2008: 35-39.
  • 9周毓明,徐宝文,seu.edu.cn.一种利用模块内聚性的对象抽取方法[J].软件学报,2000,11(4):557-562. 被引量:12
  • 10Sutton Andrew, Maletic Jonathan I. Automatically identifying C-U+0x concepts in function templates//Proeeedings of the 24th IEEE International Conference on Software Maintenance (ICSM 2008). Beijing, China, 2008:57-66.

二级参考文献2

  • 1Li Bangqing,Proceedings of the ACM SIGAda Annual International Conference,1998年,240页
  • 2Liu S S,Proceedings of the IEEE Conference on Software Maintenance,1990年,266页

共引文献11

同被引文献95

引证文献10

二级引证文献26

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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