作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2011, Vol. 37 ›› Issue (9): 47-50. doi: 10.3969/j.issn.1000-3428.2011.09.016

所属专题: “核高基”专题

• “核高基”专题 • 上一篇    下一篇

带控制流的静态函数调用分析方法

陈忠湘,詹瑾瑜,郝宗波   

  1. (电子科技大学软件学院,成都 611731)
  • 出版日期:2011-05-05 发布日期:2011-05-12
  • 作者简介:陈忠湘(1985-),女,硕士研究生,主研方向:静态代码分析;詹瑾瑜,副教授、博士;郝宗波,讲师、博士
  • 基金资助:
    “核高基”重大专项“数字电视嵌入式软件平台及产业化”子课题“数字电视嵌入式软件开发平台”(2009ZX01039-003-001- 002);中央高校基本科研业务费专项基金资助项目(ZYGX2009J062)

Method for Static Function Call Analysis with Control Flow

CHEN Zhong-xiang, ZHAN Jin-yu, HAO Zong-bo   

  1. (School of Software, University of Electronic Science and Technology of China, Chengdu 611731, China)
  • Online:2011-05-05 Published:2011-05-12

摘要: 提出一种带有控制流的静态函数调用分析的方法,通过建立模型,对源程序进行静态分析,得到程序中的控制流信息和函数调用信息。和已有的静态函数调用关系图分析工具calltree和Source Insight相比,该方法生成的函数调用流图不仅能展现函数间的调用次序,还可以了解程序设计的逻辑复杂度,有助于代码阅读和分析人员更快更好地理解程序结构以及设计流程,并为分析程序控制条件、设计路径覆盖测试用例和进行程序优化奠定基础。

关键词: 静态分析, 控制流, 函数调用, 程序优化

Abstract: This paper puts forward a new method for the static function call analysis with control flow, by which can get the information of control flow and function call through creating a model to carry out static analysis of the source code. Comparing with existing tools like calltree and Source Insight, the function call flow graph generated by using the new method can not only reveal the call order of the functions, but also help to understand the complexity of the logic of the program. With the help of the new function call flow graph, the code reader has a better mastery of control flow of the program and a better understanding of the structure and design of the program. It also provides the basis of convenience to analyse control conditions of the program, design path coverage test cases and optimization for the program.

Key words: static analysis, control flow, function call, program optimization

中图分类号: