...
首页> 外文期刊>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移植到源代码。这项工作使用涉及二十个不同程序的四个实验比较了基于树和线的切片器,从经典基准到百万线生产系统。所得到的切片对大多数程序具有基本相同的尺寸,并且通常是相同的。然而,树表示施加的结构约束有时强制切片机保持封闭控制结构。它还可以“陷入困境”尝试删除单令牌子树。这偶尔会使基于树的切片更大,并且基于树的切片机比基于线的Sliacer的并行版本更慢。此外,Java与C比较发现,这两种语言导致类似的切片,但Java代码明显更长的切片。初始实验表明,对基于树的切片机进行了两种改进:添加尺寸阈值,用于忽略小子树和子树替换。前者使切片器能够更快地运行3.4倍,同时产生仅大约9%的切片。同时,子树替换减少大小约8-12%,允许基于树的切片机产生更多的自然切片。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号