# Synthesizing Program Input Grammars

arXiv: https://arxiv.org/abs/1608.01723 · HTML: https://mlsanity.com/paper/1608.01723/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 5 Aug 2016.

## Built on by (most cited first, 3 of 3)

- [Enhancing LLM Agents for Code Generation with Possibility and Pass-rate Prioritized Experience Replay](https://mlsanity.com/paper/2410.12236/) (2024)
- [Example-Free Learning of Regular Languages with Prefix Queries](https://mlsanity.com/paper/2504.02170/) (2025)
- [Learning Context-Free Grammars for Grammar-Constrained Decoding via Declarative Agentic Programming with Guarantees](https://mlsanity.com/paper/2608.05493/) (2026)

## Abstract (arXiv)

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.
