English

Synthesizing Program Input Grammars

Programming Languages 2017-06-19 v2

Abstract

We present an algorithm for synthesizing a context-free grammar encoding the language of valid program inputs from a set of input examples and blackbox access to the program. Our algorithm addresses shortcomings of existing grammar inference algorithms, which both severely overgeneralize and are prohibitively slow. Our implementation, GLADE, leverages the grammar synthesized by our algorithm to fuzz test programs with structured inputs. We show that GLADE substantially increases the incremental coverage on valid inputs compared to two baseline fuzzers.

Keywords

Cite

@article{arxiv.1608.01723,
  title  = {Synthesizing Program Input Grammars},
  author = {Osbert Bastani and Rahul Sharma and Alex Aiken and Percy Liang},
  journal= {arXiv preprint arXiv:1608.01723},
  year   = {2017}
}
R2 v1 2026-06-22T15:12:53.425Z