Detecting and Explaining (In-)equivalence of Context-Free Grammars
Marko Schmellenkamp, Thomas Zeume, Sven Argo, Sandra Kiefer, Cedric Siems, Fynn Stebel
Abstract
We propose a scalable framework for deciding, proving, and explaining (in-)equivalence of context-free grammars. We present an implementation of the framework and evaluate it on large data sets collected within educational support systems. Even though the equivalence problem for context-free languages is undecidable in general, the framework is able to handle a large portion of these datasets. It introduces and combines techniques from several areas, such as an abstract grammar transformation language to identify equivalent grammars as well as sufficiently similar inequivalent grammars, theory-based comparison algorithms for a large class of context-free languages, and a graph-theory-inspired grammar canonization that allows to efficiently identify isomorphic grammars. CCS Concepts: • Theory of computation → Grammars and context-free languages; • Applied computing → Interactive learning environments; • Software and its engineering → Specialized application languages.
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.
Builds on1
Related papers
- CoStar: a verified ALL(*) parserSam Lasser, Chris Casinghino, Kathleen Fisher, Cody RouxPLDI 2021 · 10 citations
- Unraveling Syntax: Language Modeling and the Substructure of GrammarsLaura Ying Schulz, Daniel Mitropolsky, Tomaso A PoggioICML 2026 · 5 citations
- Program equivalence for assisted grading of functional programsJoshua Clune, Vijay Ramamurthy, Ruben Martins, Umut A. AcarOOPSLA 2020 · 11 citations
- Regular Grammars for Sets of Graphs of Tree-Width 2Marius Bozga, Radu Iosif, Florian ZulegerLICS 2025
- Faster general parsing through context-free memoizationGrzegorz HermanPLDI 2020 · 4 citations
