Understanding Data Dependences in the Presence of Pointers

Understanding data dependences in programs is important for many software-engineering activities, such as program understanding, impact analysis, reverse engineering, and debugging. The presence of pointers, arrays, and structures can cause subtle and complex data dependences that can be difficult to understand. For example, in languages such as C, an assignment made through a pointer dereference can assign a value to one of several variables, none of which may appear syntactically in that statement. In the first part of this paper, we describe two techniques for classifying data dependences in the presence of pointer dereferences. The first technique classifies data dependences based on definition type, use type, and path type. The second technique classifies data dependences based on span. We present empirical results to illustrate the distribution of data-dependence types and spans for a set of real C programs. In the second part of the paper, we discuss two applications of the classification techniques. First, we investigate different ways in which the classification can be used to facilitate data-flow testing and verification. We outline an approach that uses types and spans of data dependences to determine the appropriate verification technique for different data dependences; we present empirical results to illustrate the approach. Second, we present a new slicing paradigm that computes slices based on types of data dependences. Based on the new paradigm, we define an incremental slicing technique that computes a slice in multiple steps. We present empirical results to illustrate the sizes of incremental slices and the potential usefulness of incremental slicing for debugging.

[1]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[2]  Antonia Bertolino,et al.  Unconstrained duals and their use in achieving all-uses coverage , 1996, ISSTA '96.

[3]  William G. Griswold,et al.  Effective whole-program analysis in the presence of pointers , 1998, SIGSOFT '98/FSE-6.

[4]  Barbara G. Ryder,et al.  Interprocedural modification side effect analysis with pointer aliasing , 1993, PLDI '93.

[5]  Giuliano Antoniol,et al.  Variable-precision reaching definitions analysis , 1999 .

[6]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[7]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[8]  Paolo Tonella Effects of different flow insensitive points-to analyses on DEF/USE sets , 1999, Proceedings of the Third European Conference on Software Maintenance and Reengineering (Cat. No. PR00090).

[9]  Mary Lou Soffa,et al.  Selecting and using data for integration testing , 1991, IEEE Software.

[10]  Barbara G. Ryder,et al.  Interprocedural Def-Use Associations for C Systems with Single Level Pointers , 1994, IEEE Trans. Software Eng..

[11]  William G. Griswold,et al.  A Comparative Study of Two Whole Program Slicers for C , 2001 .

[12]  Mark Harman,et al.  Amorphous program slicing , 1997, Proceedings Fifth International Workshop on Program Comprehension. IWPC'97.

[13]  Susan Horwitz,et al.  The Effects of the Precision of Pointer Analysis , 1997, SAS.

[14]  Donglin Liang,et al.  Reuse-driven interprocedural slicing in the presence of pointers and recursion , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[15]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[16]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.

[17]  Gregg Rothermel,et al.  Aristotle: A System for Research on and Development of Program-Analysis-Based Tools , 1997 .

[18]  David W. Binkley,et al.  Application of the pointer state subgraph to static program slicing , 1996, J. Syst. Softw..

[19]  Alessandro Orso,et al.  Incremental slicing based on data-dependences types , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[20]  Janusz W. Laski,et al.  A Data Flow Oriented Program Testing Strategy , 1983, IEEE Transactions on Software Engineering.

[21]  Donglin Liang,et al.  Efficient points-to analysis for whole-program analysis , 1999, ESEC/FSE-7.

[22]  Elaine J. Weyuker,et al.  An Applicable Family of Data Flow Testing Criteria , 1988, IEEE Trans. Software Eng..

[23]  Simeon C. Ntafos,et al.  On Required Element Testing , 1984, IEEE Transactions on Software Engineering.

[24]  Mary Jean Harrold,et al.  Reuse-driven interprocedural slicing , 1998, Proceedings of the 20th International Conference on Software Engineering.

[25]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[26]  Gregg Rothermel,et al.  A safe, efficient regression test selection technique , 1997, TSEM.

[27]  Aniello Cimitile,et al.  Conditioned program slicing , 1998, Inf. Softw. Technol..

[28]  Elaine J. Weyuker,et al.  Provable Improvements on Branch Testing , 1993, IEEE Trans. Software Eng..

[29]  Gregg Rothermel,et al.  System-dependence-graph-based slicing of programs with arbitrary interprocedural control flow , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[30]  Alessandro Orso,et al.  A Framework for Understanding Data Dependences , 2002 .

[31]  Alessandro Orso,et al.  Effects of pointers on data dependences , 2001, Proceedings 9th International Workshop on Program Comprehension. IWPC 2001.

[32]  Elaine J. Weyuker,et al.  Data flow-based test adequacy analysis for languages with pointers , 1991, TAV4.

[33]  Simeon C. Ntafos,et al.  A Comparison of Some Structural Testing Strategies , 1988, IEEE Trans. Software Eng..

[34]  Lori A. Clarke,et al.  A Formal Evaluation of Data Flow Path Selection Criteria , 1989, IEEE Trans. Software Eng..

[35]  Phyllis G. Frankl,et al.  An Experimental Comparison of the Effectiveness of Branch Testing and Data Flow Testing , 1993, IEEE Trans. Software Eng..

[36]  Donglin Liang,et al.  Efficient Computation of Parameterized Pointer Information for Interprocedural Analyses , 2001, SAS.

[37]  Elaine J. Weyuker,et al.  Selecting Software Test Data Using Data Flow Information , 1985, IEEE Transactions on Software Engineering.

[38]  Mary Lou Soffa,et al.  Efficient computation of interprocedural definition-use chains , 1994, TOPL.

[39]  Thomas W. Reps,et al.  Speeding up slicing , 1994, SIGSOFT '94.

[40]  David Binkley,et al.  Slicing in the Presence of Parameter Aliasing , 1993 .

[41]  Giuliano Antoniol,et al.  A static measure of a subset of intra-procedural data flow testing coverage based on node coverage , 1999, CASCON.

[42]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[43]  Eugene H. Spafford,et al.  Dynamic slicing in the presence of unconstrained pointers , 1991, TAV4.