Active Learning of Input Grammars [article]

Matthias Höschele, Alexander Kampmann, Andreas Zeller
<span title="2017-08-29">2017</span> <i > arXiv </i> &nbsp; <span class="release-stage" >pre-print</span>
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
more &raquo; ... ult, 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.
<span class="external-identifiers"> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1708.08731v1">arXiv:1708.08731v1</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/gaxqc5gdwbcdvb5uztbpsje3ay">fatcat:gaxqc5gdwbcdvb5uztbpsje3ay</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20200901224804/https://arxiv.org/pdf/1708.08731v1.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/9f/18/9f180e099c3c9afe5944d39d142129f965a318ed.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1708.08731v1" title="arxiv.org access"> <button class="ui compact blue labeled icon button serp-button"> <i class="file alternate outline icon"></i> arxiv.org </button> </a>