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.
翻译:我们提出了一种可扩展的框架,用于判定、证明和解释上下文无关文法的(非)等价性。我们实现了该框架,并在教育支持系统中收集的大规模数据集上进行了评估。尽管上下文无关语言的等价性问题在一般情况下是不可判定的,但该框架仍能处理这些数据集中的大部分内容。它引入并融合了多个领域的技术,包括:用于识别等价文法及充分相似的非等价文法的抽象文法转换语言、针对大规模上下文无关语言类的基于理论的比较算法,以及一种受图论启发的文法规范化方法,从而能够高效地识别同构文法。