Agentic Root Cause Reasoning and Localization of Unsoundness in Static Call Graph Analysis
Abstract
Static call graph tools cannot soundly model every dynamic language feature, yet rarely reveal when, where, or why their results are unsound. We present CGRizz, an agentic framework that diagnoses unsoundness for developers and warns users about it. During training, CGRizz compares static and dynamic call graphs to identify boundary edges: calls observed at runtime but missing from the static graph. For each edge, an LLM agent proposes a root cause, including the unmodeled program pattern and responsible tool location. CGRizz validates each proposal using three independent forms of evidence: runtime instrumentation detecting the pattern, a test case reproducing the missing edge, and a warning inserted at the implicated tool location. Validated reports help developers diagnose limitations, while the warnings form an instrumented build that flags potential unsoundness in new programs without dynamic analysis. We evaluate CGRizz on three benchmark suites using WALA, OPAL, and Soot. Of 1,459 boundary edges, CGRizz reasons about 10.3% directly, all confirmed by manual audit, and resolves another 84.1% by grouping edges with validated root causes. Tool maintainers confirmed several limitations, some of which have been fixed. The warnings flag 74%-92% of unsoundness in held-out programs. Guided by CGRizz reports, a coding agent refactored programs to remove 64% of targeted root-cause patterns while preserving functionality.
Create a lesson
Metadata
- Comments
- 11 pages, 1 figure, 8 listings, 1 table
Related papers
Inquest: Log-Guided Root-Cause Code Localization with a Staged Agent
Shared title terminologycs.SEYuvraj Sehgal, Sneh Patel, Mahsa Panahandeh et al.
CLEW: Log-Anchored Backward Tracing for Root-Cause Code Localization
Shared title terminologycs.SEWenji Bai, Muhammad Waseem, Jaakko Peltonen et al.
Improving Repair Agents with Cause-Chain Diagnoses
Shared title terminologycs.SEMarius Smytzek, Martin Eberlein, Lars Grunske et al.
Beyond Benchmarks: Evaluating Large Language Models and Agentic Patterns for Static Code Analysis Warning Classification
Shared title terminologycs.SELakmal Deshapriya, Sherlock A. Licorish, Brendon J. Woodford et al.
Below the Stopwatch: Checking the Performance Claims of Coding Agents in the Kernel
Shared title terminologycs.SEYuvraj Sehgal, Sneh Patel, Mahsa Panahandeh et al.
Useful but Unwieldy: How Software Engineers Perceive the Design of Chain-of-Thought Explanations in Coding Agents
Shared title terminologycs.SECarlos Rafael Catalan, Lheane Marie Dizon, Patricia Nicole Monderin et al.