Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions

Thomas Hirsch, Birgit Hofer*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Dynamic and relevant (backward) slicing helps programmers in the debugging process by reducing the number of statements in an execution trace. In this paper, we propose an approach called pruned slicing, which can further reduce the size of slices by reasoning over Boolean expressions. It adds only those parts of a Boolean expression that are responsible for the evaluation outcome of the Boolean expression to the set of relevant variables. We empirically evaluate our approach and compare it to dynamic and relevant slicing using three small benchmarks: the traffic collision avoidance system (TCAS), the Refactory dataset, and QuixBugs. Pruned slicing reduces the size of the TCAS slices on average by 10.2%, but it does not reduce the slice sizes of the Refactory and QuixBugs programs. The times required for computing pruned dynamic and relevant slices are comparable to the computation times of non-pruned dynamic and relevant slices. Thus, pruned slicing is an extension of dynamic and relevant slicing that can reduce the size of slices while having a negligible computational overhead.

Original languageEnglish
Article number1146
JournalElectronics (Switzerland)
Volume13
Issue number6
DOIs
Publication statusPublished - Mar 2024

Keywords

  • dynamic slicing
  • relevant slicing
  • short-circuit evaluation
  • software debugging
  • software fault localization

ASJC Scopus subject areas

  • Control and Systems Engineering
  • Signal Processing
  • Hardware and Architecture
  • Computer Networks and Communications
  • Electrical and Electronic Engineering

Fields of Expertise

  • Information, Communication & Computing

Fingerprint

Dive into the research topics of 'Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions'. Together they form a unique fingerprint.

Cite this