Results 1 - 10
of
14
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 ...
Transformation Techniques for Context-Sensitive Rewrite Systems
, 2004
"... Context-sensitive rewriting is a computational restriction of term rewriting used to model non-strict (lazy) evaluation in functional programming. The goal of this paper is the study and development of techniques to analyze the termination behavior of context-sensitive rewrite systems. For that purp ..."
Abstract
-
Cited by 34 (4 self)
- Add to MetaCart
Context-sensitive rewriting is a computational restriction of term rewriting used to model non-strict (lazy) evaluation in functional programming. The goal of this paper is the study and development of techniques to analyze the termination behavior of context-sensitive rewrite systems. For that purpose, several methods have been proposed in the literature which transform context-sensitive rewrite systems into ordinary rewrite systems such that termination of the transformed ordinary system implies termination of the original context-sensitive system. In this way, the huge variety of existing techniques for termination analysis of ordinary rewriting can be used for context-sensitive rewriting, too. We analyze the existing transformation techniques for proving termination of context-sensitive rewriting and we suggest two new transformations. Our first method is simple, sound, and more powerful than the previously proposed transformations. However, it is not complete, i.e., there are terminating context-sensitive rewrite systems that are transformed into non-terminating term rewrite systems. The second method that we present in this paper is both sound and complete. All these observations also hold for rewriting modulo associativity and commutativity.
Termination of on-demand rewriting and termination of OBJ programs
- In Proc. of 3rd International Conference on Principles and Practice of Declarative Programming, PPDP'01
, 2001
"... Declarative languages such as OBJ*, CafeOBJ, and Maude use syntactic annotations to introduce replacement restrictions aimed at improving termination or efficiency of computations. Unfortunately, there is a lack of formal techniques for proving such benefits. We show that context-sensitive rewriting ..."
Abstract
-
Cited by 30 (20 self)
- Add to MetaCart
Declarative languages such as OBJ*, CafeOBJ, and Maude use syntactic annotations to introduce replacement restrictions aimed at improving termination or efficiency of computations. Unfortunately, there is a lack of formal techniques for proving such benefits. We show that context-sensitive rewriting and on-demand rewriting provide a suitable framework to address this problem. We provide methods to analyze termination of on-demand rewriting and apply them to analyze termination of OBJ*, CafeOBJ, and Maude programs. Keywords Program analysis, replacement restrictions, term rewriting, termination 1.
A Survey of Rewriting Strategies in Program Transformation Systems
- In Workshop on Reduction Strategies in Rewriting and Programming (WRS’01), volume 57 of Electronic Notes in Theoretical Computer Science
, 2001
"... Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Transfo ..."
Abstract
-
Cited by 20 (1 self)
- Add to MetaCart
Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Transformation rules define basic modifications. A transformation strategy is an algorithm for choosing a path in the rewrite relation induced by a set of rules. This paper surveys the support for the definition of strategies in program transformation systems. After a discussion of kinds of program transformation and choices in program representation, the basic elements of a strategy system are discussed and the choices in the design of a strategy language are considered. Several styles of strategy systems as provided in existing languages are then analyzed.
Lazy Rewriting and Context-Sensitive Rewriting
- Electronic Notes in Theoretical Computer Science, volume 64. Elsevier Sciences
, 2002
"... Lazy rewriting (LR) is intended to improve the termination behavior of TRSs. This is attempted by restricting reductions for selected arguments of functions. Similarly, context-sensitive rewriting (CSR) forbids any reduction on those arguments. We show that, under certain conditions, LR and CSR coin ..."
Abstract
-
Cited by 12 (9 self)
- Add to MetaCart
Lazy rewriting (LR) is intended to improve the termination behavior of TRSs. This is attempted by restricting reductions for selected arguments of functions. Similarly, context-sensitive rewriting (CSR) forbids any reduction on those arguments. We show that, under certain conditions, LR and CSR coincide. On the basis of this result, we also describe a transformation which permits proving termination of LR as termination of CSR for the transformed system. Since there is a number of different techniques for proving termination of CSR, this provides a (first) formal framework for proving termination of lazy rewriting.
Demandness in Rewriting and Narrowing
- Proc. of the 11th Int’l Workshop on Functional and (Constraint) Logic Programming WFLP’02, volume 76 of Electronic Notes in Theoretical Computer Science. Elsevier Sciences Publisher
, 2002
"... The traditional investigation of rewriting and narrowing strategies aims at establishing fundamental properties, such as soundness, completeness and/or optimality, of a strategy. In this work, we analyze and compare rewriting and narrowing strategies from the point of view of the information tak ..."
Abstract
-
Cited by 11 (4 self)
- Add to MetaCart
The traditional investigation of rewriting and narrowing strategies aims at establishing fundamental properties, such as soundness, completeness and/or optimality, of a strategy. In this work, we analyze and compare rewriting and narrowing strategies from the point of view of the information taken into account by a strategy to compute a step. The notion of demandness provides a suitable framework for presenting and comparing well-known strategies. We find the existence of an almost linear sequence of strategies that take into account more and more information. We show on examples that, as we progress on this sequence, a strategy becomes more focused and avoids some useless steps computed by strategies preceding it in this sequence. Our work, which is still in progress, clarifies the behavior of similar or related strategies and it promises to simplify the transfer of some results from one strategy to another. It also suggests that the notion of demandness is both atomic and fundamental to the study of strategies.
Compact Normalisation Trace via Lazy Rewriting
, 2001
"... Innermost strategies are usually used in compiling term rewriting systems (TRSs) since they allow to eciently build result terms in a bottom-up fashion. However, innermost strategies do not always give the shortest normalising derivation. In many cases, using an appropriate laziness annotation on th ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Innermost strategies are usually used in compiling term rewriting systems (TRSs) since they allow to eciently build result terms in a bottom-up fashion. However, innermost strategies do not always give the shortest normalising derivation. In many cases, using an appropriate laziness annotation on the arguments of function symbols, we evaluate lazy arguments only if it is necessary and hence, get a shorter derivation to normal forms while avoiding non-terminating reductions. We provide in this work a transformation of annotated TRSs, that allows to compute normal forms using an innermost strategy and to extract lazy derivations in the original TRS from normalising derivations in the transformed TRS. We apply our result to improve the eciency of equational reasoning in the Coq proof assistant using ELAN as an external rewriting engine.
How to Give Local Strategies to Function Symbols for Equality of Two Implementations of the E-strategy with and without Evaluated Flags
- Proceedings of Asian Symposium on Computer Mathematics
, 1998
"... . The evaluation strategy (abbr. the E-strategy) initiated by OBJ2 is one of compromises between outermost and innermost reduction strategies. Although rewriting with the E-strategy is intuitively easy-to-understand, the straightforward implementation cannot lead to efficient rewriting. Then, the im ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
. The evaluation strategy (abbr. the E-strategy) initiated by OBJ2 is one of compromises between outermost and innermost reduction strategies. Although rewriting with the E-strategy is intuitively easy-to-understand, the straightforward implementation cannot lead to efficient rewriting. Then, the implementations of OBJ3 and CafeOBJ use evaluated flags to implement reasonably rewriting with the E-strategy. However, rewriting with evaluated flags is not always equivalent to that without evaluated flags, which depends on local strategies given to function symbols. So far we did not have any useful guidelines on how to give local strategies to function symbols. In this paper, we present a sufficient but reasonable condition (i.e. how to give local strategies to function symbols) that two implementations of the E-strategy with and without evaluated flags are equivalent, and give its proof. 1. Introduction A reduction strategy is a function that takes a set of rewrite rules (i.e. a term rew...
Context-Sensitive Rewriting, Lazy Rewriting, and On-demand Rewriting
- Christian-Albrechts-Universitat zu Kiel
, 2001
"... On-demand rewriting provides an operational model for term rewriting controlled by annotations consisting of (sets of) positive and negative integers referring the arguments of function symbols. Contextsensitive rewriting and lazy rewriting provide (different) operational models for positive ann ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
On-demand rewriting provides an operational model for term rewriting controlled by annotations consisting of (sets of) positive and negative integers referring the arguments of function symbols. Contextsensitive rewriting and lazy rewriting provide (different) operational models for positive annotations. In this paper we prove that, under certain conditions, the three operational models coincide. In this case, it makes sense using context-sensitive rewriting as it is the simplest one. This fact also permits proving termination of lazy rewriting by proving termination of context-sensitive rewriting for a transformed rewrite system.
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.

