127 research outputs found
Faithful (meta-)encodings of programmable strategies into term rewriting systems
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
Generic Encodings of Constructor Rewriting Systems
Rewriting is a formalism widely used in computer science and mathematical
logic. The classical formalism has been extended, in the context of functional
languages, with an order over the rules and, in the context of rewrite based
languages, with the negation over patterns. We propose in this paper a concise
and clear algorithm computing the difference over patterns which can be used to
define generic encodings of constructor term rewriting systems with negation
and order into classical term rewriting systems. As a direct consequence,
established methods used for term rewriting systems can be applied to analyze
properties of the extended systems. The approach can also be seen as a generic
compiler which targets any language providing basic pattern matching
primitives. The formalism provides also a new method for deciding if a set of
patterns subsumes a given pattern and thus, for checking the presence of
useless patterns or the completeness of a set of patterns.Comment: Added appendix with proofs and extended example
Generating Distributed Programs from Event-B Models
Distributed algorithms offer challenges in checking that they meet their
specifications. Verification techniques can be extended to deal with the
verification of safety properties of distributed algorithms. In this paper, we
present an approach for combining correct-by-construction approaches and
transformations of formal models (Event-B) into programs (DistAlgo) to address
the design of verified distributed programs. We define a subset LB (Local
Event-B) of the Event-B modelling language restricted to events modelling the
classical actions of distributed programs as internal or local computations,
sending messages and receiving messages. We define then transformations of the
various elements of the LB language into DistAlgo programs. The general
methodology consists in starting from a statement of the problem to program and
then progressively producing an LB model obtained after several refinement
steps of the initial LB model. The derivation of the LB model is not described
in the current paper and has already been addressed in other works. The
transformation of LB models into DistAlgo programs is illustrated through a
simple example. The refinement process and the soundness of the transformation
allow one to produce correct-by-construction distributed programs.Comment: In Proceedings VPT/HCVS 2020, arXiv:2008.0248
A ρ-Calculus of Explicit Constraint Application
AbstractTheoretical presentations of the ρ-calculus often treat the matching constraint computations as an atomic operation although matching constraints are explicitly expressed. Actual implementations have to take a much more realistic view: computations needed in order to find the solutions of a matching equation can be really important in some matching theories and the substitution application usually involves a term traversal.Following the works on explicit substitutions in the λ-calculus, we propose, study and exemplify a ρ-calculus with explicit constraint handling, up to the level of substitution applications. The approach is general, allowing the extension to various matching theories. We show that the calculus is powerful enough to deal with errors. We establish the confluence of the calculus and the termination of the explicit constraint handling and application sub-calculus
Introduction to the Rewriting Calculus
The -calculus is a new calculus that integrates in a uniform and simple setting first-order rewriting, -calculus and non-deterministic computations. This paper describes the calculus from its syntax to its basic properties in the untyped case. We show how it embeds first-order conditional rewriting and -calculus. Finally we use the -calcul- us to give an operational semantics to the rewrite based language ELAN
-Calculus. Its Syntax and Basic Properties
Rapport interne.\roCal\ is a new calculus that integrates in a uniform and simple setting first-order rewriting, -calculus and non-deterministic computations. This paper describes the calculus from its syntax to its basic properties in the untyped case. We show how it embeds first-order rewriting & -calculus. Finally we use \roCal\ to give an operational semantics to the rewrite based language \elan
Using Rewriting and Strategies for Describing the B Predicate Prover
Colloque avec actes sans comité de lecture.The framework of computational systems has been already used for describing several computational logics. In this paper is described the way a propositional prover and a predicate prover are implemented in ELAN, the system developed in Nancy for describing and executing computational systems. The inference rules for the provers are described by conditional rewrite rules and their application is controlled by strategies. We show how different strategies using the same set of rewrite rules can yield different proof methods
The Rewriting Calculus
Rapport interne.The Rho-calculus is a new calculus that integrates in a uniform and simple setting first-order rewriting, lambda-calculus and non-deterministic computations. This paper describes the calculus from its syntax to its basic properties in the untyped case. We show how it embeds first-order conditional rewriting and lambda-calculus. Finally we use the Rho-calculus to give an operational semantics to the rewrite based language Elan
- …