摘要
编译器的质量保证对提高软件产品的质量有着重要作用,对编译优化的测试是其中的核心部分.对编译优化的测试需要大量的测试用例程序.要构造这些测试用例,使用传统手工构造方法面临着效率低的问题,而基于文法的构造方法则针对性不足.从对优化的形式化描述出发来自动构造测试用例能克服这些缺点.本文设计并实现了一种基于形式化描述的编译优化测试用例程序生成方法.该方法基于编译优化的时序逻辑描述构造关键顶点控制流图,逐步转换为控制流图并得到用例程序.针对GCC(版本4.1.1)进行的覆盖率测试实验表明,该方法可以生成具有较高针对性的测试用例,并达到相当的覆盖程度.
Compiler quality is vital to the software development. It's a common way testing the compiler to guarantee its correctness. Optimization modules are important parts of a compiler. Testing optimization modules requires a great number of test cases. Hand coded test cases result in low productivity, and grammar based automatically generated test cases are in lack of accuracy for optimizations. A formal description based automatic test case generation method for optimizations presented in this paper overcomes these problems. The method generates test case programs for specific compiler optimizations. Experiments on coverage testing GCC-4. 1.1 show that the method generates test eases with accuracy for specific optimizations, and certain coverage is achieved.
出处
《小型微型计算机系统》
CSCD
北大核心
2009年第1期13-18,共6页
Journal of Chinese Computer Systems
基金
国家科技攻关计划项目(2005BA113A02)资助
关键词
编译器测试
覆盖率
编译优化
时序逻辑
测试用例
compiler test
coverage test
compiler optimization
temporal logic
test case