Program slicing

Keith Gallagher, David Binkley

2008 · 64 citations · 0 references

Concepts

TL;DR

Program slicing abstracts programs by reducing them to minimal forms that preserve specified behaviors, a technique used by experienced programmers. The authors propose new program complexity measures based on the organization of program slices. They present a dataflow algorithm that approximates slices by specifying variable values at a statement, thereby reducing a program to a minimal form that preserves the chosen behavior subset. The study demonstrates that slices are independent programs faithfully representing the original within the specified behavior domain, are employed by programmers during debugging, and that experience with two automatic slicing tools confirms these properties, though finding a slice is generally unsolvable.

Abstract

Program slicing is a method used by experienced computer programmers for abstracting from programs. Starting from a subset of a program's behavior, slicing reduces that program to a minimal form which still produces that behavior. The reduced program, called a “slice”, is an independent program guaranteed to faithfully represent the original program within the domain of the specified subset of behavior.Finding a slice is in general unsolvable. A dataflow algorithm is presented for approximating slices when the behavior subset is specified as the values of a set of variables at a statement. Experimental evidence is presented that these slices are used by programmers during debugging. Experience with two automatic slicing tools is summarized. New measures of program complexity are suggested based on the organization of a program's slices.