The expression dependence graph

The system dependence graph (SDG) is a widely used program representation for the static analysis of programs. In particular, it is the standard way to represent control and flow dependences between the statements of a program. It is at the core of program slicing, a technique that extracts the part...

Full description

Saved in:
Bibliographic Details
Published inJournal of logical and algebraic methods in programming Vol. 142; p. 101016
Main Authors Galindo, Carlos, Pérez, Sergio, Silva, Josep
Format Journal Article
LanguageEnglish
Published Elsevier Inc 01.01.2025
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:The system dependence graph (SDG) is a widely used program representation for the static analysis of programs. In particular, it is the standard way to represent control and flow dependences between the statements of a program. It is at the core of program slicing, a technique that extracts the part of a program that can influence a given program point (the so-called slicing criterion). In this paper, we identify several program slicing situations (e.g., list comprehensions, try-catch and for) where the representation provided by the SDG is imprecise, and we present an alternative program representation, which is indeed an extension of the SDG, that solves these situations. We call this extension the expression dependence graph (EDG). The EDG redefines the SDG by increasing the granularity of its nodes to abstract syntax tree (AST) nodes. The implications of this change include an improvement in precision, the appearance of new kinds of dependences (besides control and flow dependences), and the possibility of selecting any (sub)expression as the slicing criterion.
ISSN:2352-2208
DOI:10.1016/j.jlamp.2024.101016