AbstractImplementation of programming language interpreters, proving theorems of the form A = B, implementation of abstract data types, and program optimization are all problems that can be reduced to the problem of finding a normal form for an expression with respect to a finite set of equations. In 1980, Chew proposed an elegant congruence closure based simplifier (CCNS) for computing with regular systems, which stores the history of its computations in a compact data structure. In 1990, Verma and Ramakrishnan showed that it can also be used for noetherian systems with no overlaps.
In this paper we develop a general theory of using CCNS for computing normal forms and present several applications. Our results are more powerful and widely applicable than earlier work. We present an independent set of postulates and prove that CCNS can be used for any system that satisfies them. (This proof is based on the notion of strong closure.) We then show that CCNS can be used for consistent convergent systems and for various kinds of priority rewrite systems. This is the first time that the applicability of CCNS has been shown for priority systems. Finally, we present a new and simpler translation scheme for converting convergent systems into effectively nonoverlapping convergent priority systems. Such a translation scheme had been proposed earlier, but we show that it is incorrect.
Because CCNS requires some strong properties of the given system, our demonstration of its wide applicability is both difficult and surprising. The tension between demands imposed by CCNS and our efforts to satisfy them gives our work much general significance. Our results are partly achieved through the idea of effectively simulating ``bad'' systems by almost-equivalent ``good'' ones, partly through our theory that substantially weakens the demands, and partly through the design of a powerful and unifying reduction proof method. Copyright 1995 by ACM, Inc.
The abstract is also available as a LaTeX file, a DVI file, or a PostScript file.
Preliminary versionA preliminary version of these results was presented in: Rakesh M. Verma. A theory of using history for equational systems with applications (extended abstract). In 32nd Annual Symposium on Foundations of Computer Science, pages 348-357, San Juan, Puerto Rico, 1-4 October 1991. IEEE.
Categories and Subject Descriptors: F.4.1 [Mathematical Logic and Formal Languages]: Mathematical Logic -- computational logic, mechanical theorem proving, proof theory; I.2.3 [Artificial Intelligence]: Deduction and Theorem Proving -- deduction
General Terms: Algorithms, Theory
Additional Key Words and Phrases: Congruence-closure algorithm, equational logic, rewrite systems, rewrite system transformation, proof theory, term rewriting
Selected references
- Paul Chew. An improved algorithm for computing with equations. In 21st Annual Symposium on Foundations of Computer Science, pages 108-117, Syracuse, New York, 13-15 October 1980. IEEE.
- Peter J. Downey, Ravi Sethi, and Robert Endre Tarjan. Variations on the common subexpression problem. Journal of the ACM, 27(4):758-771, October 1980.
- Kokichi Futatsugi, Joseph A. Goguen, Jean-Pierre Jouannaud, and José Meseguer. Principles of OBJ2. In Conference Record of the Twelfth Annual ACM Symposium on Principles of Programming Languages, pages 52-66, New Orleans, Louisiana, January 1985.
- Christoph M. Hoffmann and Michael J. O'Donnell. Pattern matching in trees. Journal of the ACM, 29(1):68-95, January 1982.
- Christoph M. Hoffmann and Michael J. O'Donnell. Implementation of an interpreter for abstract equations. In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, pages 111-121, Salt Lake City, Utah, January 1984.
- Gérard Huet. Confluent reductions: Abstract properties and application to term rewriting systems. Journal of the ACM, 27(4):797-821, October 1980.
- Gérard Huet. Confluent reductions: Abstract properties and applications to term rewriting systems. In 18th Annual Symposium on Foundations of Computer Science, pages 30-45, Providence, Rhode Island, 31 October-2 November 1977. IEEE.
- Dexter Kozen. Complexity of finitely presented algebras. In Conference Record of the Ninth Annual ACM Symposium on Theory of Computing, pages 164-177, Boulder, Colorado, 2-4 May 1977.
- Greg Nelson and Derek C. Oppen. Fast decision algorithms based on union and find. In 18th Annual Symposium on Foundations of Computer Science, pages 114-119, Providence, Rhode Island, 31 October-2 November 1977. IEEE.
- Barry K. Rosen. Tree-manipulating systems and Church-Rosser theorems. Journal of the ACM, 20(1):160-187, January 1973.
- Barry K. Rosen. Tree-manipulating systems and Church-Rosser theorems. In Conference Record of Second Annual ACM Symposium on Theory of Computing, pages 117-127, Northampton, Massachusetts, 4-6 May 1970.
- R. C. Sekar and I. V. Ramakrishnan. Programming in equational logic: Beyond strong sequentiality. In Proceedings, Fifth Annual IEEE Symposium on Logic in Computer Science, pages 230-241, Philadelphia, Pennsylvania, 4-7 June 1990. IEEE Computer Society Press.