paperbot · PL 论文追踪

全部论文 待读 收藏

P2 From Syntactic to Semantic Spectra for Fault Localization

从语法谱到语义谱的故障定位
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 3/10 · 该论文属于程序分析与调试(故障定位)方向,涉及语义不变式推断与反事实验证,与用户的程序分析背景有一定交集;但它既未涉及 LLM/Agent,也不针对浮点程序分析、贝叶斯程序分析或 ML/Agentic 系统的静态分析,与画像中正在追的四条主线均不直接相关。引用 0 inbox
Zhaorui Yang, Qian Zhang, Rajiv Gupta, Ashish Kundu
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出基于语义谱的故障定位框架 SemLoc,将推断的语义不变式索引到程序结构,大幅缩小候选故障行范围。

现有故障定位技术通常借助结构代理(如覆盖率谱)把失败与执行行为关联起来,但当失败源于语义意图的违背——例如数值不变式、值关系、状态或时序一致性——而不改变执行结构时,这类代理便会失效。本文提出 SemLoc,一个以程序结构为锚点的语义谱故障定位框架。其核心思想是:语义属性可以被推断出来并显式地索引到程序结构上。SemLoc 首先从代码中推断领域特定约束,将其索引到函数、基本块与数据流上,并在运行时对约束求值以找出被违反的不变式;随后利用反事实验证剪除不正确或不完整的推断约束,从而精化定位结果。初步结果显示,SemLoc 将候选故障行减少 74.4%,相比基于谱的故障定位减少 5.2 倍,相比 delta debugging 减少 6.2 倍,并在所有评估对象上匹配真实故障位置。该工作自然可推广到基于数据特征、值分布或学习表示的谱。

问题
传统故障定位依赖执行结构代理(如覆盖率谱),当故障来自数值不变式、值关系或状态/时序一致性等语义意图违背而不改变执行结构时,这些代理会失效。
方法
SemLoc 从代码推断领域特定约束,按函数、基本块与数据流建立索引,并在运行时求值以定位被违反的不变式;再用反事实验证剪除错误或不完整的约束以精化结果。
评估
在评估对象上测量候选故障行的缩减比例与真实故障位置匹配情况,结果显示候选行减少 74.4%,相比谱-based 定位减少 5.2 倍、相比 delta debugging 减少 6.2 倍,且全部匹配真实故障位置。
原文摘要(Abstract)

Fault localization identifies program locations responsible for observed failures. Existing techniques often rely on structural proxies to correlate failures with execution behavior. Such proxies collapse when failures arise from violations of semantic intent, such as numeric invariants, value relations, and state or temporal consistency, without altering execution structure. In this paper, we propose SemLoc, a fault localization framework based on semantic spectra anchored to program structures. The key essence is that semantic properties can be inferred and explicitly indexed to program structure. SemLoc first infers domain-specific constraints from code, indexes them across functions, blocks, and dataflows, and evaluates them at runtime to identify violated invariants. It then applies counterfactual verification to refine localization by pruning inferred constraints that are incorrect or incomplete. Our preliminary results indicate that SemLoc reduces the candidate faulty lines by 74.4%, corresponding to 5.2× reduction compared with spectrum-based fault localization and 6.2× reduction compared with delta debugging, while matching the ground-truth faulty locations on all evaluated subjects. The investigation of semantic spectra indexed to program structure naturally generalizes to future spectra based on data characteristics, value distributions, or learned representations.

链接与引用

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

BibTeX
@inproceedings{YangZGK26,
  title = {From Syntactic to Semantic Spectra for Fault Localization},
  author = {Zhaorui Yang and Qian Zhang and Rajiv Gupta and Ashish Kundu},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3805570}
}