arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1708.08731cs.PLcs.FL
收藏

输入语法的主动学习

Active Learning of Input Grammars

Matthias Höschele, Alexander Kampmann, Andreas Zeller

摘要:

了解程序输入的精确格式是系统测试的必要前提。给定一个程序和一小组样本输入,我们(1)跟踪输入的数据流,将共享相同数据流的输入片段聚集到词法和语法实体中;(2)根据相关的变量和函数标识符为这些实体分配名称;(3)通过成员查询系统地概括产生式规则。因此,我们只需要一个最小的样本输入集,以获得人类可读的上下文无关文法,反映有效的输入结构。在我们对URL、电子表格或配置文件等输入的评估中,我们的AUTOCast原型获得了准确且可读性很强的输入语法,并且可以直接输入到测试生成器中进行全面的自动化测试。

英文摘要:

Knowing the precise format of a program's input is a necessary prerequisite for systematic testing. Given a program and a small set of sample inputs, we (1) track the data flow of inputs to aggregate input fragments that share the same data flow through program execution into lexical and syntactic entities; (2) assign these entities names that are based on the associated variable and function identifiers; and (3) systematically generalize production rules by means of membership queries. As a result, we need only a minimal set of sample inputs to obtain human-readable context-free grammars that reflect valid input structure. In our evaluation on inputs like URLs, spreadsheets, or configuration files, our AUTOGRAM prototype obtains input grammars that are both accurate and very readable - and that can be directly fed into test generators for comprehensive automated testing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑