What Are We Analyzing? Context Construction in Trustworthy LLM-Assisted Program Analysis
We argue that trustworthy LLM-assisted program analysis involves two distinct roles: property reasoning, which establishes semantic properties within a given scope, and context construction, which selects and materializes the program context to be analyzed. While recent propose-and-verify methods have made substantial progress in generating specifications and proofs, determining an appropriate analysis context in complex software systems is itself a nontrivial task. We advocate making context construction an explicit, independently checkable task that turns the LLM’s choice of what to analyze into a concrete program artifact.
Our prototype takes a first step in this direction. It uses coarse-grained data-flow facts to guide and validate LLM-synthesized warning harnesses, leaving the final decision to a deterministic analyzer. Across 200 Linux kernel-driver warnings, it filters 48.8–63.8% of false alarms while retaining all 40 confirmed bugs. These results show the practical value of explicit context construction and raise questions about how to validate and extend it.