paperbot · PL 论文追踪

全部论文 待读 收藏

P2 When does my program do this? learning circumstances of software behavior

程序何时表现出此行为?学习软件行为的触发条件
FSE Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2020匹配度 4/10 · 该论文属于机器学习与程序语言/软件测试调试交叉,利用文法与决策树学习程序行为发生的输入条件,但并非静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户当前核心方向(PL→AI 静态分析、AI→PL 形式化验证、LLM 交叉)匹配度有限。引用 28 inbox
Alexander Kampmann, Nikolas Havrikov, Ezekiel O. Soremekun, Andreas Zeller
crossref: 2026-09-12

AI 速览

一句话:提出 Alhazen,结合文法解析输入与决策树学习,自动推导解释并预测程序行为发生的输入条件。

论文关注的问题是:当程序出现某种行为(如失败)时,如何自动确定与之相关的输入特征。作者提出 Alhazen 方法:首先从一次表现出目标行为的运行开始,使用文法将输入解析为独立元素;然后利用决策树学习器观察并学习哪些输入元素与该行为相关联;接着借助文法生成新的输入,以进一步强化或反驳学习到的关联假设;重复上述学习与生成步骤,最终得到一个能够解释和预测该行为的理论。在 find、grep、NetHack 和 JavaScript 转译器上的评估表明,Alhazen 生成的理论能以高准确率预测并产生失败,并帮助开发者聚焦于少量输入特征,例如“grep 在同时使用 --fixed-strings 选项和空搜索字符串时会失败”。

问题
程序出现某种行为(尤其是失败)时,如何自动确定导致该行为发生的输入条件或输入特征。
方法
基于一次触发目标行为的运行,用文法将输入解析为元素,用决策树学习输入元素与行为的关联,再用文法生成新输入以强化或反驳假设,迭代形成可解释、可预测行为的理论。
评估
在 find、grep、NetHack 和 JavaScript 转译器的输入上进行评估,所生成理论能以高准确率预测并产生失败,并让开发者聚焦于少量关键输入特征。
原文摘要(Abstract)

A program fails. Under which circumstances does the failure occur? Our Alhazenapproach starts with a run that exhibits a particular behavior and automatically determines input features associated with the behavior in question: (1) We use a grammar to parse the input into individual elements. (2) We use a decision tree learner to observe and learn which input elements are associated with the behavior in question. (3) We use the grammar to generate additional inputs to further strengthen or refute hypotheses as learned associations. (4) By repeating steps 2 and 3, we obtain a theory that explains and predicts the given behavior. In our evaluation using inputs for find, grep, NetHack, and a JavaScript transpiler, the theories produced by Alhazen predict and produce failures with high accuracy and allow developers to focus on a small set of input features: “grep fails whenever the --fixed-strings option is used in conjunction with an empty search string.”

链接与引用

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

BibTeX
@inproceedings{paperbot5799,
  title = {When does my program do this? learning circumstances of software behavior},
  author = {Alexander Kampmann and Nikolas Havrikov and Ezekiel O. Soremekun and Andreas Zeller},
  booktitle = {FSE},
  year = {2020},
  doi = {10.1145/3368089.3409687}
}