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