摘要
变量越界是C/C++软件中的常见故障,广泛存在于C/C++软件的数值计算模块中。首先分析了变量越界故障的故障特点,并从面向具体故障的测试思想出发,结合区间运算技术给出了故障检测模型。通过对程序代码进行预处理,生成程序的控制流图,结合静态测试的特点,在遍历控制流图的基础上给出了这些故障的一种静态查找方法。该方法已被实现并测试了部分软件,实验效果表明该方法能检测出变量越界故障。
Variable out of bounds errors are often detected in C/C++software,usually in numerical calculation module.The characteristics of such errors are analyzed.variable out of bounds error model is built based on defect-oriented testing strategy,using interval calculation technology.This paper designs a static detecting method for the error by traversing the control flow graph.This method has been implemented and a number of C2 software has been tested,the results show that this method is effective in detecting variable out of bounds errors.
出处
《电子测量技术》
2012年第5期128-131,共4页
Electronic Measurement Technology
关键词
软件测试
故障模型
区间运算
静态分析
变量越界
software testing
error model
interval algorithm
static analysis
variable out of bounds error