Result: Thin slicing

Title:
Thin slicing
Source:
ACM SIGPLAN Notices ; volume 42, issue 6, page 112-122 ; ISSN 0362-1340 1558-1160
Publisher Information:
Association for Computing Machinery (ACM)
Publication Year:
2007
Document Type:
Academic journal article in journal/newspaper
Language:
English
DOI:
10.1145/1273442.1250748
Accession Number:
edsbas.846D8E5B
Database:
BASE

Further Information

Program slicing systematically identifies parts of a program relevant to a seed statement. Unfortunately, slices of modern programs often grow too large for human consumption. We argue that unwieldy slices arise primarily from an overly broad definition of relevance, rather than from analysis imprecision. While a traditional slice includes all statements that may affect a point of interest, not all such statements appear equally relevant to a human. As an improved method of finding relevant statements, we propose thin slicing . A thin slice consists only of producer statements for the seed, i.e. , those statements that help compute and copy avalue to the seed. Statements that explain why producers affect the seed are excluded. For example, for a seed that reads a value from a container object, a thin slice includes statements that store the value into the container, but excludes statements that manipulate pointers to the container itself. Thin slices can also be hierarchically expanded to include statements explaining how producers affect the seed, yielding a traditional slice in the limit. We evaluated thin slicing for a set of debugging and program understanding tasks. The evaluation showed that thin slices usually included the desired statements for the tasks ( e.g. , the buggy statement for a debugging task). Furthermore, in simulated use of a slicing tool, thin slices revealed desired statements after inspecting 3.3 times fewer statements than traditional slicing for our debugging tasks and 9.4 times fewer statements for our program understanding tasks. Finally, our thin slicing algorithm scales well to relatively large Java benchmarks, suggesting that thin slicing represents an attractive option for practical tools.