arXiv · 2607.08959
Toward Inferring Accurate Context-free Grammars for Big Languages in a Black-box Setting
Abstract
Black-box context-free grammar inference is crucial for program analysis, reverse engineering, program understanding, fuzzing, and security. But existing approaches such as Arvada, TreeVada, Kedavra, and Cucio struggle with scalability, accuracy, and grammar readability, especially on larger languages. To address this challenge, we introduce XVada with several new techniques for deterministic inference of context-free grammars. In an empirical comparison that avoids several pitfalls of recent studies, XVada improves on the highest-scoring competitor (TreeVada) both in grammar accuracy and grammar compactness. XVada also found a CVE in the widely used Python Liquid engine. Fuzzing based on the XVada-inferred grammar found five more bugs, which the Python Liquid developers fixed based on our bug reports. XVada and all experimental data and scripts are freely available.
Explore related subjects
Keep this discovery
Mohammad Rifat Arefin, Nuhiat Arefin, Shanto Rahman, Christoph Csallner. 2026-07-09. Toward Inferring Accurate Context-free Grammars for Big Languages in a Black-box Setting. https://arxiv.org/abs/2607.08959
Cite the original work for its findings. Save a collection to share your selection of sources.