计算机工程 ›› 2012, Vol. 38 ›› Issue (9): 40-42.doi: 10.3969/j.issn.1000-3428.2012.09.012

• 软件技术与数据库 • 上一篇    下一篇

一种改进的程序可达基路径生成方法

王庆坛,姜淑娟,张艳梅   

  1. (中国矿业大学计算机科学与技术学院,江苏 徐州 221116)
  • 收稿日期:2011-11-14 出版日期:2012-05-05 发布日期:2012-05-05
  • 作者简介:王庆坛(1989-),男,硕士研究生,主研方向:软件分析与测试;姜淑娟,教授、博士生导师;张艳梅,博士研究生
  • 基金项目:
    国家自然科学基金资助项目(60970032);江苏省自然科学基金资助项目(BK2008124);江苏省研究生培养创新工程基金资助项目(CX10B_157Z);江苏省“青蓝工程”基金资助项目

Improved Generation Method of Feasible Basis Path in Program

WANG Qing-tan, JIANG Shu-juan, ZHANG Yan-mei   

  1. (School of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221116, China)
  • Received:2011-11-14 Online:2012-05-05 Published:2012-05-05

摘要: 考虑程序中分支冲突和异常处理结构对控制流信息的影响,提出一种改进的程序可达基路径生成方法。分析不可达路径产生的原因及其判定方法,构建异常控制流图。在此基础上计算相关分支之间的关系,利用深度优先遍历方法得到程序的可达基路径集。实例分析结果表明,该方法能准确生成可达基路径集,满足基路径测试的要求。

关键词: 分支冲突, 异常处理, 可达基路径, 控制流图, 基路径测试

Abstract: This paper proposes an improved method to generate the feasible basis paths, taking into account the influence of branch correlation and exception-handling constructs on the feasibility of paths. It analyzes the causes of generation for infeasible paths and gives its detecting method, constructs exceptional control flow graph which computes the branch correlations to determine the feasibility of paths, builds the feasible basis path set. Case analysis results show that the method can effectively avoid infeasible path in basis path set, and it meets the requirements of the basis path test.

Key words: branch conflict, exception handling, feasible basis path, control flow graph, basis path test

中图分类号: