Proving Termination of Context-Sensitive Rewriting with MU-TERM (original) (raw)

mu-term: A Tool for Proving Termination of Context-Sensitive Rewriting

Rewriting Techniques and Applications, 2004

Restrictions of rewriting can eventually achieve termination by pruning all infinite rewrite sequences issued from every term. Contextsensitive rewriting (CSR) is an example of such a restriction. In CSR, the replacements in some arguments of the function symbols are permanently forbidden. This paper describes mu-term, a tool which can be used to automatically prove termination of CSR. The tool implements the generation of the appropriate orderings for proving termination of CSR by means of polynomial interpretations over the rational numbers. In fact, mu-term is the first termination tool which generates term orderings based on such polynomial interpretations. These orderings can also be used, in a number of different ways, for proving termination of ordinary rewriting. Proofs of termination of CSR are also possible via existing transformations to TRSs (without any replacement restriction) which are also implemented in mu-term.

Using Context-Sensitive Rewriting for Proving Innermost Termination of Rewriting

Electronic Notes in Theoretical Computer Science, 2009

Computational systems based on reducing expressions usually have a predefined reduction strategy to break down the nondeterminism which is inherent to reduction relations. The innermost strategy corresponds to call by value or eager computation, that is, the computational mechanism of several programming languages like Maude, OBJ, etc. where the arguments of a function call are always evaluated before calling the function. This strategy usually fails to terminate when nonterminating computations are possible in the programs and many eager programming languages also admit the explicit specification of a particular class of strategy annotations to (try to) avoid them. Context-Sensitive Rewriting provides an abstract model to describe and analyze the operational behavior of such programs. This paper aims at contributing to the development of appropriate techniques and tools for the verification of program termination in the aforementioned programming languages, so we focus on termination of innermost (context-sensitive) rewriting. We adapt the notion of usable argument introduced by Fernández to prove innermost termination by proving termination of context-sensitive rewriting. Thanks to our recent developments for proving termination of (innermost) context-sensitive rewriting using dependency pairs, now we can also relax monotonicity requirements for proving innermost termination of (context-sensitive) rewriting. We have implemented these new improvements in the termination tool mu-term and evaluated the results with some benchmarks.

Termination of Context-Sensitive Rewriting

Proceedings of the 8th International Conference on Rewriting Techniques and Applications, 1997

Context-sensitive term rewriting is a kind of term rewriting in which reduction is not allowed inside some xed arguments of some function symbols. We introduce two new techniques for proving termination of context-sensitive rewriting. The rst one is a modi cation of the technique of interpretation in a well-founded order, the second one is implied by a transformation in which context-sensitive termination of the original system can be concluded from termination of the transformed one. In combination with purely automatic techniques for proving ordinary termination, the latter technique is purely automatic too.

Polynomials for Proving Termination of Context-Sensitive Rewriting

Foundations of Software Science and Computation Structures, 2004

We show how to generate well-founded and stable term orderings based on polynomial interpretations over the real numbers. Monotonicity (another usual requirement in termination proofs) can, then, be gradually introduced in the interpretations to deal with different applications. For instance, the dependency pairs method for proving termination of rewriting, and some restrictions of the rewrite relation which are not monotonic in all arguments of the function symbols, can benefit from this approach. The latter is the case for context-sensitive rewriting (CSR), a simple restriction of rewriting which has been proved useful for describing the semantics of several programming languages (e.g., Maude) and analyzing the properties of the corresponding programs. We show how to automatically generate polynomial interpretations over the real numbers for proving termination of CSR.

Proving Termination Properties with mu-term

Lecture Notes in Computer Science, 2011

mu-term is a tool which can be used to verify a number of termination properties of (variants of) Term Rewriting Systems (TRSs): termination of rewriting, termination of innermost rewriting, termination of order-sorted rewriting, termination of context-sensitive rewriting, termination of innermost context-sensitive rewriting and termination of rewriting modulo specific axioms. Such termination properties are essential to prove termination of programs in sophisticated rewriting-based programming languages. Specific methods have been developed and implemented in mu-term in order to efficiently deal with most of them. In this paper, we report on these new features of the tool.

Methods for Proving Termination of Rewriting-based Programming Languages by Transformation

Electronic Notes in Theoretical Computer Science, 2009

Despite the remarkable development of the theory of termination of rewriting, its application to high-level (rewriting-based) programming languages is far from being optimal. This is due to the need for features such as conditional equations and rules, types and subtypes, (possibly programmable) strategies for controlling the execution, matching modulo axioms, and so on, that are used in many programs and tend to place such programs outside the scope of current termination tools. The operational meaning of such features is often formalized in a proof theoretic manner by means of an inference system rather than just by a rewriting relation. The corresponding termination notions can also differ from the standard ones. During the last years we have introduced and implemented different notions and transformation techniques which have been proved useful for proving and disproving termination of such programs by using existing tools for proving termination of (variants of) rewriting. In this paper we provide an overview of our main contributions.

Simple termination of context-sensitive rewriting

Proceedings of the 2002 ACM SIGPLAN workshop on Rule-based programming - RULE '02, 2002

Simple termination is the (often indirect) basis of most existing automatic techniques for proving termination of rule-based programs (e.g., Knuth-Bendix, polynomial, or recursive path orderings, but also DP-simple termination, etc.). An interesting framework for such programs is context-sensitive rewriting (CSR) that provides a bridge between the abstract world of general rewriting and the (more) applied setting of declarative specification and programming languages (e.g., OBJ*, CafeOBJ, ELAN, and Maude). In these languages, certain replacement restrictions can be specified in programs by the so-called strategy annotations. They may significantly improve the computational properties of programs, especially regarding their termination behaviour. Context-sensitive rewriting techniques (in particular, the methods for proving termination of CSR) have been proved useful for analyzing the properties of these programs. This entails the need to provide implementable methods for proving termination of CSR. Simplification orderings (corresponding to the notion of simple termination) which are wellknown in term rewriting (and have nice properties) are, then, natural candidates for such an attempt. In this paper we introduce and investigate a corresponding notion of simple termination of CSR. We prove that our notion actually provides a unifying framework for proving termination of CSR by using standard simplification orderings via the existing (transformational) methods, and also covers CSRPO, a very recent proposal that extends the recursive path ordering (RPO) (a well-known simplification ordering) to contextsensitive terms. We also introduce polynomial orderings for dealing with (simple) termination of CSR. Finally, we also give criteria for the modularity of simple termination, for the case of disjoint unions as well as for constructor-sharing rewrite systems.

Automated termination proofs for logic programs by term rewriting

ACM Transactions on …, 2009

There are two kinds of approaches for termination analysis of logic programs: "transformational" and "direct" ones. Direct approaches prove termination directly on the basis of the logic program. Transformational approaches transform a logic program into a term rewrite system (TRS) and then analyze termination of the resulting TRS instead. Thus, transformational approaches make all methods previously developed for TRSs available for logic programs as well. However, the applicability of most existing transformations is quite restricted, as they can only be used for certain subclasses of logic programs. (Most of them are restricted to well-moded programs.) In this paper we improve these transformations such that they become applicable for any definite logic program. To simulate the behavior of logic programs by TRSs, we slightly modify the notion of rewriting by permitting infinite terms. We show that our transformation results in TRSs which are indeed suitable for automated termination analysis. In contrast to most other methods for termination of logic programs, our technique is also sound for logic programming without occur check, which is typically used in practice. We implemented our approach in the termination prover AProVE and successfully evaluated it on a large collection of examples.

Modular Termination of Context-Sensitive Rewriting

Context-sensitive rewriting (CSR) has recently emerged as an interesting and flexible paradigm that provides a bridge between the abstract world of general rewriting and the (more) applied setting of declarative specification and programming languages such as OBJ*, CafeOBJ, ELAN, and Maude. A natural approach to study properties of programs written in these languages is to model them as contextsensitive rewriting systems. Here we are especially interested in proving termination of such systems, and thereby providing methods to establish termination of e.g. OBJ* programs. For proving termination of context-sensitive rewriting, there exist a few transformation methods, that reduce the problem to termination of a transformed ordinary term rewriting system (TRS). These transformations, however, have some serious drawbacks. In particular, most of them do not seem to support a modular analysis of the termination problem. In this paper we will show that a substantial part of the well-known...