Causal program dependence analysis
Journal article, 2025

Discovering how program components affect one another plays a fundamental role in aiding engineers comprehend and maintain a software system. Despite the fact that the degree to which one program component depends upon another can vary in strength, traditional dependence analysis typically ignores such nuance. To account for this nuance in dependence-based analysis, we propose Causal Program Dependence Analysis (CPDA), a framework based on causal inference that captures the degree (or strength) of the dependence between program elements. For a given program, CPDA intervenes in the program execution to observe changes in value at selected points in the source code. It observes the association between program elements by constructing and executing modified versions of a program (requiring only light-weight parsing rather than sophisticated static analysis). CPDA applies causal inference to the observed changes to identify and estimate the strength of the dependence relations between program elements. We explore the advantages of CPDA's quantified dependence by presenting results for several applications. Our further qualitative evaluation demonstrates 1) that observing different levels of dependence facilitates grouping various functional aspects found in a program and 2) how focusing on the relative strength of the dependences for a particular program element provides a detailed context for that element. Furthermore, a case study that applies CPDA to debugging illustrates how it can improve engineer productivity.

Dependency analysis

Causal inference

Observation-based analysis

CPDA

Author

Seongmin Lee

Max Planck Institute for Security and Privacy

David Binkley

Loyola University Maryland

Robert Feldt

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering (Chalmers)

Nicolas Gold

University College London (UCL)

Shin Yoo

Korea Advanced Institute of Science and Technology (KAIST)

Science of Computer Programming

0167-6423 (ISSN)

Vol. 240 103208

BaseIT -- Basing Software Testing on Information Theory

Swedish Research Council (VR) (2015-04913), 2016-01-01 -- 2019-12-31.

Automated boundary testing for QUality of Ai/ml modelS (AQUAS)

Swedish Research Council (VR) (2020-05272), 2021-01-01 -- 2024-12-31.

Subject Categories

Computer Science

Computer Systems

DOI

10.1016/j.scico.2024.103208

More information

Latest update

9/23/2024