Orienting rewrite rules with the Knuth-Bendix order

We consider two decision problems related to the Knuth-Bendix order (KBO). The first problem is orientability: given a system of rewrite rules R, does there exist an instance of KBO which orients every ground instance of every rewrite rule in R. The second problem is whether a given instance of KBO orients every ground instance of a given rewrite rule. This problem can also be reformulated as the problem of solving a single ordering constraint for the KBO. We prove that both problems can be solved in the time polynomial in the size of the input. The polynomial-time algorithm for orientability builds upon an algorithm for solving systems of homogeneous linear inequalities over integers. We show that the orientability problem is P-complete. The polynomial-time algorithm for solving a single ordering constraint does not need to solve systems of linear inequalities and can be run in time O(n2). Also we show that if a system is orientable using a real-valued instance of KBO, then it is also orientable using an integer-valued instance of KBO. Therefore, all our results hold both for the integer-valued and the real-valued KBO.

[1]  Tobias Nipkow,et al.  Term Rewriting and All That by Franz Baader , 1998 .

[2]  Ursula Martin,et al.  How to Choose Weights in the Knuth Bendix Ordering , 1987, RTA.

[3]  Andrei Voronkov,et al.  A decision procedure for the existential theory of term algebras with the Knuth-Bendix ordering , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[4]  Michaël Rusinowitch,et al.  RPO Constraint Solving Is in NP , 1998, CSL.

[5]  Paliath Narendran,et al.  On Recursive Path Ordering , 1985, Theor. Comput. Sci..

[6]  Jeremy Dick,et al.  Automating the Knuth Bendix ordering , 1990, Acta Informatica.

[7]  Ralf Treinen,et al.  Ordering Constraints on Trees , 1994, CAAP.

[8]  H. Brown,et al.  Computational Problems in Abstract Algebra , 1971 .

[9]  Andrei Voronkov,et al.  Knuth-Bendix Constraint Solving Is NP-Complete , 2001, ICALP.

[10]  Pierre Lescanne,et al.  Term Rewriting Systems and Algebra , 1984, CADE.

[11]  Jean-Pierre Jouannaud,et al.  Satisfiability of Systems of Ordinal Notations with the Subterm Property is Decidable , 1991, ICALP.

[12]  Alan Robinson,et al.  Handbook of automated reasoning , 2001 .

[13]  Alexander Schrijver,et al.  Theory of linear and integer programming , 1986, Wiley-Interscience series in discrete mathematics and optimization.

[14]  Ursula Martin,et al.  Invariants, Patterns and Weights for Ordering Terms , 2000, J. Symb. Comput..

[15]  H. Comon SOLVING SYMBOLIC ORDERING CONSTRAINTS , 1990 .

[16]  David Detlefs,et al.  A Procedure for Automatically Proving the Termination of a Set of Rewrite Rules , 1985, RTA.

[17]  Robert Nieuwenhuis,et al.  Simple LPO Constraint Solving Methods , 1993, Inf. Process. Lett..

[18]  David K. Smith Theory of Linear and Integer Programming , 1987 .

[19]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[20]  D. Knuth,et al.  Simple Word Problems in Universal Algebras , 1983 .