| Introduction to context-sensitive rewriting | |
| Termination of context-sensitive rewriting | |
| The collection of examples | |
| Contributions | |
| References | |
| Contact | |
| Introduction to context-sensitive rewriting |
Context-sensitive rewriting (CSR [Luc98,Luc02a]) is a simple restriction of rewriting which is formalized by imposing fixed restrictions on replacements. In CSR, a replacement map, i.e., a mapping µ (from symbols into subsets of their argument positions) is used to discriminate the argument positions on which replacements are allowed. This is inductively extended to arbitrary positions of terms built from those symbols. In this way, a restriction of rewriting is obtained.
if(True,x,y) -> x if(False,x,y) -> ydefining the conditional function if. It is natural to avoid rewritings on the second and third argument of if. This is easily achieved with CSR by defining µ(if)={1}.
| Termination of context-sensitive rewriting |
Restrictions of rewriting can eventually achieve termination by pruning all infinite rewrite sequences issued from every term.
first(0,X) -> nil first(s(X),cons(Y,Z)) -> cons(Y,first(X,Z)) from(X) -> cons(X,from(s(X)))In order to avoid infinite rewritings with expressions involving calls to from, it is natural to forbid rewritings on the second argument of the list constructor cons. It is possible to prove that such context-sensitive computations are terminating (see Example number 11 below).
Fortunately, a number of methods have been developed for proving the µ-termination of a TRS R (i.e., termination of CSR for R and the replacement map µ). Basically, we have:
There is a tool, MU-TERM, which implements many of these techniques for proving termination of CSR.
| The collection of examples |
The following table collects examples of non-terminating TRSs which become terminating after imposing some replacement restrictions by using a replacement map µ, i.e., they all are (supposed to be) µ-terminating. The only exception is [GM04, Example 49] (number 40 in the table below) which is terminating without introducing any replacement restriction. The collection is quite complete. The examples have been all processed with MU-TERM.
The column origin splits up into three columns which help to identify the
origin of each example. A green cell in the column label means that
the replacement map µ in the example is canonical, i.e., the
non-variable parts of every left-hand side of the rules of the TRS are
µ-replacing. The icon
indicates that the system admits a safe modular decomposition in
the sense that a proof of µ-termination for each component of the
decomposition implies the µ-termination of the whole system (see [GL02a]). The decomposition is automatically computed by
MU-TERM when
the CS-TRS is loaded.
The use of canonical replacement maps permits to
use CSR as a suitable tool for (infinitary) normalization,
computation of values, head-normal forms, etc;
we refer to [Luc98] and
[Luc02a] for further details in this respect.
Regarding proofs of termination of (canonical) CSR, some interesting
properties of the existing methods have been investigated in [Luc02b].
The column source permits to obtain the description of the TRS and the replacement map. We provide two different descriptions:
The column transformations contains documented proofs of termination which have been achieved by using some of the existing transformations for proving termination of CSR, see [FR99], [GM04], [Luc96a] and [Zan97]. As for the column direct methods, each cell is coloured and labelled accordingly.
The column others collects documented proofs of termination which have been achieved by using a different technique. For instance: an ad-hoc µ-reduction ordering [Zan97], a modular proof of µ-termination [GL02a] [GL02b], the use of some semantic path ordering for CSR [Bor03], or the use of polynomial fractions [Luc04].
The column report points to an HTML file containing the complete record of each example: the source of the example and information regarding the proofs of µ-termination.
The collection of all examples (in TPDB format) is here.
| Contributions |
If you want to
Apart from the authors of papers enumerated below, the following people have contributed to solve the examples in this collection.
| References |
[AEL02]
Correct and complete (positive) strategy annotations for
OBJ
M. Alpuente,
S. Escobar,
S. Lucas
© Elsevier
Proc. of 4th International Workshop on Rewriting Logic and its Applications,
WRLA'02,
Electronic
Notes in Theoretical Computer Science, volume 71, to appear 2004.
Available:
Abstract
PDF
PostScript
[AEL03]
On-Demand Evaluation by Program Transformation
M. Alpuente,
S. Escobar, and
S. Lucas
Proc. of 4th International Workshop on Rule-based Programming, RULE'03,
Electronic Notes in Theoretical Computer Science, volume 86.2, September
2003.
Available:
Abstract
PDF
BibTeX
entry.
[BLR02]
Recursive Path Orderings can be Context-Sensitive
C. Borralleras,
S. Lucas, and
A. Rubio
© Springer-Verlag
Proc. of 18th International Conference on Automated Deduction, CADE'02,
LNAI 2392:314-331, Springer-Verlag, Berlin, 2002.
Available:
Abstract
PDF
PostScript
BibTeX
entry.
[Bor03]
Ordering-based methods for proving termination
automatically
C. Borralleras,
PhD Thesis, Departament de Llenguagtes i Sistemes Informàtics de
la Universitat Politècnica de Catalunya, May 2003.
[FR99]
Context-Sensitive AC-Rewriting
M.C.F. Ferreira and A.L. Ribeiro
© Springer-Verlag
Proc. of 10th International Conference on Rewriting Techniques and
Applications, RTA'99,
LNCS 1631:173-181, Springer-Verlag, Berlin, 1999.
[GL02a]
Modular Termination of Context-Sensitive Rewriting
B. Gramlich and
S. Lucas
© ACM Press
Proc. of 4th International Conference on Principles
and Practice of Declarative Programming, PPDP'02,
pages 50-61, ACM Press 2002.
Available:
Abstract
PDF
PostScript
Slides
BibTeX
entry.
[GL02b]
Simple Termination of Context-Sensitive Rewriting
B. Gramlich and
S. Lucas
© ACM Press
Proc. of 3rd ACM Sigplan Workshop on Rule-based Programming, RULE'02,
pages 29-41, ACM Press, 2002.
Available:
Abstract
PDF
PostScript
Slides
BibTeX
entry.
[GM99]
Transforming Context-Sensitive Rewrite Systems
J. Giesl and
A. Middeldorp
© Springer-Verlag
Proc. of 10th International Conference on Rewriting Techniques and
Applications, RTA'99,
LNCS 1631:271-287, Springer-Verlag, Berlin, 1999.
Available:
Abstract
PostScript
BibTeX
entry
[GM01]
Transforming Context-Sensitive Rewrite Systems
J. Giesl and
A. Middeldorp
Proc. of International Workshop on Rewriting in Proof and Computation,
RPC'01,
RIEC, Tohoku University, 2001.
[GM02]
Innermost Termination of Context-Sensitive Rewriting
J. Giesl and
A. Middeldorp
Technical Report AIB 2002-04, RWTH Aachen, 2002.
[GM03]
Innermost Termination of Context-Sensitive Rewriting
J. Giesl and
A. Middeldorp
© Springer-Verlag
Proc. of 6th International Conference on Developments of Language Theory,
DLT'02,
LNCS 2450:231-244, 2003.
[GM04]
Transformation Techniques for Context-Sensitive Rewrite Systems
J. Giesl and
A. Middeldorp
Journal of Functional Programming, to appear, 2004.
Available:
Abstract
PDF
(preprint)
BibTeX
entry
[Luc96a]
Context-sensitive Computations in Confluent Programs
S.
Lucas
© Springer-Verlag
8th International Symposium on Programming Languages, Implementations,
Logics and Programs, PLILP'96,
LNCS 1140:408-422, Springer-Verlag, Berlin, 1996.
Available:
Abstract
PostScript
BibTeX
entry.
[Luc96b]
Termination of Context-Sensitive Rewriting by
Rewriting
S. Lucas
© Springer-Verlag
23rd International Colloquium on Automata, Languages and Programming,
ICALP'96,
LNCS 1099:122-133, Springer-Verlag, Berlin, 1996.
Available:
Abstract
PostScript
BibTeX
entry.
[Luc97]
Transformations for Efficient Evaluations in Functional
Programming
S.
Lucas
© Springer-Verlag
9th International Symposium on Programming Languages,
Implementations, Logics and Programs, PLILP'97,
LNCS 1292:127-141, Springer-Verlag, Berlin, 1997.
Available:
Abstract
PostScript
BibTeX
entry.
[Luc98]
Context-sensitive computations in functional and functional logic
programs
S.
Lucas
Journal of Functional and Logic Programming, 1998(1):1-61, January
1998.
Available:
Abstract
Paper
BibTeX
entry
[Luc01a]
Termination of on-demand rewriting and termination of
OBJ programs
S. Lucas
© ACM Press
Proc. of 3rd International Conference on Principles
and Practice of Declarative Programming, PPDP'01,
pages 82-93, ACM Press, 2001.
Available:
Abstract
PostScript
BibTeX
entry.
[Luc01b]
Termination of Rewriting With Strategy Annotations
S. Lucas
© Springer-Verlag
Proc. of 8th International Conference on Logic for Programming,
Artificial Intelligence and Reasoning, LPAR'01
LNAI 2250:666-680, Springer-Verlag, Berlin, 2001.
Available:
Abstract
PostScript
BibTeX
entry.
Extended and revised version in [Luc03a]
[Luc02a]
Context-Sensitive Rewriting Strategies
S. Lucas
© Academic Press
Information and Computation, 178(1):294-343, 2002.
Available:
Abstract
PDF (preprint)
PostScript (preprint)
BibTeX
entry
[Luc02b]
Termination of (Canonical) Context-Sensitive Rewriting
S. Lucas
© Springer-Verlag
Proc. of 13th International Conference on Rewriting Techniques and
Applications, RTA'02,
LNCS 2378:296-310, Springer-Verlag, Berlin, 2002.
Available:
Abstract
PostScript
BibTeX
entry
Slides.
[Luc03a]
MU-TERM 3.0 - User's manual
S. Lucas
Technical Report DSIC II/21/03, 18 pages.
Departamento de Sistemas Informáticos y Computación, UPV,
September 2003.
Available:
Abstract
PDF
PostScript
BibTeX
entry.
[Luc03b]
Termination of programs with strategy annotations
S. Lucas
Technical Report DSIC II/20/03, 47 pages.
Departamento de Sistemas Informáticos y Computación, UPV,
September 2003.
Available:
Abstract
PDF
PostScript
BibTeX
entry.
[Luc04]
Polynomials for Proving Termination of Context-Sensitive
Rewriting
S. Lucas
© Springer-Verlag
Proc. of 7th International Conference on
Foundations of Software Science and Computation Structures,
FOSSACS'04,
LNCS 2987:318-332, 2004.
Available:
Abstract
PDF
PostScript
BibTeX entry
[Luc04b]
MU-TERM: A Tool for Proving Termination of Context-Sensitive Rewriting
S. Lucas
© Springer-Verlag
Proc. of 15th International Conference on Rewriting Techniques and
Applications, RTA'04,
LNCS to appear, 2004.
Available:
Abstract
PDF
PostScript
[Zan97]
Termination of Context-Sensitive Rewriting
H. Zantema
© Springer-Verlag
Proc. of 8th International Conference on Rewriting Techniques and
Applications, RTA'97,
LNCS 1232:172-186, Springer-Verlag, Berlin, 1997.
| Contact |
Please, report any bug, comment, or suggestion to: slucas@dsic.upv.es