首页 | 本学科首页   官方微博 | 高级检索  
     

基于CFG的函数调用关系静态分析方法
引用本文:黄双玲,黄章进,顾乃杰.基于CFG的函数调用关系静态分析方法[J].计算机系统应用,2015,24(11):167-172.
作者姓名:黄双玲  黄章进  顾乃杰
作者单位:中国科学技术大学计算机科学与技术学院, 合肥 230027;中国科学技术大学安徽省计算与通信软件重点实验室, 合肥 230027;中国科学技术大学先进技术研究院, 合肥 230027,中国科学技术大学计算机科学与技术学院, 合肥 230027;中国科学技术大学安徽省计算与通信软件重点实验室, 合肥 230027;中国科学技术大学先进技术研究院, 合肥 230027,中国科学技术大学计算机科学与技术学院, 合肥 230027;中国科学技术大学安徽省计算与通信软件重点实验室, 合肥 230027;中国科学技术大学先进技术研究院, 合肥 230027
基金项目:安徽省自然科学基金(1408085MKL06);高等学校学科创新引智计划资助(B07033)
摘    要:函数调用关系能够反映软件系统中函数间的依赖关系,完整的函数调用关系可以更好地辅助程序验证和死锁分析,提升验证和分析的完备性.现有静态分析函数调用关系的方法不能准确分析函数指针和虚函数的调用,影响了其分析结果的准确性.针对这一问题本文提出了一种基于控制流图(Control Flow Graph, CFG)的函数调用关系静态分析方法,该方法首先使用GCC插件静态获取源代码中的类型和函数CFG等信息并构建分析路径,然后采用本文提出的模拟仿真算法分析程序中的语句,并解析函数指针和虚函数的调用,最后基于分析结果生成完整的函数调用关系.实验结果表明,该方法能够很好地支持对函数指针和虚函数的处理,提升了分析结果的准确性.

关 键 词:函数调用关系  静态分析  控制流图  函数指针  虚函数
收稿时间:2015/3/10 0:00:00
修稿时间:2015/4/26 0:00:00

Static Analysis Method of Generating Function Call Relations Based on CFG
HUANG Shuang-Ling,HUANG Zhang-Jin and GU Nai-Jie.Static Analysis Method of Generating Function Call Relations Based on CFG[J].Computer Systems& Applications,2015,24(11):167-172.
Authors:HUANG Shuang-Ling  HUANG Zhang-Jin and GU Nai-Jie
Affiliation:School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China;Anhui Province Key Laboratory of Computing and Communication Software, Hefei 230027, China;Institute of Advanced Technology, University of Science and Technology of China, Hefei 230027, China,School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China;Anhui Province Key Laboratory of Computing and Communication Software, Hefei 230027, China;Institute of Advanced Technology, University of Science and Technology of China, Hefei 230027, China and School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China;Anhui Province Key Laboratory of Computing and Communication Software, Hefei 230027, China;Institute of Advanced Technology, University of Science and Technology of China, Hefei 230027, China
Abstract:Function call relations can be used to reveal the dependency relations between functions in software systems. An integrated function call relation makes a good contribution to program verification and deadlock analysis, and improves the completeness of verification and analysis. Existing methods of function call relations based on static analysis do not provide integrated support for function pointers or virtual functions, which lowers the accuracy of analysis result. This paper proposes a static analysis method for function call relations generation based on Control Flow Graph(CFG). This method gains source file information by a GCC plugin, and predicts function analysis paths. Then it uses a simulation algorithm proposed by this paper to analyze the statements of those paths, while the call of function pointers and virtual functions are analyzed accurately. It generates full function call relations based on the analysis result. Experimental results show that this method can support the analysis of function pointers and virtual functions, and improves the accuracy of analysis results.
Keywords:function call relations  static analysis  control flow graph  function pointer  virtual function
点击此处可从《计算机系统应用》浏览原始摘要信息
点击此处可从《计算机系统应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号