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

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...

Full description

Bibliographic Details
Main Authors: Thomas Hirsch, Birgit Hofer
Format: Article
Language:English
Published: MDPI AG 2024-03-01
Series:Electronics
Subjects:
Online Access:https://www.mdpi.com/2079-9292/13/6/1146
_version_ 1797241307677065216
author Thomas Hirsch
Birgit Hofer
author_facet Thomas Hirsch
Birgit Hofer
author_sort Thomas Hirsch
collection DOAJ
description 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.
first_indexed 2024-04-24T18:21:15Z
format Article
id doaj.art-65128c7d777b4031b87fd2584ca88abf
institution Directory Open Access Journal
issn 2079-9292
language English
last_indexed 2024-04-24T18:21:15Z
publishDate 2024-03-01
publisher MDPI AG
record_format Article
series Electronics
spelling doaj.art-65128c7d777b4031b87fd2584ca88abf2024-03-27T13:35:06ZengMDPI AGElectronics2079-92922024-03-01136114610.3390/electronics13061146Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean ExpressionsThomas Hirsch0Birgit Hofer1Institute of Software Technology, Graz University of Technology, 8010 Graz, AustriaInstitute of Software Technology, Graz University of Technology, 8010 Graz, AustriaDynamic 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.https://www.mdpi.com/2079-9292/13/6/1146dynamic slicingrelevant slicingshort-circuit evaluationsoftware fault localizationsoftware debugging
spellingShingle Thomas Hirsch
Birgit Hofer
Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
Electronics
dynamic slicing
relevant slicing
short-circuit evaluation
software fault localization
software debugging
title Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
title_full Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
title_fullStr Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
title_full_unstemmed Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
title_short Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean Expressions
title_sort reducing the length of dynamic and relevant slices by pruning boolean expressions
topic dynamic slicing
relevant slicing
short-circuit evaluation
software fault localization
software debugging
url https://www.mdpi.com/2079-9292/13/6/1146
work_keys_str_mv AT thomashirsch reducingthelengthofdynamicandrelevantslicesbypruningbooleanexpressions
AT birgithofer reducingthelengthofdynamicandrelevantslicesbypruningbooleanexpressions