arXiv · 2612.02995
Separate What from How: Repairing Static Analyzer Summaries with a Typed Repair IR
Abstract
Static analyzers rely on API summaries to model library calls. Flawed summaries can cause false alarms or hide real bugs. Repairing them requires preserving dependencies among summary facts, which free-form LLM edits can violate. We present OpCraft, a system that uses counterexamples to validate repairs to static-analyzer API summaries. OpCraft expresses LLM-selected edits in Summary Repair IR (SRI), a typed intermediate representation that makes operator applicability, effects, dependencies, bindings, and ordering explicit. Deterministic backends translate SRI sequences into validation code and analyzer patches. OpCraft accepts a repair only when the generated code produces the expected analyzer behavior. We evaluate OpCraft on single-defect and multi-defect benchmarks for the Clang Static Analyzer (CSA). Across three LLMs, OpCraft repairs at least 96% of single-defect tasks at pass@1, compared with 30% to 37% for free-form repair. It also remains effective on multi-defect tasks. Ablations show that reliable repair requires typed applicability, effects, and dependency semantics beyond output schema checks. CSA C++ patch candidates generated from accepted SRI sequences pass both per-task LLVM validation and the full CSA regression suite.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Jinbao Chen, Zixiang Zhou, Yu Zhang. 2026-12-02. Separate What from How: Repairing Static Analyzer Summaries with a Typed Repair IR. https://searcharxiv.org/abs/2612.02995
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.