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

基于GCC关键变量数据流分析算法的程序切片技术
引用本文:杨小川,姜 军,马晓东,漆锋滨.基于GCC关键变量数据流分析算法的程序切片技术[J].计算机工程与应用,2017,53(24):40-47.
作者姓名:杨小川  姜 军  马晓东  漆锋滨
作者单位:江南计算技术研究所,江苏 无锡 214083
摘    要:随着程序的规模的扩大和复杂度的提高,通过直接分析源码进行程序切片,变得十分困难。在现有的利用编译优化技术来优化程序切片的方法中,存在无法有效利用程序的编译时信息和编译器的优化技术,以及对语言的支持不完善的问题。为此,分析了GCC编译器在编译时的中间表示,首次提出了基于GCC关键变量数据流分析算法的程序切片技术,以程序的GIMPLE中间表示为基础,以程序基本块为单位,通过迭代求解数据流方程,分析程序基本块内和不同基本块间的关键变量数据流信息。该程序切片技术可以获取源程序中仅与预设目标函数相关的关键变量和关键语句,缩减程序规模。最后通过实验,证明了该算法的可行性。

关 键 词:程序切片  目标函数  关键变量  数据流分析  GIMPLE中间表示  

Program slicing technology based on critical variable dataflow analysis algorithm in GCC compiler
YANG Xiaochuan,JIANG Jun,MA Xiaodong,QI Fengbin.Program slicing technology based on critical variable dataflow analysis algorithm in GCC compiler[J].Computer Engineering and Applications,2017,53(24):40-47.
Authors:YANG Xiaochuan  JIANG Jun  MA Xiaodong  QI Fengbin
Affiliation:Jiangnan Institute of Computing Technology, Wuxi, Jiangsu 214083, China
Abstract:With the scale of program increasing and program complexity rising, program slicing through direct code analysis becomes much harder. In the existed approaches that use compiler optimization techniques for obtaining more accurate slices, compile-time information and existed compiler optimization are overlooked, program languages are not fully supported. To solve this problem, this paper analyzes the intermediate representations of GCC compiler, and proposes a program slicing technology based on critical variable dataflow analysis algorithm in GCC compiler. This algorithm collects dataflow information both within and between basic blocks through iteratively solving the dataflow equations, which is based on GIMPLE intermediate representation and processes a basic block in each time. The proposed technique can find the critical variables and critical statements relevant to target function, and reduces the scale of the sliced program. The results of experiment show that the proposed algorithm is feasible.
Keywords:program slicing  target function  critical variants  data flow analysis  GIMPLE intermediate representation  
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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