Tree-Oriented vs. Line-Oriented Observation-Based Slicing

Tree-Oriented vs. Line-Oriented Observation-Based Slicing
复制标题

面向树与面向行的基于观察的切片

DOI:
--
复制
发表时间:
2017
期刊:
IEEE Working Conference on Source Code Analysis and Manipulation
影响因子:
--
通讯作者:
S. Yoo
S. Yoo
中科院分区:
--
文献类型:
--
作者:
D. Binkley;N. Gold;Syed S. Islam;J. Krinke;S. Yoo

文献摘要

被引文献

相似文献

基于观察的切片是一种基于程序行为可观察到的依赖性的最近引入的,独立于语言的切片技术。原始算法在文本级别处理了传统的源代码。开发了一种最近的变化,以切成可执行模型的基于树的XML表示。我们使用SRCML将模型切片器移植到源代码中,以构建传统源代码的基于树的表示。我们使用涉及十七种不同程序的四个实验(包括经典的基准和较大的生产系统)进行了对两个切片机进行比较的结果。所得的切片的大小基本相同,并且通常相同的内容。在它们不同的地方,树木结构的使用具有删除语句中不必要的部分的能力,以维护代码结构的方面。比较切片机发现每个切片机都有其优势。例如,当树表示有助于删除大块代码时,树切片机的速度超过八倍。相反,当切片C ++代码切片时,它速度较慢,因为为支持C ++语法而创建了许多小树。鉴于两者的利弊,结果表明其混合组合的价值。
Observation-based slicing is a recently-introduced, language-independent slicing technique based on the dependencies observable from program behavior. The original algorithm processed traditional source code at the line-of-text level. A recent variation was developed to slice the tree-based XML representation of executable models. We ported the model slicer to source code using srcML to construct a tree-based representation of traditional source code. We present the results of a comparison of the two slicers using four experiments involving seventeen different programs, including classic benchmarks and larger production systems. The resulting slices had essentially the same size and quite often the same content. Where they differ, the use of tree structure traded an ability to remove unnecessary parts of a statement for the requirement of maintaining aspect of the code structure. Comparing the slicers finds that each has its advantages. For example, when the tree representation facilitates the deletion of large chunks of code, the tree slicer was over eight times faster. In contrast, when slicing C++ code it was over nine times slower because of the multitude of small trees created to support C++ syntax. Given the pros and cons of the two, the results suggest the value of their hybrid combination.