摘要
不可达路径是造成软件测试资源消耗的一个重要方面.在路径测试之前,检测程序中的不可达路径可以有效节约软件测试资源.提出了一种基于子路径扩展的不可达路径静态检测方法.该方法首先生成程序的子路径集,将路径的可达性问题转换为不等式组的求解问题.使用约束求解器判断子路径的可达性,可以分为:可达子路径,不可达子路径和无法判定三个部分,并对后面两部分的子路径扩展出的路径做二次可达性检测,最终获得程序中所有路径的可达性信息.可达性检测工作主要在子路径集上进行,因此有效地解决了路径爆炸问题.实验结果表明本文方法可以准确有效地检测出程序中的不可达路径.
Infeasible paths are one of the most important parts to cost the test resources.Before path testing,infeasible paths detecting in a program can save test resources efficiently. This paper presents a static method to detect infeasible paths which is based on sub-path expansion. First, the proposed method generates sub-path set, and the feasibility issues will be converted into inequalities. Second, the constraint solver is used to solve the inequalities, and then we can distinguish the sub-paths into three parts: one part is infeasible sub-paths, the second part is feasible sub-paths, and the third part is undetermined. The paths that are expanded from the latter two parts will be tested again to determine their feasibility. Eventually, the feasibility of all the paths is detected. Most of the detecting work is on sub-path set, so our method makes an effective solution to the path-explosion problem. Experimental resuits show that the proposed method can detect infeasible paths more accurately and effectively.
出处
《电子学报》
EI
CAS
CSCD
北大核心
2015年第8期1555-1560,共6页
Acta Electronica Sinica
基金
国家自然科学基金(No.61340037
No.61202006)
中央高校基本科研业务费专项资金(No.2013NB17)
江苏省青蓝工程
江苏省333高层次人才培养工程项目
江苏省研究生培养创新工程(No.CXZZ12-0935)
南通市应用研究计划(No.BK2014055)
关键词
软件测试
子路径扩展
不可达路径检测
约束求解
software testing
sub-path expansion
infeasible path detection
constraint solving