paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Latra: A Template-Based Language-Agnostic Transformation Framework for Effective Program Reduction

Latra:面向有效程序化简的基于模板的语言无关变换框架
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文关注程序化简与语言无关的模板化重写框架,属于 PL/测试调试方向,但未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心研究方向。引用 0 inbox
Zhenyang Xu, Yiran Wang, Yongqiang Tian, Mengxiao Zhang, Chengnian Sun
crossref: 2026-09-12

AI 速览

一句话:提出基于模板 DSL 的语言无关程序化简框架 Latra,兼顾通用性与语言特定化简的效果。

现有程序化简工具面临效果与通用性的权衡:C-Reduce、ddSMT 等语言特定工具化简效果好,但需为每种语言投入大量工程;Vulcan 等语言无关工具通用却效果欠佳。Latra 将语言无关化简与用户定义的语言特定变换结合,并提供基于简单匹配—重写模板的 DSL,降低定义变换所需的形式语法知识。评估显示,Latra 在 C 中比 Vulcan 多减少 33.77% token,在 SMT-LIB 中多减少 9.17% token,且 SMT-LIB 执行快 32.27%;其效果接近 C-Reduce 和 ddSMT(平均 89 vs. 85、103 vs. 109 tokens),而实现代码量大幅降低(167 vs. 5685、62 vs. 118 行)。

问题
语言特定化简器效果高但工程成本大,语言无关化简器通用但效果不足,如何兼顾二者仍是程序化简中的关键问题。
方法
Latra 以语言无关化简为骨架,结合用户通过匹配—重写模板 DSL 定义的语言特定变换,实现通用且有效的定向程序化简。
评估
在 C 与 SMT-LIB 上将 Latra 与 Vulcan、C-Reduce、ddSMT 比较 token 减少量、执行时间和实现代码量。
原文摘要(Abstract)

Essential for debugging compilers and interpreters, existing reduction tools face a fundamental trade-off. Language-Specific reducers, such as C-Reduce and ddSMT, offer highly effective reductions but require substantial engineering effort for each target language. Conversely, language-agnostic reducers, like Vulcan, sacrifice effectiveness for broad applicability.To bridge this gap, we present Latra, a novel template-based framework that balances both aspects, enabling general, effective, targeted program reduction. Latra combines language-agnostic reduction with user-defined, language-specific transformations. It facilitates user-defined transformations through a user-friendly domain-specific language based on simple matching and rewriting templates. This minimizes the need for deep formal grammar knowledge. Latra empowers users to tailor reductions to specific languages with reduced implementation overhead.Our evaluation shows that Latra significantly outperforms Vulcan. On average, it reduces 33.77% more tokens in C and 9.17% more tokens in SMT-LIB, with 32.27% faster execution in SMT-LIB. Notably, Latra closely matches the effectiveness of language-specific reducers, i.e., C-Reduce and ddSMT (89 vs. 85, 103 vs. 109 tokens on average), while significantly reducing engineering effort (167 vs. 5,685, 62 vs. 118 lines of code). We strongly believe that Latra provides a practical and cost-efficient approach to program reduction, effectively balancing language-specific effectiveness with language-agnostic generality.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9298,
  title = {Latra: A Template-Based Language-Agnostic Transformation Framework for Effective Program Reduction},
  author = {Zhenyang Xu and Yiran Wang and Yongqiang Tian and Mengxiao Zhang and Chengnian Sun},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00188}
}