Program Slicing: An Application of Object-oriented Program Dependency Graphs

A considerable amount of work has been done in the area of representing programs with single and multiple procedure bodies. A complete study of the latter requires both intra and interprocedural analysis. In the analysis of an object-oriented program, it is all the more important due to the existence of numerous classes and methods within the classes. Object-oriented design is based on the philosophy of data encapsulation and controlled access to the encapsulated data. There are diierent representations available for object-oriented design. These representations do not give a complete picture of the programs thus restricting code analysis and preventing many testing techniques from using them. This paper discusses the issues involved in representing object-oriented programs. A representation based on the Program Dependency Graphs is designed. Diierent concepts of the paradigm are represented, including polymorphism, dynamic binding and the class inheritance hierarchy. Message exchanges between objects are also discussed and a more compact manner of representing parameter ow is presented. A second issue addressed in this paper is that of slicing in object-oriented programs. Determining an object-oriented slice is more complex than determining either an intraprocedural or interprocedural slice. It has been shown that Program Dependency Graphs are well suited for slicing procedural programs. A high level pseudocode algorithm is given, that demonstrates the applicability of the Object-oriented Program Dependency Graph for slicing object-oriented programs. Other applications based on this representation are also introduced.

[1]  Barbara G. Ryder,et al.  Constructing the Call Graph of a Program , 1979, IEEE Transactions on Software Engineering.

[2]  Arun Lakhotia Constructing call multigraphs using dependence graphs , 1993, POPL '93.

[3]  John D. McGregor,et al.  Object-oriented software development - engineering software for reuse , 1992, VNR computer library.

[4]  Thomas W. Reps,et al.  Integrating non-intering versions of programs , 1988, POPL '88.

[5]  John D. McGregor,et al.  An extensible program representation for object-oriented software , 1994, SIGP.

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

[7]  Panos E. Livadas,et al.  Program Slicing , 1992 .

[8]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1988, SIGP.

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

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

[11]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[12]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[13]  Brian A. Malloy,et al.  A Unified Interprocedural Program Representation for a Maintenance Environment , 1993, IEEE Trans. Software Eng..

[14]  David Callahan,et al.  The program summary graph and flow-sensitive interprocedual data flow analysis , 1988, PLDI '88.

[15]  Gregg Rothermel,et al.  Efficient construction of program dependence graphs , 1993, ISSTA '93.

[16]  Rajiv Gupta,et al.  An approach to regression testing using slicing , 1992, Proceedings Conference on Software Maintenance 1992.

[17]  P. E. Livadas,et al.  Program dependence analysis , 1992, Proceedings Conference on Software Maintenance 1992.

[18]  David J. Duke,et al.  Towards a Semantics for Object-Z , 1990, VDM Europe.