Interleaving static analysis and LLM prompting with applications to error specification inference
Chapman, Patrick J. and Rubio-González, Cindy and Thakur, Aditya V.Int. J. Softw. Tools Technol. Transf. (2) , 2025
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.
PDF Springer Nature©@article{STTT2025, author = {Chapman, Patrick J. and Rubio{-}Gonz{\'{a}}lez, Cindy and Thakur, Aditya V.}, title = {Interleaving static analysis and {LLM} prompting with applications to error specification inference}, journal = {Int. J. Softw. Tools Technol. Transf.}, volume = {27}, number = {2}, pages = {239--254}, year = {2025}, url = {https://doi.org/10.1007/s10009-025-00780-7}, doi = {10.1007/s10009-025-00780-7}, publisher = {Springer Nature} }