计算机科学与探索 ›› 2012, Vol. 6 ›› Issue (2): 144-155.DOI: 10.3778/j.issn.1673-9418.2012.02.006

• 学术研究 • 上一篇    下一篇

不可达基路径的静态检测方法

张艳梅, 姜淑娟, 王庆坛, 赵雪峰   

  1. 中国矿业大学 计算机科学与技术学院, 江苏 徐州 221116
  • 出版日期:2012-02-01 发布日期:2012-02-01

Static Approach to Detecting Infeasible Basis Paths

ZHANG Yanmei, JIANG Shujuan, WANG Qingtan, ZHAO Xuefeng   

  1. School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
  • Online:2012-02-01 Published:2012-02-01

摘要: 不可达路径增加了程序的复杂度和冗余度, 不可达路径的检测是结构测试中的一个关键问题。提出了一种包含异常处理结构的程序不可达路径的静态检测方法。该方法根据数据流信息判断产生冲突的分支, 进而利用分支冲突检测路径的可达性; 在数据流分析时考虑异常处理结构和变量别名对数据流信息的影响。实例分析结果表明, 该方法可以进一步提高路径可达性检测的准确度。

关键词: 不可达路径, 异常处理, 数据流信息, 分支冲突, 别名分析

Abstract: Infeasible paths increase the complexity and redundancy to programs. It is a key problem of structural testing to detect the infeasible paths. The paper proposes a static approach to detecting infeasible basis path of programs with exception-handling constructs. Firstly, it determines the branch conflict according to dataflow information, and detects the infeasible paths according to these conflicting branches. The novelty of the dataflow information lies in the fact that it takes account of exception-handling constructs and pointer alias analysis. Finally, the results of case research show that the proposed method can further enhance the accuracy of feasibility for the detected basis paths.

Key words: infeasible path, exception-handling, dataflow information, branch conflict, alias analysis