Lune

ICSE2024Top-tier venue

Fast Deterministic Black-box Context-free Grammar Inference

Mohammad Rifat Arefin, Suraj Shetiya, Zili Wang, Christoph Csallner

Abstract

Black-box context-free grammar inference is a hard problem as in many practical settings it only has access to a limited number of example programs. The state-of-the-art approach Arvada heuristically generalizes grammar rules starting from flat parse trees and is non-deterministic to explore different generalization sequences. We observe that many of Arvada's generalization steps violate common language concept nesting rules. We thus propose to pre-structure input programs along these nesting rules, apply learnt rules recursively, and make black-box context-free grammar inference deterministic. The resulting TreeVada yielded faster runtime and higher-quality grammars in an empirical comparison. The TreeVada source code, scripts, evaluation parameters, and training data are open-source and publicly available ( https://doi.org/10.6084/m9.figshare.23907738 ).

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.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learning Highly Recursive Input Grammars cites GRIMOIRE: Synthesizing Structure while Fuzzing
  • Learning Highly Recursive Input Grammars cites Mining input grammars from dynamic control flow
  • 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 Incremental Context-free Grammar Inference in Black Box Settings
  • 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 MoFuzz: A Fuzzer Suite for Testing Model-Driven Software Engineering Tools
  • Context-Free Grammar Inference for Complex Programming Languages in Black Box Settings cites Gramatron: effective grammar-aware fuzzing
  • Incremental Context-free Grammar Inference in Black Box Settings cites Learning Highly Recursive Input Grammars
  • Incremental Context-free Grammar Inference in Black Box Settings cites GRIMOIRE: Synthesizing Structure while Fuzzing
  • Incremental Context-free Grammar Inference in Black Box Settings cites MoFuzz: A Fuzzer Suite for Testing Model-Driven Software Engineering Tools
  • Incremental Context-free Grammar Inference in Black Box Settings cites Gramatron: effective grammar-aware fuzzing
  • Static Inference of Regular Grammars for Ad Hoc Parsers cites Learning Highly Recursive Input Grammars
  • Static Inference of Regular Grammars for Ad Hoc Parsers cites Mining input grammars from dynamic control flow
  • Mining input grammars from dynamic control flow cites GRIMOIRE: Synthesizing Structure while Fuzzing
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Incremental Context-free Grammar Inference in Black Box SettingsFeifei Li, Xiao Chen, Xi Xiao, Xiaoyu Sun et al.ASE 2024 · 1 citation
  2. Static Inference of Regular Grammars for Ad Hoc ParsersMichael Schröder, Jürgen CitoOOPSLA 2025 · 1 citation
  3. Context-Free Grammar Inference for Complex Programming Languages in Black Box SettingsFeifei Li, Xiao Chen, Xiaoyu Sun, Xi Xiao et al.ICSE 2026

Builds on7

  1. GRIMOIRE: Synthesizing Structure while FuzzingTim Blazytko, Cornelius Aschermann, Moritz Schlögel, Ali Abbasi et al.USENIX Security 2019 · 123 citations
  2. Mining input grammars from dynamic control flowRahul Gopinath, Björn Mathis, Andreas ZellerFSE 2020 · 60 citations
  3. Gramatron: effective grammar-aware fuzzingPrashast Srivastava, Mathias PayerISSTA 2021 · 51 citations
  4. Learning Highly Recursive Input GrammarsNeil Kulkarni, Caroline Lemieux, Koushik SenASE 2021 · 24 citations
  5. MoFuzz: A Fuzzer Suite for Testing Model-Driven Software Engineering ToolsHoang Lam Nguyen, Nebras Nassar, Timo Kehrer, Lars GrunskeASE 2020 · 12 citations

Related papers

  1. Grammar Repair with Examples and Tree AutomataYunjeong Lee, Gokul Rajiv, Ilya SergeyOOPSLA 2026
  2. V-Star: Learning Visibly Pushdown Grammars from Program InputsXiaodong Jia, Gang TanPLDI 2024 · 4 citations
  3. "Synthesizing input grammars": a replication studyBachir Bendrissou, Rahul Gopinath, Andreas ZellerPLDI 2022 · 8 citations
  4. Grammatically Recognizing Images with Tree ConvolutionGuangrun Wang, Guangcong Wang, Keze Wang, Xiaodan Liang et al.KDD 2020 · 12 citations
  5. Stack Attention: Improving the Ability of Transformers to Model Hierarchical PatternsBrian DuSell, David ChiangICLR 2024 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines