paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Ad Hoc Syntax-Guided Program Reduction

即席语法引导的程序归约
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文关注程序归约工具 Perses 的可用性扩展,属于编程语言与调试/测试工具方向,不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与研究画像的核心交叉方向基本无关。仅在 PL 工程实现层面有间接关联。引用 7 inbox
Jia Le Tian, Mengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Yiwen Dong, Chengnian Sun
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:扩展 Perses,使任何有上下文无关文法的语言仅需配置文件即可进行语法引导程序归约。

程序归约是调试编译器、解释器等语言实现的关键技术。Perses 利用语法引导归约,但为新语言落地时,用户需手动将文法转换为 PNF、修改 Perses 代码库并重新构建,可用性较差。本文提出 Persesadhoc,只要目标语言具有上下文无关文法,用户只需编写配置文件并执行一条命令,即可对该语言程序进行即席归约。案例研究显示,支持 GLSL 所需的 Perses 基础设施代码从 190 行降至 20 行;广泛评估表明,Persesadhoc 在归约效果与效率上与 Perses 相当,且支持新语言仅需约 10 秒,相比原有人工投入可忽略不计。

问题
现有语法引导程序归约器 Perses 虽原理上语言无关,但支持新语言需手动转换文法、修改代码库并重新构建,可用性差。
方法
将 Perses 扩展为 Persesadhoc,通过配置文件描述新语言的上下文无关文法,使用户无需改代码即可执行即席程序归约。
评估
在 GLSL 上开展案例研究,并通过广泛实验比较代码量、支持新语言耗时以及归约效果与效率。
原文摘要(Abstract)

Program reduction is a widely adopted, indispensable technique for debugging language implementations such as compilers and interpreters. Given a program 𝑃 and a bug triggered by 𝑃, a program reducer can produce a minimized program 𝑃∗ that is derived from 𝑃 and still triggers the same bug. Perses is one of the state-of-the-art program reducers. It leverages the syntax of 𝑃 to guide the reduction process for efficiency and effectiveness. It is language-agnostic as its reduction algorithm is independent of any language-specific syntax. Conceptually to support a new language, Perses only needs the context-free grammar 𝐺 of the language; in practice, it is not easy. One needs to first manually transform 𝐺 into a special grammar form PNF with a tool provided by Perses, second manually change the code base of Perses to integrate the new language, and lastly build a binary of Perses. This paper presents our latest work to improve the usability of Perses by extending Perses to perform ad hoc program reduction for any new language as long as the language has a context-free grammar 𝐺. With this extended version (referred to as Persesadhoc), the difficulty of supporting new languages is significantly reduced: a user only needs to write a configuration file and execute one command to support a new language in Perses, compared to manually transforming the grammar format, modifying the code base, and re-building Perses. Our case study demonstrates that with Persesadhoc, the Perses related infrastructure code required for supporting GLSL can be reduced from 190 lines of code to 20. Our extensive evaluations also show that Persesadhoc is as effective and efficient as Perses in reducing hoc programs, and only takes 10 seconds to support a new language, which is negligible compared to the manual effort required in Perses. A video demonstration of the tool can be found at https://youtu.be/trYwOT0mXhU.

链接与引用

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

BibTeX
@inproceedings{TianZX00S23,
  title = {Ad Hoc Syntax-Guided Program Reduction},
  author = {Jia Le Tian and Mengxiao Zhang and Zhenyang Xu and Yongqiang Tian and Yiwen Dong and Chengnian Sun},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3613101}
}