Results 1 - 10
of
15
Context-Sensitive Rewriting Strategies
, 1997
"... Context-sensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively ..."
Abstract
-
Cited by 41 (30 self)
- Add to MetaCart
Context-sensitive rewriting is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. Such a restriction is given on a purely syntactic basis: it is (explicitly or automatically) specified on the arguments of symbols of the signature and inductively extended to arbitrary positions of terms built from those symbols. Termination is not only preserved but usually improved and several methods have been developed to formally prove it. In this paper, we investigate the definition, properties, and use of context-sensitive rewriting strategies, i.e., particular, fixed sequences of context-sensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that context-sensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for root-normalization, normalization, and infinitary normalization. We show that this theory is suitable for formalizing ...
Programming in Equational Logic: Beyond Strong Sequentiality
, 1993
"... Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the parallel-outermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed ..."
Abstract
-
Cited by 41 (0 self)
- Add to MetaCart
Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the parallel-outermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed by this strategy could be wasteful in general. A lazy normalization algorithm that completely eliminated these wasteful reductions by reducing only "needed redexes" was later developed by Huet and Levy. However, this algorithm required the input programs to be restricted to the subclass of strongly sequential systems. This is because needed redexes do not exist for all orthogonal programs, and even when they do, they may not be computable. It is therefore quite natural to ask whether it is possible to devise a complete normalization algorithm for the entire class that minimizes (rather than eliminate) the wasteful reductions. In this paper we propose a solution to this problem using the concept of a necessary set of redexes. In such a set, at least one of the redexes must be reduced to normalize a term. We devise an algorithm to compute a necessary set for any term not in normal form and show that a strategy that repeatedly reduces all redexes in such a set is complete for orthogonal programs. We also show that our algorithm is "optimal" among all normalization algorithms that are based on left-hand sides alone. This means that our algorithm is lazy (like Huet-Levy's) on strongly sequential parts of a program and "relaxes laziness minimally" to handle the other parts and thus does not sacrifice generality for the sake of efficiency.
Strongly Sequential and Inductively Sequential Term Rewriting Systems
, 1998
"... 1 Introduction Michael Hanus Salvador Lucas Aart Middeldorp Strongly sequential and inductively sequential term rewriting systems hanus@informatik.rwth-aachen.de slucas@dsic.upv.es ami@score.is.tsukuba.ac.jp first(0,x) [] first(s(x),y::z) y::first(x,z) first x 1 0 s(x) x 2 first x 1 x 2 first 0 x ..."
Abstract
-
Cited by 26 (13 self)
- Add to MetaCart
1 Introduction Michael Hanus Salvador Lucas Aart Middeldorp Strongly sequential and inductively sequential term rewriting systems hanus@informatik.rwth-aachen.de slucas@dsic.upv.es ami@score.is.tsukuba.ac.jp first(0,x) [] first(s(x),y::z) y::first(x,z) first x 1 0 s(x) x 2 first x 1 x 2 first 0 x 2 first s x x 2 [] first s x y z y first x z first inductively sequential outermost-needed strategy needed rewriting needed Definitional trees inductively sequential inductively sequential index trees forward-branching index trees matching dags outermost-needed strategy index reduction Informatik II, RWTH Aachen, D-52056 Aachen, Germany, . Work partially supported by DFG (under grant Ha 2457/1-1) and Acci'on Integrada. DSIC, U.P. de Valencia, Camino de la Vera s/n, Apdo. 22012, E-46071 Valencia, Spain, . Work partially supported by EEC-HCM grant ERBCHRXCT940624, Bancaixa (Bancaja-Europa grant), Acci'on Integrada (HA19970073) and CICYT (under grant TIC 95-0433-C03-03). Institute of Informa...
Lazy rewriting on eager machinery
- ACM Transactions on Programming Languages and Systems
, 2000
"... The article introduces a novel notion of lazy rewriting. By annotating argument positions as lazy, redundant rewrite steps are avoided, and the termination behaviour of a term rewriting system can be improved. Some transformations of rewrite rules enable an implementation using the same primitives a ..."
Abstract
-
Cited by 23 (1 self)
- Add to MetaCart
The article introduces a novel notion of lazy rewriting. By annotating argument positions as lazy, redundant rewrite steps are avoided, and the termination behaviour of a term rewriting system can be improved. Some transformations of rewrite rules enable an implementation using the same primitives as an implementation of eager rewriting. 1
Simulating Forward-Branching Systems with Constructor Systems
- Journal of Symbolic Computation
, 1997
"... Strongly sequential constructor systems admit a very efficient algorithm to compute normal forms. The class of forward-branching systems contains the class of strongly sequential constructor systems, and admits a similar reduction algorithm, but less efficient on the entire class of forward-branchin ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
Strongly sequential constructor systems admit a very efficient algorithm to compute normal forms. The class of forward-branching systems contains the class of strongly sequential constructor systems, and admits a similar reduction algorithm, but less efficient on the entire class of forward-branching systems. In this article, we present a new transformation which transforms any forward-branching system into a strongly sequential constructor one. We prove the correctness and completeness of the transformation algorithm, then that the new system is equivalent to the input system, with respect to the behavior and the semantics. As a programming language, it permits us to have a less restrictive syntax without compromise of semantics and efficiency.
Fine-Grain Partial Evaluation of Intermediate Code from Equational Programs
, 1991
"... Partial evaluation is greatly simplified if the target language is simple. In [SS90] we define an extremely simple language that is used as an intermediate language for equational programming [O'D85]. Although the intermediate language is a general graph manipulation language, we take advantage of t ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Partial evaluation is greatly simplified if the target language is simple. In [SS90] we define an extremely simple language that is used as an intermediate language for equational programming [O'D85]. Although the intermediate language is a general graph manipulation language, we take advantage of the particular properties of programs generated from equational programs. For partial evaluation to be successful, we need both a set of transformations that preserve the semantics of the program and a strategy that tells us when to apply a particular transformation. The strategy includes termination criteria to avoid infinite computations. In this paper we concentrate on a set of transformations that preserve the semantics of the program. We also show a small example of how these transformations can be applied to a program in order to improve its execution speed. The strategy, however, is only sketchy at the present time. The complete strategy is left for a future paper. Furthermore, we do n...
Abstract Decidable Call-by-Need Computations in Term Rewriting
"... The theorem of Huet and Lévy stating that for orthogonal rewrite systems (i) every reducible term contains a needed redex and (ii) repeated contraction of needed redexes results in a normal form if the term under consideration has a normal form, forms the basis of all results on optimal normalizing ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
The theorem of Huet and Lévy stating that for orthogonal rewrite systems (i) every reducible term contains a needed redex and (ii) repeated contraction of needed redexes results in a normal form if the term under consideration has a normal form, forms the basis of all results on optimal normalizing strategies for orthogonal rewrite systems. However, needed redexes are not computable in general. In the paper we show how the use of approximations and elementary tree automata techniques allows one to obtain decidable conditions in a simple and elegant way. Surprisingly, by avoiding complicated concepts like index and sequentiality we are able to cover much larger classes of rewrite systems. We also study modularity aspects of the classes in our hierarchy. It turns out that none of the classes is preserved under signature extension. By imposing various conditions we recover the preservation under signature extension. By imposing some more conditions we are able to strengthen the signature extension results to modularity for disjoint and constructor-sharing combinations.
Call Unfolding Strategies for Equational Logic Programs
- In Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation
, 1992
"... For a programming system based on term rewrite rules such as equational logic programming, a serious efficiency problem of the generated code is the creation of terms that only serve to drive further pattern matching. In this paper, we define a terminating call unfolding strategy based on finegrain ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
For a programming system based on term rewrite rules such as equational logic programming, a serious efficiency problem of the generated code is the creation of terms that only serve to drive further pattern matching. In this paper, we define a terminating call unfolding strategy based on finegrain partial evaluation that removes much of this unnecessary term allocation for programs in intermediate EM code generated from equational logic programs. Our approach is based on calculation, for each instruction, of two sets that reflect the usage of registers in finite execution paths of the program. These sets are calculated using fixed-point iteration over the graph representation of the intermediate code. 1 Introduction Finding call unfolding strategies for partial evaluation is an annoying problem. On the one hand, the basic problem--- knowing how much unfolding is necessary to expose a particular computation if it occurs---is undecidable. Nearly any recursive definition can lead to u...
Termination of Lazy Rewriting Revisited
, 2007
"... Lazy rewriting is a proper restriction of term rewriting that dynamically restricts the reduction of certain arguments of functions in order to obtain termination. In contrast to context-sensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Lazy rewriting is a proper restriction of term rewriting that dynamically restricts the reduction of certain arguments of functions in order to obtain termination. In contrast to context-sensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the observation that the only existing (non-trivial) approach to prove termination of such lazy rewrite systems is flawed, we develop a modified approach for transforming lazy rewrite systems into contextsensitive ones that is sound and complete with respect to termination. First experimental results with this transformation based technique are encouraging.
A Framework for the Analysis of Syntactic Replacement Restrictions
, 1999
"... We formalize the notion of syntactic replacement restriction, which is useful for modeling reduction-based systems which compute with terms and impose restrictions on the possible computations (typically by means of strategies). We emphasize the syntactic flavour of our approach: the restrictions a ..."
Abstract
- Add to MetaCart
We formalize the notion of syntactic replacement restriction, which is useful for modeling reduction-based systems which compute with terms and impose restrictions on the possible computations (typically by means of strategies). We emphasize the syntactic flavour of our approach: the restrictions are associated to components of terms and (in principle) they do not depend on either a particular Term Rewriting System or a computational mechanism (like rewriting, narrowing, residuation, etc.). The replacement restrictions can be used to improve the computational behavior of the unrestricted mechanism. We give a general descriptive and algebraic framework to deal with replacement restrictions. For the descriptive part, we introduce and motivate properties which characterize classes of replacement restrictions. For the algebraic side, the set of replacement restrictions is presented as a complete Boolean algebra. The algebraic operations (and others which we also define) can be used to com...

