paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Faithful (meta-)encodings of programmable strategies into term rewriting systems

可编程策略到项重写系统的忠实(元)编码
LMCS vol.Volume 13, Issue 42017匹配度 2/10 · 论文研究项重写系统中可编程策略的忠实编码与终止性分析,属于形式化方法与程序语言理论,但未涉及用户关注的核心方向:静态分析在 ML/Agentic 程序中的应用、LLM/Agent 改进静态分析或形式化验证、浮点程序分析及贝叶斯程序分析。因此匹配度低。引用 3 inbox
Horatiu Cirstea, Serguei Lenglet, Pierre-Etienne Moreau
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:将可编程策略忠实编码为项重写系统,使策略控制重写的终止性可用现成终止工具分析。

重写被广泛用作编程和建模范式,但策略控制规则应用,其操作语义通常只被默认接受,终止性分析多局限于特定策略。本文提出一种通用编码,将 Maude、Stratego、Tom 等重写语言中的经典控制和遍历策略翻译为普通项重写系统。编码被证明可靠且完备,因此项重写已有终止性方法可直接分析策略控制项重写系统的终止性。作者将编码推广到多类签名,并用项的元层表示减小编码规模。Tom 实现生成 AProVE、TTT2 等终止工具可接受的 TRS;实验表明这些工具能有效证明或反驳终止性,且编码后性能与原生的 Tom 策略相当。该工作也可视为可集成到提供模式匹配原语语言中的通用策略编译器。

问题
策略控制的重写系统中,策略操作语义常缺乏形式化,且针对具体策略的终止性分析难以复用一般项重写终止方法。
方法
将经典控制与遍历策略通用且可靠完备地编码为普通项重写系统,支持多类签名与元层项表示,并在 Tom 中实现以生成终止工具可读的 TRS。
评估
通过 Tom 实现与实验,使用 AProVE/TTT2 证明或反驳生成 TRS 的终止性,并与原生 Tom 策略性能比较。
原文摘要(Abstract)

Rewriting is a formalism widely used in computer science and mathematical logic. When using rewriting as a programming or modeling paradigm, the rewrite rules describe the transformations one wants to operate and rewriting strategies are used to con- trol their application. The operational semantics of these strategies are generally accepted and approaches for analyzing the termination of specific strategies have been studied. We propose in this paper a generic encoding of classic control and traversal strategies used in rewrite based languages such as Maude, Stratego and Tom into a plain term rewriting system. The encoding is proven sound and complete and, as a direct consequence, estab- lished termination methods used for term rewriting systems can be applied to analyze the termination of strategy controlled term rewriting systems. We show that the encoding of strategies into term rewriting systems can be easily adapted to handle many-sorted signa- tures and we use a meta-level representation of terms to reduce the size of the encodings. The corresponding implementation in Tom generates term rewriting systems compatible with the syntax of termination tools such as AProVE and TTT2, tools which turned out to be very effective in (dis)proving the termination of the generated term rewriting systems. The approach can also be seen as a generic strategy compiler which can be integrated into languages providing pattern matching primitives; experiments in Tom show that applying our encoding leads to performances comparable to the native Tom strategies.

链接与引用

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

BibTeX
@article{CirsteaLM17,
  title = {Faithful (meta-)encodings of programmable strategies into term rewriting systems},
  author = {Horatiu Cirstea and Serguei Lenglet and Pierre-Etienne Moreau},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 13, Issue 4},
  year = {2017},
  doi = {10.23638/lmcs-13(4:16)2017}
}