← Latest papers
💻 computer science

The Hitchhiker's Guide to Program Analysis, Part III: Mostly Harmless LLMs

The paper presents Evident, a bug analysis system that leverages LLMs solely to construct execution-specific analysis harnesses while relying on formal backend verification to rigorously determine whether reported errors are reachable, thereby achieving high accuracy in discharging false alarms without missing confirmed vulnerabilities.

Original authors: Haonan Li, Tianyang Zhou, Manu Sridharan, Hang Zhang, Zhiyun Qian

Published 2026-06-16
📖 4 min read☕ Coffee break read

Original authors: Haonan Li, Tianyang Zhou, Manu Sridharan, Hang Zhang, Zhiyun Qian

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a building inspector trying to find structural flaws in a massive, ancient skyscraper (the computer code). You have a robot assistant (the LLM) that is incredibly good at reading blueprints and guessing where problems might be. However, the robot sometimes gets overconfident and says, "I think this wall is fine," based on a quick glance, even though it hasn't actually tested the wall's strength.

The paper "The Hitchhiker's Guide to Program Analysis, Part III: Mostly Harmless LLMs" introduces a new system called Evident to fix this problem. Here is how it works, explained simply:

The Problem: The "Plausible but Wrong" Robot

Static analysis tools (the original inspectors) are great at finding potential bugs, but they scream "Fire!" too often, even when there is no fire. These are called "false alarms."

Recently, people started using Large Language Models (LLMs) to help silence these false alarms. The idea was: "Let's ask the robot to look at the code and tell us if it's a real bug or just a false alarm."

The Catch: The robot is very good at writing a plausible story about why a wall is safe. But a good story isn't the same as a safety test. If the robot says, "This wall is fine because the math looks right," but it missed a hidden crack, the building could still collapse. The paper argues that you cannot let a robot make the final safety decision just because it sounds convincing.

The Solution: Evident (The "Context Builder")

Instead of asking the robot to be the judge, Evident asks the robot to be the stagehand.

  1. The Robot's Job (Building the Stage):
    When a warning comes in (e.g., "This code might crash"), the robot's only job is to build a small, isolated "play" or harness. It gathers the specific parts of the code needed to test that one warning and sets up a little stage where the code can run.

    • Analogy: Imagine the robot is building a miniature model of the specific room where the leak might happen, so the inspector doesn't have to walk through the whole skyscraper.
  2. The Safety Check (The Gatekeeper):
    Before the inspector looks at this miniature model, a strict Gatekeeper checks it.

    • Did the robot accidentally glue the floor down so the model can't move? (This would hide the bug).
    • Did the robot leave out a crucial pipe?
    • The Gatekeeper ensures the model is a fair representation of the real thing. If the model is "rigged" to look safe, it is thrown away.
  3. The Inspector's Job (The Formal Analysis):
    Only after the model passes the Gatekeeper does the Formal Inspector (a rigorous mathematical tool called Frama-C/Eva) step in. The inspector runs the model through a stress test.

    • If the model breaks, it's a real bug.
    • If the model survives the stress test, the warning is dismissed as a false alarm.

Why This Matters

The paper tested this system on 200 real warnings from Android kernel drivers (the software that runs your phone's hardware).

  • The Old Way (Robot as Judge): The robot often said, "It's fine," based on a good-sounding explanation. It missed real bugs because it trusted its own reasoning too much.
  • The Evident Way:
    • It correctly identified 76% of the cases.
    • It successfully dismissed 111 false alarms (saving time for human engineers).
    • Crucially, it did not miss a single confirmed real bug. It never let a dangerous bug slip through by saying "It's probably okay."
    • In cases where the robot couldn't build a good enough model, the system simply said, "I don't know," rather than guessing.

The "Mostly Harmless" Lesson

The title references a famous sci-fi book, suggesting that while LLMs are powerful, they are "mostly harmless" if you don't let them drive the car.

  • LLMs are great at gathering ingredients (finding the right code snippets and context).
  • LLMs are bad at baking the cake (making the final safety judgment).

Evident proves that if you use the robot to build the test but let a mathematical tool run the test, you get the best of both worlds: you save time on false alarms, but you don't accidentally ignore real disasters.

Summary

Think of Evident as a system where the AI is the architect who draws the blueprint for a test, but a rigorous engineer actually runs the stress test on that blueprint. The AI is never allowed to say, "The building is safe," on its own. It can only say, "Here is a model of the building; please test it." This ensures that safety decisions are based on hard facts, not just a convincing story.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →