Abstract

The concept of static program slicing was first introduced by Weiser. Ottenstein et al. indicated that an intraprocedural slice can be found in linear time by traversing a suitable graph representation of the program referred to as the program dependence graph (PDG). Horwitz et al. introduced algorithms to construct interprocedural slices by extending the program dependence graph to a supergraph of the PDG referred to as the system dependence graph (SDG). This extension captures the calling context of procedures. In this paper, the SDG is further extended so that it handles a grammar with additional constructs. Algorithms are introduced that permit one to build the SDG so that it is based on a parse tree instead of statements. A new method is described to calculate the transitive dependences and therefore build the SDG. In addition, we demonstrate how the parse tree-based SDG can be used to provide us with “smaller” and, therefore, more precise slices and we show how slices of variables that are used in a statement can be obtained. Finally, the versatility of the SDG as an internal program representation is illustrated by briefly presenting a tool that we have developed that permits slicing, dicing, and ripple analyzing in addition to other software engineering activities to be performed on programs written in a subset of ANSI C.

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.