Results 1  10
of
22
ContextSensitive Rewriting Strategies
, 1997
"... Contextsensitive 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 43 (30 self)
 Add to MetaCart
Contextsensitive 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 contextsensitive rewriting strategies, i.e., particular, fixed sequences of contextsensitive rewriting steps. We study how to define them in order to obtain efficient computations and to ensure that contextsensitive computations terminate whenever possible. We give conditions enabling the use of these strategies for rootnormalization, 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 paralleloutermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions perf ..."
Abstract

Cited by 42 (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 paralleloutermost 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 lefthand sides alone. This means that our algorithm is lazy (like HuetLevy'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.rwthaachen.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 28 (12 self)
 Add to MetaCart
1 Introduction Michael Hanus Salvador Lucas Aart Middeldorp Strongly sequential and inductively sequential term rewriting systems hanus@informatik.rwthaachen.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 outermostneeded strategy needed rewriting needed Definitional trees inductively sequential inductively sequential index trees forwardbranching index trees matching dags outermostneeded strategy index reduction Informatik II, RWTH Aachen, D52056 Aachen, Germany, . Work partially supported by DFG (under grant Ha 2457/11) and Acci'on Integrada. DSIC, U.P. de Valencia, Camino de la Vera s/n, Apdo. 22012, E46071 Valencia, Spain, . Work partially supported by EECHCM grant ERBCHRXCT940624, Bancaixa (BancajaEuropa grant), Acci'on Integrada (HA19970073) and CICYT (under grant TIC 950433C0303). 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 ForwardBranching 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 forwardbranching systems contains the class of strongly sequential constructor systems, and admits a similar reduction algorithm, but less efficient on the entire class of forwardbranchin ..."
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 forwardbranching systems contains the class of strongly sequential constructor systems, and admits a similar reduction algorithm, but less efficient on the entire class of forwardbranching systems. In this article, we present a new transformation which transforms any forwardbranching 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.
Decidable CallbyNeed Computations in Term Rewriting
, 2004
"... 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 (2 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 constructorsharing combinations.
FineGrain 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 ..."
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...
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 contextsensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the ..."
Abstract

Cited by 2 (2 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 contextsensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the observation that the only existing (nontrivial) 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.
Call Unfolding Strategies for Equational Logic Programs
 In Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and SemanticsBased 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 fixedpoint 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 occursis undecidable. Nearly any recursive definition can lead to u...
www.elsevier.com/locate/entcs Termination of Lazy Rewriting Revisited
"... 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 contextsensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the ..."
Abstract
 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 contextsensitive rewriting, reductions at such argument positions are not completely forbidden but delayed. Based on the observation that the only existing (nontrivial) 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. Keywords: term rewriting, lazy rewriting, termination, contextsensitive system