Hostname: page-component-6766d58669-7fx5l Total loading time: 0 Render date: 2026-05-21T10:01:30.134Z Has data issue: false hasContentIssue false

On the computational complexity of dynamic slicing problems for program schemas

Published online by Cambridge University Press:  27 October 2011

SEBASTIAN DANICIC
Affiliation:
Department of Computing, Goldsmiths College, University of London, London SE14 6NW, United Kingdom Email: s.danicic@gold.ac.uk
ROBERT. M. HIERONS
Affiliation:
Department of Information Systems and Computing, Brunel University, Middlesex, UB8 3PH, United Kingdom Email: rob.hierons@brunel.ac.uk
MICHAEL R. LAURENCE
Affiliation:
Department of Computing, Goldsmiths College, University of London, London SE14 6NW, United Kingdom Email: s.danicic@gold.ac.uk

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

Information

Type
Paper
Copyright
Copyright © Cambridge University Press 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable