Refined Program Slicing Based on Online Redundancy Removal

Program slicing is widely used in software engineering to support program comprehension, debugging, and testing. Most existing slicing techniques generate slices through reachability analysis over dependence graphs. However, such approaches do not distinguish between essential dependences and redundant dependences, causing many statements that do not actually affect the slicing criterion to be included in the slice. This phenomenon leads to slice bloat and makes it difficult for developers to identify the code that truly affects the slicing criterion. To address this problem, this paper introduces the concept of Redundant Code for a Slice (RCS), which refers to statements that appear in a slice due to dependence propagation but do not contribute to the values computed at the slicing criterion. We further identify six common types of RCS in real-world programs and propose a Marked System Dependence Graph (MSDG) to explicitly represent redundant and non-redundant dependences in the dependence graph. Based on MSDG, we present a refined program slicing algorithm, called RPS, which removes RCS online during dependence traversal and produces more concise slices that preserve the semantics of the slicing criterion. We evaluate RPS against traditional two-phase slicing, type slicing, and dynamic slicing on 20 open-source projects. The results show that RPS can reduce slice size by 49%, 45%, and 11% compared with the three baselines, respectively. In addition, we apply RPS to bug localization on the Defects4J benchmark. The results show that RPS can assist in locating 79% of bugs while reducing 20% of the slice size compared with type slicing.

Authors

Publication Details

Journal
International Journal of Software Engineering and Knowledge Engineering
Published
2026-03-27
DOI
https://doi.org/10.1142/s0218194026500269
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Refined Program Slicing Based on Online Redundancy Removal

Ying Zhou, Jianming Chang, Lulu Wang, Li Liao
International Journal of Software Engineering and Knowledge Engineering
Software Testing and Debugging Techniques
article

Refined Program Slicing Based on Online Redundancy Removal

Ying Zhou, Jianming Chang, Lulu Wang, Li Liao
article en

Abstract

Program slicing is widely used in software engineering to support program comprehension, debugging, and testing. Most existing slicing techniques generate slices through reachability analysis over dependence graphs. However, such approaches do not distinguish between essential dependences and redundant dependences, causing many statements that do not actually affect the slicing criterion to be included in the slice. This phenomenon leads to slice bloat and makes it difficult for developers to identify the code that truly affects the slicing criterion. To address this problem, this paper introduces the concept of Redundant Code for a Slice (RCS), which refers to statements that appear in a slice due to dependence propagation but do not contribute to the values computed at the slicing criterion. We further identify six common types of RCS in real-world programs and propose a Marked System Dependence Graph (MSDG) to explicitly represent redundant and non-redundant dependences in the dependence graph. Based on MSDG, we present a refined program slicing algorithm, called RPS, which removes RCS online during dependence traversal and produces more concise slices that preserve the semantics of the slicing criterion. We evaluate RPS against traditional two-phase slicing, type slicing, and dynamic slicing on 20 open-source projects. The results show that RPS can reduce slice size by 49%, 45%, and 11% compared with the three baselines, respectively. In addition, we apply RPS to bug localization on the Defects4J benchmark. The results show that RPS can assist in locating 79% of bugs while reducing 20% of the slice size compared with type slicing.

International Journal of Software Engineering and Knowledge Engineering
Openalex Percentile: Top 2%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.