Dynamic slicing in the presence of unconstrained pointers
Hiralal Agrawal, Richard A. DeMillo, Eugene H. Spafford · 1991
Program slices are useful in debugging. Most work on program slicing to date has concentrated on finding slices of programs involving only scalar variables. Pointers and composite variables do not lend themselves well to static analysis, especially when the language involved is not strongly-typed. When debugging a program, however, we are interested in analyzing the program behavior for testcases that reveal a fault. In this paper, we present a uniform approach to handling pointers and composite variables such as arrays, records, and unions for the purpose of obtaining dynamic program slices. The dynamic approach proposed works well even when the language involved allows unconstrained pointers and performs no runtime checks, as in C. 1 Introduction The notion of program slicing has been discussed extensively in the literature [20, 17, 12, 13, 5]. This discussion, however, has mostly dealt with finding slices for programs involving scalar variables (see Section 6, Related Work). Slicin...