Tree-Oriented vs. Line-Oriented Observation-Based Slicing
Tree-Oriented vs. Line-Oriented Observation-Based Slicing
复制标题
面向树与面向行的基于观察的切片
DOI:
--
复制
发表时间:
2017
期刊:
影响因子:
--
通讯作者:
S. Yoo
中科院分区:
文献类型:
--
作者:
D. Binkley;N. Gold;Syed S. Islam;J. Krinke;S. Yoo
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.