Introduction
Static program analysis is a foundational technique in software engineering used to reason about program behavior and prove safety without executing the code. However, analyzing dynamic languages like JavaScript presents significant challenges. Traditional static analysis tools rely on uniform, hard-coded heap abstractions to ensure the analysis converges. This creates a classic "Goldilocks" problem: if the abstraction is too coarse, the analysis becomes imprecise and generates false-positive warnings; if it is too fine, the analysis may run indefinitely.
To address this, researchers have introduced ABSINT-AI, a language-model-guided static analysis framework. By allowing a Large Language Model (LLM) to act as an agent that chooses per-object abstraction strategies based on semantic cues, ABSINT-AI significantly reduces false positives while maintaining 100% formal soundness.
The ABSINT-AI Approach
Traditional analyzers use brittle heuristics that are "blind" to programmer intent—they cannot distinguish between a core config object and a temporary wrapper. ABSINT-AI replaces these hard-coded heuristics with an agentic LLM that acts as a consultant to a traditional Abstract Interpreter.
The core innovations of ABSINT-AI include:
- Interactive Agentic Loop: When the analyzer encounters complex control flows, such as loops, it pauses. The LLM agent can inspect the environment, check variable values, look up function definitions, or request the analyzer to run another loop iteration to observe heap changes.
- Soundness via Constrained Menus: To guarantee that the analysis never misses a real bug, the LLM is restricted from directly manipulating the program state. Instead, it selects from a menu of predefined, mathematically sound abstraction strategies (e.g., Recency Merge or Field-sensitive Widening). Any "hallucination" by the model might slow down the analysis or add false positives, but it will never compromise the mathematical guarantee of correctness.
- Semantic Awareness: Leveraging its natural language understanding, the LLM utilizes semantic cues—like a field named
role—to suggest logical groupings (e.g., grouping "student" objects separately from "teacher" objects). This level of semantic abstraction is nearly impossible for traditional symbolic tools.
Experimental Setup
The researchers evaluated ABSINT-AI on a benchmark of 53 JavaScript programs. This dataset included standard suites like the V8 benchmark and 23 real-world open-source npm libraries (such as PapaParse, Showdown, and Validator.js). The benchmarks varied in complexity, with several exceeding 1,500 lines of code. The primary evaluation task focused on a soundness-critical requirement: determining whether object property accesses might result in undefined or null dereferences.
Results and Insights
ABSINT-AI demonstrated substantial improvements over existing state-of-the-art static analyzers:
- Higher Precision: The framework reduced false positives by up to 34% overall. Specifically, it achieved a 13% reduction compared to TAJS and an over 50% reduction compared to WALA, two industry-standard static analyzers.
- The Value of Agency: Ablation studies showed that the LLM's ability to interact agentically with the environment is crucial. The agentic model outperformed non-agentic (single-shot) LLM predictions by 25%. Furthermore, a purely symbolic version of the tool without an LLM performed 15% worse than TAJS, underscoring that semantic guidance drives the performance gains.
- Self-Consistency: Because the underlying analysis is formally sound, researchers could run the analysis multiple times with different LLM decisions and take the intersection of the reported bugs. If a bug did not appear in every run, it was pruned as a false positive, further refining the results.
- Robustness: In bug injection tests, ABSINT-AI successfully caught 100% of real bugs, confirming that the AI-guided abstractions do not mask actual errors.
Limitations and Future Work
While ABSINT-AI marks a significant step forward, the authors note several limitations:
- Scalability and Speed: The system handles libraries up to roughly 2,000 lines of code but struggles with massive, industrial-scale codebases. Additionally, a full analysis takes about 500 seconds (compared to 20 seconds for TAJS), largely due to LLM API overhead and the prototype's Python implementation.
- Abstraction Menu: The current menu of strategies is limited. Expanding it to include complex "relational" abstractions—tracking how different variables relate to one another—could further enhance precision.
- Modern JavaScript Features: The prototype currently supports ES5-era JavaScript, as the underlying baseline tools do not yet fully support modern features like
classesorlet/const.
By bridging the gap between the semantic understanding of LLMs and the formal guarantees of abstract interpretation, ABSINT-AI paves the way for smarter, more precise static analysis tools.
Summary updated