一句话:提出概率推断调试技术,融合人类推理与程序语义以定位最可能故障语句。
本文面向仅有单次失败执行、缺少其他通过/失败运行参考的调试场景,此时调试存在大量不确定性,例如应优先检查哪些变量。作者将调试建模为概率推断问题:为每个执行的语句实例和变量的正确/故障状态引入随机变量,并把人类知识、类人推理规则与程序语义表示为条件概率分布(概率约束)。通过求解这些约束,推断出最可能的故障语句。实验表明,该技术能高效精确定位一组真实程序缺陷的根因,且所需开发者交互次数远少于未编码人类智能的近期方法;用户研究也显示其显著提升了调试生产力。
We aim to debug a single failing execution without the assistance from other passing/failing runs. In our context, debugging is a process with substantial uncertainty - lots of decisions have to be made such as what variables shall be inspected first. To deal with such uncertainty, we propose to equip machines with human-like intelligence. Specifically, we develop a highly automated debugging technique that aims to couple human-like reasoning (e.g., dealing with uncertainty and fusing knowledge) with program semantics based analysis, to achieve benefits from the two and mitigate their limitations. We model debugging as a probabilistic inference problem, in which the likelihood of each executed statement instance and variable being correct/faulty is modeled by a random variable. Human knowledge, human-like reasoning rules and program semantics are modeled as conditional probability distributions, also called probabilistic constraints. Solving these constraints identifies the most likely faulty statements. Our results show that the technique is highly effective. It can precisely identify root causes for a set of real-world bugs in a very small number of interactions with developers, much smaller than a recent proposal that does not encode human intelligence. Our user study also confirms that it substantially improves human productivity.
DOI 原文 ·
@inproceedings{paperbot4475,
title = {Debugging with intelligence via probabilistic inference},
author = {Zhaogui Xu and Shiqing Ma and Xiangyu Zhang and Shuofei Zhu and Baowen Xu},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3180237}
}