Interleaving static analysis and LLM prompting with applications to error specification inference

Abstract This paper presents a new approach to improve static program analysis using Large Language Models (LLMs). The approach interleaves calls to the static analyzer and queries to the LLM. The query to the LLM is constructed based on intermediate results from the static analysis, and subsequent static analysis uses the results from the LLM query. We apply our approach to the problem of error-specification inference : given systems code written in C, infer the set of values that each function can return on error. Such error specifications aid in program understanding and can be used to find error-handling bugs. We implemented our approach by incorporating LLMs into EESI, the state-of-the-art static analysis for error-specification inference. Compared to EESI, our approach achieves higher recall (from an average of 52.55% to 77.83%) and higher F1-score (from an average of 0.612 to 0.804) while maintaining precision (from an average of 86.67% to 85.12%) on real-world benchmarks such as Apache HTTPD and MbedTLS. We also conducted experiments to understand the sources of imprecision in our LLM-assisted analysis as well as the impact of LLM nondeterminism on the analysis results.

Authors

Institutions

Publication Details

Journal
International Journal on Software Tools for Technology Transfer
Published
2025-02-04
DOI
https://doi.org/10.1007/s10009-025-00780-7
Citations
2
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
4.96
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Interleaving static analysis and LLM prompting with applications to error specification inference

Cindy Rubio-González, Aditya Thakur, Patrick J. Chapman
2 citations
International Journal on Software Tools for Technology Transfer
Adversarial Robustness in Machine Learning
4.96
article

Interleaving static analysis and LLM prompting with applications to error specification inference

Cindy Rubio-González, Aditya Thakur, Patrick J. Chapman
article en
2 citations

Abstract

Abstract This paper presents a new approach to improve static program analysis using Large Language Models (LLMs). The approach interleaves calls to the static analyzer and queries to the LLM. The query to the LLM is constructed based on intermediate results from the static analysis, and subsequent static analysis uses the results from the LLM query. We apply our approach to the problem of error-specification inference : given systems code written in C, infer the set of values that each function can return on error. Such error specifications aid in program understanding and can be used to find error-handling bugs. We implemented our approach by incorporating LLMs into EESI, the state-of-the-art static analysis for error-specification inference. Compared to EESI, our approach achieves higher recall (from an average of 52.55% to 77.83%) and higher F1-score (from an average of 0.612 to 0.804) while maintaining precision (from an average of 86.67% to 85.12%) on real-world benchmarks such as Apache HTTPD and MbedTLS. We also conducted experiments to understand the sources of imprecision in our LLM-assisted analysis as well as the impact of LLM nondeterminism on the analysis results.

International Journal on Software Tools for Technology TransferVol. 27(2)
University of California, Davis (US)
Openalex Percentile: Top 6%
Adversarial Robustness in Machine Learning
4.96
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Interleaving static analysis and LLM prompting with applications to error specification inference — Cindy Rubio-González, Aditya Thakur, et al. · International Journal on Software Tools for Technology Transfer (2025) | TGRS Research Map | TGRS