NESA: Relational Neuro-Symbolic Static Program Analysis
Chengpeng Wang, Yifei Gao, Wuqi Zhang, Xuwei Liu, Jinyao Guo, Mingwei Zheng, Qingkai Shi, Xiangyu Zhang

TL;DR
NESA introduces a neuro-symbolic, compilation-free static program analysis method leveraging large language models, enabling customizable analysis with reduced hallucinations and improved performance on benchmarks and real-world bugs.
Contribution
The paper presents NESA, a novel neuro-symbolic approach using a restricted Datalog policy language and decomposition to enhance static analysis with LLMs, reducing hallucinations and surpassing existing techniques.
Findings
NESA achieves 66.27% precision and 78.57% recall in taint vulnerability detection.
NESA detects 13 real-world memory leak bugs fixed by developers.
NESA outperforms some industrial approaches in F1 score on TaintBench.
Abstract
Static program analysis plays an essential role in program optimization, bug detection, and debugging. However, reliance on compilation and limited customization hinder its adoption in the real world. This paper presents a compositional neuro-symbolic approach named NESA that facilitates compilation-free and customizable static program analysis using large language models (LLMs) with mitigated hallucinations. Specifically, we propose an analysis policy language, a restricted form of Datalog, to support users decomposing a static program analysis problem into several sub-problems that target simpler syntactic or semantic properties upon smaller code snippets. The problem decomposition enables the LLMs to target more manageable semantic-related sub-problems with reduced hallucinations, while the syntactic ones are resolved by parsing-based analysis without hallucinations. An analysis…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
