计算机与现代化 ›› 2013, Vol. 218 ›› Issue (10): 55-61.doi: 10.3969/j.issn.1006-2475.2013.10.015

• 控制技术 • 上一篇    下一篇

一种基于约束分析精简控制流图方法

李金诺   

  1. 中国石油勘探开发研究院西北分院,甘肃兰州730050
  • 收稿日期:2013-03-17 修回日期:1900-01-01 出版日期:2013-10-26 发布日期:2013-10-26

A Constraint-based Analysis Method to Simplify Control Flow Graph

LI Jin-nuo   

  1. Northwest Branch, Research Institute of Petroleum Exploration & Development, PetroChina, Lanzhou 730050, China
  • Received:2013-03-17 Revised:1900-01-01 Online:2013-10-26 Published:2013-10-26

摘要: 很多静态代码分析的方法都以控制流图作为基础,本文采用一种基于约束的分析技术,包括基于约束的0-CFA,加入数据流的分析方法构造约束集,使用不动点算法求出约束集的最小解并生成控制流图,可以约减不可达分支,生成较少冗余的控制流图。以本文生成的控制流图作为静态代码分析方法的基础,可以提高静态代码分析的效率,降低误报率。

关键词: 静态分析, 基于约束的分析, 控制流分析, 不动点算法

Abstract: A lot of static code analysis methods take control flow graph as basis. This paper uses a constraintbased analysis techniques, including constraintbased 0-CFA, adding data flow analysis method to construct the set of constraints, using fixed-point algorithm to find the smallest solution of the set of constraints, and generates a control flow graph, reduction unreachable branch, generates less redundant control flow graph. The control flow graph, generated in this article as the basis of the static code analysis methods to improve the efficiency of static code analysis, can reduce the rate of false positives.

Key words: static analysis, constraint-based analysis, control flow analysis, fixed-point algorithm

中图分类号: