AI & Software Engineering
Harnessing LLMs as Program Analysis Assistants Without Sacrificing Safety
A new system pairs language models with traditional static analysis to filter false bug warnings while protecting against missed vulnerabilities.
Static-analysis tools routinely flag potential bugs in code, but many of these warnings turn out to be harmless false alarms. Determining whether a flagged issue represents a real bug or a false positive is deceptively difficult: ruling out an error demands proving that no valid program execution can trigger it, a task that goes beyond pattern matching or heuristic judgment.
Recent research has explored using large language models to dismiss warnings, but this approach carries a serious risk—LLM explanations alone cannot guarantee that an error is truly impossible. Mistaking a false alarm for a real vulnerability can hide genuine bugs from developers.
The Challenge with LLMs Alone#
Language models excel at reasoning about code, but they lack the formal foundations to make definitive safety claims. When an LLM votes to filter out a warning based solely on its generated explanation, there is no mathematical guarantee that the error cannot occur. Early work shows that letting models make final filtering decisions causes them to discard confirmed bugs across multiple model variants—a failure mode that is unacceptable in safety-critical analysis.
A Partnership Model#
Researchers have developed Evident, a system that reframes how LLMs contribute to bug detection. Rather than empowering models to judge warnings outright, the system assigns them a more constrained role: identifying the parts of a program that matter for understanding a specific warning and constructing targeted test harnesses that capture necessary context.
Evident operates by:
- Using LLMs to locate relevant code sections and build a focused analysis context
- Running precise static analysis (via Frama-C/Eva) only on the selected portions
- Validating any generated harness against the original detector's value flow
- Filtering a warning only when validation succeeds and the static analyzer definitively rules out the error
Validation on Real-World Bugs#
Testing on 200 Android kernel-driver warnings—comprising 40 confirmed vulnerabilities and 160 false positives—Evident achieved strong performance. The system filtered out 48.8 to 63.8 percent of false alarms across four different LLMs without discarding any confirmed bug.
By contrast, baseline approaches that grant LLMs final authority achieved higher overall accuracy in some cases (2.0–5.5 percentage points better with GPT-5.5), but at a steep cost: they missed 27.5 to 45 percent of real bugs. Evident also rediscovered a previously overlooked vulnerability that both LLM-based filtering and human reviewers had failed to catch.