Abstract

Program dependency graphs (PDG) facilitate program analysis and related applications such as program slicing, which is a method to identify the relevant entities of the program according to data and control dependencies. In the past, PDGs and program slicing were mostly developed for (conventional) imperative programs. Recently, the object-oriented (OO) paradigm has gained momentum and popularity. The OO paradigm introduces the features of object abstraction, encapsulation, inheritance and polymorphism to programs, but is not considered in PDGs and program slicing. In this paper, we present an object-oriented dependency graph (ODG) to represent the structure of OO programs. The ODG is defined based on a property multi-digraph that is extended from a directed graph by augmenting multiple edge types, vertex properties and property relations. With these extensions, the ODG can avoid specious dependencies due to object encapsulation. Based on the ODG, a program slicing method for OO software is developed. Besides data and control dependencies, dependencies caused by OO features are taken into consideration in our slicing method. Through the ODG, the slicing method can be applied to facilitate the understanding, debugging and maintenance of OO software in the same way that traditional program slicing methods do.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call