Toward Inferring Accurate Context-free Grammars for Big Languages in a Black-box Setting
Xvada introduces new techniques for deterministic context-free grammar inference, improving accuracy and compactness over existing approaches, and discovers vulnerabilities in Python Liquid engine.
Introduces new techniques for deterministic context-free grammar inference
Before reading this…
Applications
- →Program analysis
- →Reverse engineering
- →Program understanding
- →Fuzzing
- →Security
To understand this paper, make sure you know these concepts first:
- Programming conceptsfind papers →
- Context-free grammarsfind papers →
Abstract
More Like ThisBlack-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, Xvada introduces 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.