paperbot · PL 论文追踪

全部论文 待读 收藏

P0 LLM-Based Alarm Resolution Guided by Bayesian Program Analysis

贝叶斯程序分析引导的 LLM 告警消解
OOPSLA 10(OOPSLA2)2026匹配度 9/10 · 该论文直接结合贝叶斯程序分析与 LLM,用于静态分析告警消解,正对应研究画像中“贝叶斯程序分析与 LLM 交叉”及“AI→PL:利用 LLM 改进静态分析”方向,且兼具理论模型与工程评估。引用 0 inbox
Yifan Zhang, Yuanfeng Shi, Haoran Lin, Yingfei Xiong, Xin Zhang
crossref: 2026-10-02

AI 速览

一句话:提出由贝叶斯程序分析引导 LLM 判断中间事实并剪枝依赖告警的静态分析告警消解框架,兼顾质量与 token 开销。

问题:抽象解释静态分析因过近似产生大量告警;逐告警提示 LLM 判断既不准又昂贵,且重复上下文浪费 token。方法:将 LLM 判断从末端告警转向更易验证的中间事实(如别名/流边),用推导图表示依赖以剪枝下游事实与告警;在 token 预算下定义事实影响优先问题,并用贝叶斯程序分析依据规则概率与事实后验估计剪枝影响,迭代查询高影响事实,将判断反馈为高置信证据。评估:在 Java 数据竞争分析和 C 污点分析上,与未过滤静态分析和逐告警 LLM 判断相比,提升告警消解质量并显著减少 token 消耗。

问题
静态分析器因过近似产生大量告警,而逐条让 LLM 判断末端告警不准确且 token 开销高。
方法
把 LLM 判断前移到中间事实,在推导图上做分析器无关的剪枝;用贝叶斯程序分析估计事实的剪枝影响,优先查询高影响事实并反馈判断。
评估
在 Java 数据竞争分析与 C 污点分析上,与未过滤分析和逐告警 LLM 判断对比,评估告警消解质量与 token 消耗。
原文摘要(Abstract)

Abstract-interpretation-based static analyzers often report large numbers of alarms due to over-approximation. Although large language models (LLMs) can help filter alarms, per-alarm prompting is often inaccurate and expensive. LLMs often misjudge such end alarms, and the repeated context across queries wastes many tokens. We shift LLM judgment from end alarms to intermediate facts (e.g., alias or flow edges), which are easier to validate. If a fact is judged false, all dependent facts and alarms can be pruned. We capture these dependencies in a derivation graph, enabling analyzer-agnostic pruning for any tool that exposes derivations. Under a token budget, we define the fact impact prioritization problem, which asks which facts to query first to maximize expected downstream pruning. We solve it with Bayesian program analysis by estimating each fact’s pruning impact from rule probabilities and fact posteriors. Building on these ideas, we present an LLM-based alarm resolution framework guided by Bayesian program analysis. It iteratively queries high-impact facts that LLMs can judge accurately, prunes downstream nodes when a fact is false, and feeds the judgments back to the Bayesian model as high-confidence evidence. We evaluate our approach on a Java datarace analysis and a C taint analysis, showing that it improves alarm-resolution quality while substantially reducing token consumption compared with both unfiltered static analysis and per-alarm LLM judging.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot12073,
  title = {LLM-Based Alarm Resolution Guided by Bayesian Program Analysis},
  author = {Yifan Zhang and Yuanfeng Shi and Haoran Lin and Yingfei Xiong and Xin Zhang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839536}
}