# On the computational complexity of dynamic slicing problems for program   schemas

**Authors:** Sebastian Danicic, Robert M. Hierons, Michael R. Laurence

arXiv: 1705.07686 · 2017-05-23

## TL;DR

This paper investigates the computational complexity of dynamic slicing problems for program schemas, formalizing definitions, establishing complexity bounds, and proving NP-hardness for certain slicing problems.

## Contribution

It formalizes dynamic slicing definitions for linear schemas, analyzes their computational complexity, and proves NP-hardness of finding non-trivial dynamic slices.

## Key findings

- NP-hardness of determining non-trivial dynamic slices
- Complexity bounds for slice verification and existence
- Minimal dynamic slices may not be unique

## Abstract

Given a program, a quotient can be obtained from it by deleting zero or more statements. The field of program slicing is concerned with computing a quotient of a program which preserves part of the behaviour of the original program. All program slicing algorithms take account of the structural properties of a program such as control dependence and data dependence rather than the semantics of its functions and predicates, and thus work, in effect, with program schemas. The dynamic slicing criterion of Korel and Laski requires only that program behaviour is preserved in cases where the original program follows a particular path, and that the slice/quotient follows this path. In this paper we formalise Korel and Laski's definition of a dynamic slice as applied to linear schemas, and also formulate a less restrictive definition in which the path through the original program need not be preserved by the slice. The less restrictive definition has the benefit of leading to smaller slices. For both definitions, we compute complexity bounds for the problems of establishing whether a given slice of a linear schema is a dynamic slice and whether a linear schema has a non-trivial dynamic slice and prove that the latter problem is NP-hard in both cases. We also give an example to prove that minimal dynamic slices (whether or not they preserve the original path) need not be unique.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1705.07686/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1705.07686/full.md

## References

42 references — full list in the complete paper: https://tomesphere.com/paper/1705.07686/full.md

---
Source: https://tomesphere.com/paper/1705.07686