...
首页> 外文期刊>Empirical Software Engineering >A comparison of tree-and line-oriented observational slicing
【24h】

A comparison of tree-and line-oriented observational slicing

机译:面向树和面向线的观察切片的比较

获取原文
获取原文并翻译 | 示例
           

摘要

Observation-based slicing and its generalization observational slicing are recently-introduced, language-independent dynamic slicing techniques. They both construct slices based on the dependencies observed during program execution, rather than static or dynamic dependence analysis. The original implementation of the observation-based slicing algorithm used lines of source code as its program representation. A recent variation, developed to slice modelling languages (such as Simulink), used an XML representation of an executable model. We ported the XML slicer to source code by constructing a tree representation of traditional source code through the use of srcML. This work compares the tree- and line-based slicers using four experiments involving twenty different programs, ranging from classic benchmarks to million-line production systems. The resulting slices are essentially the same size for the majority of the programs and are often identical. However, structural constraints imposed by the tree representation sometimes force the slicer to retain enclosing control structures. It can also "bog down" trying to delete single-token subtrees. This occasionally makes the tree-based slices larger and the tree-based slicer slower than a parallelised version of the line-based slicer. In addition, a Java versus C comparison finds that the two languages lead to similar slices, but Java code takes noticeably longer to slice. The initial experiments suggest two improvements to the tree-based slicer: the addition of a size threshold, for ignoring small subtrees, and subtree replacement. The former enables the slicer to run 3.4 times faster while producing slices that are only about 9% larger. At the same time the subtree replacement reduces size by about 8-12% and allows the tree-based slicer to produce more natural slices.
机译:基于观察的切片及其泛化的观察切片是最近引入的,独立于语言的动态切片技术。它们都基于程序执行期间观察到的依赖关系(而非静态或动态依赖关系分析)构造切片。基于观察的切片算法的原始实现使用源代码行作为其程序表示。开发用于切片建模语言(例如Simulink)的最新变体使用可执行模型的XML表示。通过使用srcML构建传统源代码的树表示,我们将XML Slicer移植到了源代码。这项工作使用涉及二十个不同程序的四个实验,比较了基于树和基于行的切片器,范围从经典基准测试到百万行生产系统。对于大多数程序而言,所得的切片基本上是相同的大小,并且通常是相同的。但是,由树表示施加的结构约束有时会迫使切片器保留封闭的控制结构。它也可以“停顿”尝试删除单令牌子树。与基于行的切片器的并行化版本相比,这有时会使基于树的切片变大,而基于树的切片器变慢。另外,Java与C的比较发现这两种语言会导致相似的切片,但是Java代码花费的时间明显更长。初始实验建议对基于树的切片器进行两项改进:增加大小阈值以忽略小的子树,以及替换子树。前者使切片器的运行速度提高了3.4倍,而切片仅增长了约9%。同时,子树替换将大小减小了约8-12%,并允许基于树的切片器生成更自然的切片。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号