paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Detecting and Explaining (In-)equivalence of Context-Free Grammars

检测与解释上下文无关文法的(非)等价性
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文研究上下文无关文法的等价性判定与解释,属于形式语言/自动机理论,与用户核心关注的 PL 与 LLM/Agent 交叉、浮点程序分析和贝叶斯程序分析没有直接关联;仅在静态分析与形式化验证的基础理论层面有边缘联系。引用 1 inbox
Marko Schmellenkamp, Thomas Zeume, Sven Argo, Sandra Kiefer, Cedric Siems, Fynn Stebel
crossref: 2026-09-10

AI 速览

一句话:提出可扩展框架,用于判定、证明并解释上下文无关文法的等价与非等价,并在教育数据上验证。

上下文无关语言的等价性问题一般是不可判定的,但教育支持系统等场景仍需要对大量文法进行等价性判定与错误解释。本文提出一个可扩展框架,结合抽象文法转换语言、面向一大类上下文无关语言的理论比较算法,以及受图论启发的文法规范化方法,从而识别等价文法、足够相似的非等价文法以及同构文法。作者实现了该框架并在教育支持系统收集的大规模数据集上评估。结果表明,尽管问题一般不可判定,该框架仍能处理数据集中的很大一部分,并提供(非)等价的证明或解释。

问题
如何在上下文无关语言等价性一般不可判定的情况下,对教育场景中大规模上下文无关文法进行可扩展的等价/非等价判定与解释。
方法
提出组合式框架:使用抽象文法转换语言识别等价或足够相似的非等价文法,采用面向一大类上下文无关语言的理论比较算法,并用图论启发的文法规范化识别同构文法。
评估
实现框架并在教育支持系统收集的大规模数据集上评估,展示其能处理其中很大一部分文法。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot3016,
  title = {Detecting and Explaining (In-)equivalence of Context-Free Grammars},
  author = {Marko Schmellenkamp and Thomas Zeume and Sven Argo and Sandra Kiefer and Cedric Siems and Fynn Stebel},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763156}
}