当前位置: X-MOL 学术Inf. Softw. Technol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Type slicing: An accurate object oriented slicing based on sub-statement level dependence graph
Information and Software Technology ( IF 3.8 ) Pub Date : 2020-06-27 , DOI: 10.1016/j.infsof.2020.106369
Wang Lulu , Li Bixin , Kong Xianglong

Context

Program slicing is very useful in program analysis and software engineering. It computes the slice, which is a part of program and contains all the statements related to the given slicing criterion. The more accurate a slicing technique could be, the smaller the slice is.

Objective

This paper aims to improve the current slicing accuracy for object-oriented programs. The slicing accuracy is mainly related to three factors, the dependency graph (which extracts the inner relationships of source code), the slicing criterion (which determines the slicing requirement), and the slicing algorithm (which computes the slice for the criterion from the dependency graph).

Method

Our method consists of three parts. First, we present a Sub-Statement Level Dependence Graph (SSLDG), which computes finer-grained dependences for object-oriented programs than mostly-used statement level graph. Second, we present a new type slicing criterion called (Sub-statement) Type Slicing Criterion (STSC), which supports the user to specify not only the statement and object variable, but also the type of object among its polymorphic types. At last, a corresponding slicing algorithm called (Sub-statement) Type Slicing (STS) is designed to perform the slicing process.

Results

We implement STS on Java programs as MyJavaSlicer, and run it with ten open source projects and random slicing criteria. The results show that STS slicing algorithm as well as SSLDG would make slices 35.90% smaller than traditional two-phase slicing; additionally using STSC would make the slices 48.4% further smaller; STSC also helps traditional two-phase slices reduced by 56.90%.

Conclusions

STS could provide more accurate slices than traditional two-phase slicing, and it also runs faster on most cases; STSC helps specify the slicing requirement, and roughly halves the size of slices for both slicing algorithms.



中文翻译:

类型切片:基于子语句级别依赖图的精确的面向对象切片

语境

程序切片在程序分析和软件工程中非常有用。它计算切片,该切片是程序的一部分,并包含与给定切片标准有关的所有语句。切片技术越精确,切片就越小。

目的

本文旨在提高面向对象程序的当前切片精度。切片精度主要与以下三个因素有关:依赖关系图(提取源代码的内部关系),切片标准(确定切片需求)和切片算法(根据相关性为标准计算切片)图形)。

方法

我们的方法包括三个部分。首先,我们提供了一个子语句级别依赖图(SSLDG),它比最常用的语句级别图计算出面向对象程序的更精细的依赖关系。其次,我们提出了一种称为(子语句)类型切片标准(STSC)的新类型切片标准,该标准支持用户不仅指定语句和对象变量,还指定其多态类型中的对象类型。最后,设计了相应的切片算法,称为(子语句)类型切片(STS),以执行切片过程。

结果

我们在Java程序上以MyJavaSlicer的形式实现STS,并以十个开源项目和随机切片条件运行它。结果表明,STS切片算法和SSLDG可使切片比传统的两相切片缩小35.90%;另外,使用STSC将使切片进一步缩小48.4%;STSC还帮助传统的两相切片减少了56.90%。

结论

与传统的两相切片相比,STS可以提供​​更精确的切片,并且在大多数情况下,它的运行速度也更快;STSC帮助指定切片要求,并且两种切片算法的切片大小大致减半。

更新日期:2020-06-27
down
wechat
bug