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

05/24/2017
by   Horatiu Cirstea, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/14/2019

Generic Encodings of Constructor Rewriting Systems

Rewriting is a formalism widely used in computer science and mathematica...
research
02/11/2022

REST: Integrating Term Rewriting with Program Verification (Extended Version)

We introduce REST, a novel term rewriting technique for theorem proving ...
research
06/25/2021

From Linear Term Rewriting to Graph Rewriting with Preservation of Termination

Encodings of term rewriting systems (TRSs) into graph rewriting systems ...
research
02/28/2020

Tools in Term Rewriting for Education

Term rewriting is a Turing complete model of computation. When taught to...
research
07/21/2023

Binary Non-Termination in Term Rewriting and Logic Programming

We present a new syntactic criterion for the automatic detection of non-...
research
10/30/2019

Formalizing the Dependency Pair Criterion for Innermost Termination

Rewriting is a framework for reasoning about functional programming. The...
research
07/18/2019

Priorities in tock-CSP

The tock-CSP encoding embeds a rich and flexible approach to modelling d...

Please sign up or login with your details

Forgot password? Click here to reset