当前位置: X-MOL 学术J. Comput. Sci. Tech. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
SymPas: Symbolic Program Slicing
Journal of Computer Science and Technology ( IF 1.9 ) Pub Date : 2021-03-31 , DOI: 10.1007/s11390-020-9754-4
Ying-Zhou Zhang

Program slicing is a technique for simplifying programs by focusing on selected aspects of their behavior. Current mainstream static slicing methods operate on dependence graph PDG (program dependence graph) or SDG (system dependence graph), but these friendly graph representations may be a bit expensive for some users. In this paper we attempt to study a light-weight approach of static program slicing, called Symbolic Program Slicing (SymPas), which works as a dataflow analysis on LLVM (low-level virtual machine). In our SymPas approach, slices are stored in symbolic forms, not in procedures being re-analyzed (cf. procedure summaries). Instead of re-analyzing a procedure multiple times to find its slices for each callling context, we calculate a single symbolic slice which can be instantiated at call sites avoiding re-analysis; SymPas is implemented with LLVM to perform slicing on LLVM intermediate representation (IR). For comparison, we systematically adapt IFDS (interprocedural finite distributive subset) analysis and the SDG-based slicing method (SDG-IFDS) to statically slice IR programs. Evaluated on open-source and benchmark programs, our backward SymPas shows a factor-of-6 reduction in time cost and a factor-of-4 reduction in space cost, compared with backward SDG-IFDS, thus being more efficient. In addition, the result shows that after studying slices from 66 programs, ranging up to 336 800 IR instructions in size, SymPas is highly size-scalable.



中文翻译:

SymPas:符号程序切片

程序切片是一种通过关注程序行为的选定方面来简化程序的技术。当前主流的静态切片方法在依赖图PDG(程序依赖图)或SDG(系统依赖图)上运行,但是对于某些用户而言,这些友好的图表示可能会有些昂贵。在本文中,我们尝试研究一种轻量级的静态程序切片方法,称为符号程序切片(SymPas),该方法可作为LLVM(低级虚拟机)上的数据流分析。在我们的SymPas方法中,切片以符号形式存储,而不是以重新分析的过程存储(参见过程摘要)。我们无需为每个调用上下文重新分析过程以找到其切片,而是计算一个符号切片,该符号切片可以在调用站点进行实例化,从而避免了重新分析。SymPas是使用LLVM实现的,以对LLVM中间表示(IR)进行切片。为了进行比较,我们系统地使IFDS(过程间有限分布子集)分析和基于SDG的切片方法(SDG-IFDS)适应静态切片IR程序。通过对开源程序和基准程序进行评估,与后向SDG-IFDS相比,我们的向后SymPas显示出时间成本降低了6倍,空间成本降低了4倍,因此效率更高。此外,结果表明,在研究了66个程序的片段之后,SymPas具有很高的规模可扩展性,它们的大小范围高达336800 IR指令。我们系统地将IFDS(过程间有限分布子集)分析和基于SDG的切片方法(SDG-IFDS)应用于静态切片IR程序。通过对开源和基准程序进行评估,与后向SDG-IFDS相比,我们的后向SymPas显示出时间成本降低了6倍,空间成本降低了4倍,因此效率更高。此外,结果表明,在研究了66个程序的片段之后,SymPas具有很高的规模可扩展性,它们的大小范围高达336800 IR指令。我们系统地将IFDS(过程间有限分布子集)分析和基于SDG的切片方法(SDG-IFDS)应用于静态切片IR程序。通过对开源和基准程序进行评估,与后向SDG-IFDS相比,我们的后向SymPas显示出时间成本降低了6倍,空间成本降低了4倍,因此效率更高。此外,结果表明,在研究了66个程序的片段之后,SymPas具有很高的规模可扩展性,它们的大小范围高达336800 IR指令。

更新日期:2021-04-14
down
wechat
bug