74,932 research outputs found

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

    Get PDF
    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

    Controlled Term Rewriting

    Get PDF
    International audienceMotivated by the problem of verification of imperative tree transformation programs, we study the combination, called controlled term rewriting systems (CntTRS), of term rewriting rules with con- straints selecting the possible rewrite positions. These constraints are specified, for each rewrite rule, by a selection automaton which defines a set of positions in a term based on tree automata computations. We show that reachability is PSPACE-complete for so-called monotonic CntTRS, such that the size of every left-hand-side of every rewrite rule is larger or equal to the size of the corresponding right-hand-side, and also for the class of context-free non-collapsing CntTRS, which transform Context-Free (CF) tree language into CF tree languages. When allowing size-reducing rules, reachability becomes undecidable, even for flat CntTRS (both sides of rewrite rules are of depth at most one) when restricting to words (i.e. function symbols have arity at most one), and for ground CntTRS (rewrite rules have no variables). We also consider a restricted version of the control such that a position is selected if the sequence of symbols on the path from that position to the root of the tree belongs to a given regular language. This restriction enables decision results in the above cases

    Applications and extensions of context-sensitive rewriting

    Full text link
    [EN] Context-sensitive rewriting is a restriction of term rewriting which is obtained by imposing replacement restrictions on the arguments of function symbols. It has proven useful to analyze computational properties of programs written in sophisticated rewriting-based programming languages such asCafeOBJ, Haskell, Maude, OBJ*, etc. Also, a number of extensions(e.g., to conditional rewritingor constrained equational systems) and generalizations(e.g., controlled rewritingor forbidden patterns) of context-sensitive rewriting have been proposed. In this paper, we provide an overview of these applications and related issues. (C) 2021 Elsevier Inc. All rights reserved.Partially supported by the EU (FEDER), and projects RTI2018-094403-B-C32 and PROMETEO/2019/098.Lucas Alba, S. (2021). Applications and extensions of context-sensitive rewriting. Journal of Logical and Algebraic Methods in Programming. 121:1-33. https://doi.org/10.1016/j.jlamp.2021.10068013312

    Verification of Timed Automata Using Rewrite Rules and Strategies

    Full text link
    ELAN is a powerful language and environment for specifying and prototyping deduction systems in a language based on rewrite rules controlled by strategies. Timed automata is a class of continuous real-time models of reactive systems for which efficient model-checking algorithms have been devised. In this paper, we show that these algorithms can very easily be prototyped in the ELAN system. This paper argues through this example that rewriting based systems relying on rules and strategies are a good framework to prototype, study and test rather efficiently symbolic model-checking algorithms, i.e. algorithms which involve combination of graph exploration rules, deduction rules, constraint solving techniques and decision procedures

    Renormalization Group Study of the A+B->0 Diffusion-Limited Reaction

    Full text link
    The A+B→0A + B\to 0 diffusion-limited reaction, with equal initial densities a(0)=b(0)=n0a(0) = b(0) = n_0, is studied by means of a field-theoretic renormalization group formulation of the problem. For dimension d>2d > 2 an effective theory is derived, from which the density and correlation functions can be calculated. We find the density decays in time as a,b \sim C\sqrt{\D}(Dt)^{-d/4} for d<4d < 4, with \D = n_0-C^\prime n_0^{d/2} + \dots, where CC is a universal constant, and C′C^\prime is non-universal. The calculation is extended to the case of unequal diffusion constants DA≠DBD_A \neq D_B, resulting in a new amplitude but the same exponent. For d≤2d \le 2 a controlled calculation is not possible, but a heuristic argument is presented that the results above give at least the leading term in an ϵ=2−d\epsilon = 2-d expansion. Finally, we address reaction zones formed in the steady-state by opposing currents of AA and BB particles, and derive scaling properties.Comment: 17 pages, REVTeX, 13 compressed figures, included with epsf. Eq. (6.12) corrected, and a moderate rewriting of the introduction. Accepted for publication in J. Stat. Phy

    Regularly Controlled Bidirectional Linear Basic Grammars

    Get PDF
    We investigate the bidirectional application of grammar productions -- i.e., using the productions in the reversed direction too -- to linear basic grammars. As in the case of regularly controlled bidirectional context-free grammars (or RCB grammars), we provide bidirectional linear basic grammars with a regular control language over the rules (i.e., productions and their corresponding reductions). Our main result shows that under the so-called RS/B/f-mode of derivation, bidirectionality gives rise to a dramatic increase in generating power compared with (regularly controlled unidirectional) linear basic grammars.\ud \u

    Maude: specification and programming in rewriting logic

    Get PDF
    Maude is a high-level language and a high-performance system supporting executable specification and declarative programming in rewriting logic. Since rewriting logic contains equational logic, Maude also supports equational specification and programming in its sublanguage of functional modules and theories. The underlying equational logic chosen for Maude is membership equational logic, that has sorts, subsorts, operator overloading, and partiality definable by membership and equality conditions. Rewriting logic is reflective, in the sense of being able to express its own metalevel at the object level. Reflection is systematically exploited in Maude endowing the language with powerful metaprogramming capabilities, including both user-definable module operations and declarative strategies to guide the deduction process. This paper explains and illustrates with examples the main concepts of Maude's language design, including its underlying logic, functional, system and object-oriented modules, as well as parameterized modules, theories, and views. We also explain how Maude supports reflection, metaprogramming and internal strategies. The paper outlines the principles underlying the Maude system implementation, including its semicompilation techniques. We conclude with some remarks about applications, work on a formal environment for Maude, and a mobile language extension of Maude

    A Symbolic Transformation Language and its Application to a Multiscale Method

    Get PDF
    The context of this work is the design of a software, called MEMSALab, dedicated to the automatic derivation of multiscale models of arrays of micro- and nanosystems. In this domain a model is a partial differential equation. Multiscale methods approximate it by another partial differential equation which can be numerically simulated in a reasonable time. The challenge consists in taking into account a wide range of geometries combining thin and periodic structures with the possibility of multiple nested scales. In this paper we present a transformation language that will make the development of MEMSALab more feasible. It is proposed as a Maple package for rule-based programming, rewriting strategies and their combination with standard Maple code. We illustrate the practical interest of this language by using it to encode two examples of multiscale derivations, namely the two-scale limit of the derivative operator and the two-scale model of the stationary heat equation.Comment: 36 page
    • …
    corecore