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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 53ff2911-fd63-4e79-9726-d6d0d065b1edCited 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
- Static Inference of Regular Grammars for Ad Hoc ParsersMichael Schröder, Jürgen CitoOOPSLA 2025 · 1 citation
- Mining input grammars from dynamic control flowRahul Gopinath, Björn Mathis, Andreas ZellerFSE 2020 · 60 citations
- "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
