Incremental Context-free Grammar Inference in Black Box Settings
Feifei Li, Xiao Chen, Xi Xiao, Xiaoyu Sun, Chuan Chen, Shaohua Wang, Jitao Han
Abstract
Black-box context-free grammar inference presents a significant challenge in many practical settings due to limited access to example programs. The state-of-the-art methods, Arvada and Treevada, employ heuristic approaches to generalize grammar rules, initiating from flat parse trees and exploring diverse generalization sequences. We have observed that these approaches suffer from low quality and readability, primarily because they process entire example strings, adding to the complexity and substantially slowing down computations. To overcome these limitations, we propose a novel method that segments example strings into smaller units and incrementally infers the grammar. Our approach, named Kedavra, has demonstrated superior grammar quality (enhanced precision and recall), faster runtime, and improved readability through empirical comparison.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Learning Highly Recursive Input Grammars cites NAUTILUS: Fishing for Deep Bugs with Grammars
- Learning Highly Recursive Input Grammars cites GRIMOIRE: Synthesizing Structure while Fuzzing
- Context-Free Grammar Inference for Complex Programming Languages in Black Box Settings cites Learning Highly Recursive Input Grammars
- Context-Free Grammar Inference for Complex Programming Languages in Black Box Settings cites NAUTILUS: Fishing for Deep Bugs with Grammars
- Context-Free Grammar Inference for Complex Programming Languages in Black Box Settings cites GRIMOIRE: Synthesizing Structure while Fuzzing
- Context-Free Grammar Inference for Complex Programming Languages in Black Box Settings cites Gramatron: effective grammar-aware fuzzing
- GRIMOIRE: Synthesizing Structure while Fuzzing cites NAUTILUS: Fishing for Deep Bugs with Grammars
- Gramatron: effective grammar-aware fuzzing cites NAUTILUS: Fishing for Deep Bugs with Grammars
Cited by top-tier papers2
- Deployability-Centric Infrastructure-as-Code Generation: Fail, Learn, Refine, and Succeed through LLM-Empowered DevOps SimulationTianyi Zhang, Shidong Pan, Zejun Zhang, Zhenchang Xing et al.FSE 2026 · 1 citation
- Context-Free Grammar Inference for Complex Programming Languages in Black Box SettingsFeifei Li, Xiao Chen, Xiaoyu Sun, Xi Xiao et al.ICSE 2026
Builds on9
- NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig et al.NDSS 2019 · 291 citations
- GRIMOIRE: Synthesizing Structure while FuzzingTim Blazytko, Cornelius Aschermann, Moritz Schlögel, Ali Abbasi et al.USENIX Security 2019 · 123 citations
- Gramatron: effective grammar-aware fuzzingPrashast Srivastava, Mathias PayerISSTA 2021 · 51 citations
- Input invariantsDominic Steinhöfel, Andreas ZellerFSE 2022 · 47 citations
- Learning Highly Recursive Input GrammarsNeil Kulkarni, Caroline Lemieux, Koushik SenASE 2021 · 24 citations
Related papers
- Fast Deterministic Black-box Context-free Grammar InferenceMohammad Rifat Arefin, Suraj Shetiya, Zili Wang, Christoph CsallnerICSE 2024 · 4 citations
- Mining input grammars from dynamic control flowRahul Gopinath, Björn Mathis, Andreas ZellerFSE 2020 · 60 citations
- Static Inference of Regular Grammars for Ad Hoc ParsersMichael Schröder, Jürgen CitoOOPSLA 2025 · 1 citation
- "Synthesizing input grammars": a replication studyBachir Bendrissou, Rahul Gopinath, Andreas ZellerPLDI 2022 · 8 citations
- Grammar Repair with Examples and Tree AutomataYunjeong Lee, Gokul Rajiv, Ilya SergeyOOPSLA 2026
