Abstract
A framework for generating congruence closure and conditional congruence closure of ground terms over uninterpreted as well as interpreted symbols satisfying various properties is proposed. It is based on some of the key concepts from Kapur’s congruence closure algorithm (RTA97) for ground equations based on introducing new symbols for all nonconstant subterms appearing in the equation set and using ground completion on uninterpreted constants and purified equalities over interpreted symbols belonging to different theories. In the original signature, the resulting rewrite systems may be nonterminating but they still generate canonical forms. A byproduct of this framework is a constant Horn completion algorithm using which ground canonical Horn rewrite systems can be generated for conditional ground theories.
New efficient algorithms for generating congruence closure of conditional and unconditional equations on ground terms over uninterpreted symbols are presented. The complexity of the conditional congruence closure is shown to be O(n*log(n)), which is the same as for unconditional ground equations. The proposed algorithm is motivated by our attempts to generate efficient and succinct interpolants for the quantifier-free theory of equality over uninterpreted function symbols which are often a conjunction of conditional equations and need additional simplification. A completion algorithm to generate a canonical conditional rewrite system from ground conditional equations is also presented. The framework is general and flexible and is used later to develop congruence closure algorithms for cases when function symbols satisfy simple properties such as commutativity, nilpotency, idempotency and identity as well as their combinations. Interesting outcomes include algorithms for canonical rewrite systems for ground equational and conditional theories on uninterpreted and interpreted symbols leading to generation of canonical forms for ground terms, constrained terms and Horn equations.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Kozen D, Complexity of Finitely Presented Algebras, Technical Report TR 76–294, Dept. of Computer Science, Cornell Univ., Ithaca, NY, 1976.
Downey P J, Sethi R, and Tarjan R E, Variations on the common subexpression problem, JACM, 1980, 27(4): 758–771.
Shostak R E, An algorithm for reasoning about equality, Communications of ACM, 1978, 21(7): 583–585.
Nelson G and Oppen D C, Fast decision procedures based on congruence closure, JACM, 1980, 27(2): 356–364.
Craigen D, Kromodimoelijo S, Meisels I, et al., Eves system description, Proc. Automated Deduction - CADE 11, LNAI 607, Ed. Kapur, Springer Verlag, 1992, 771–775.
Kapur D and Subramaniam M, Mechanically verifying a family of multiplier circuits, Proc. Computer Aided Verification (CAV), New Jersey, Springer LNCS 1102 (Eds. by Alur R and Henzinger T A), 1996, 135–146.
Kapur D and Zhang H, An overview of rewrite rule laboratory (RRL), Computers and Math. with Applications, 1995, 29(2): 91–114.
Zhang H, Implementing contextual rewriting, Proc. Third International Workshop on Conditional Term Rewriting Systems, Springer LNCS 656 (Eds. by Remy J L and Rusinowitch M), 1992, 363–377.
Rybalchenko A and Sofronie-Stokkermans V, Constraint solving for interpolation, J. Symb. Comput., 2010, 45(11): 1212–1233.
Gallier J H, Fast algorithms for testing unatisfiability of ground Horn clauses with equations, J. Symb. Comput., 1987, 4(2): 233–254.
Dowling W F and Gallier J H, Linear-time algorithms for testing the satisfiability of propositional Horn formulae, J. Log. Program., 1984, 1(3): 267–284.
Kapur D, Shostak’s congruence closure as completion, Proc. Rewriting Techniques and Applications, 8th Intl. Conf. (RTA-97), (Ed. by Comon H) Sitges, Spain, Springer LNCS 1231, June, 1997, 23–37.
Baader F and Nipkow T, Term Rewriting and All That, Cambridge University Press, Cambridge, 1998.
Tarjan R E, Efficiency of a good but not linear set union algorithm, Journal of ACM, 1975, 22: 215–225.
Galler B A and Fisher M J, An improved equivalence algorithm, C. ACM, 1964, 7(5): 301–303.
Cocke J and Schwartz J T, Programming Languages and Their Compilers: Preliminary Notes, Second Revised Version, Courant Institute of Mathematical Sciences, NY, 1970.
Nieuwenhuis R and Oliveras A, Fast congruence closure and extensions, Information and Computation, 2007, 205(4): 557–580.
Peterson G E and Stickel M E, Complete set of reductions for some equational theories, J. ACM, 1981, 28(2): 233–264.
Zhang H and Kapur D, First order theorem proving using conditional rewrite rules, Proc. 9th Intl. Conf. on Automated Deduction (CADE), Springer LNCS 310, (Eds. by Lusk E W and Overbeek R A), Argonne, USA, May, 1988, 1–20.
Bachmair L, Ganzinger H, Lynch C, et al., Basic paramodulation and superposition, Proc. Automated Deduction — CADE 12, LNAI 607 (Ed. by Kapur), Springer Verlag, 1992, 462–476.
Jouannaud J P and Kirchner H, Completion of a set of rules modulo a set of equations, SIAM J. of Computing, 1986, 15(4): 1155–1194.
Knuth D and Bendix P, Simple word problems in universal algebras, Computational Problems in Abstract Algebra (Ed. by Leech), Pergamon Press, 1970, 263–297.
Bachmair L, Tiwari A, and Vigneron L, Abstract Congruence Closure, Springer-Verlag, New York, 2003.
Dershowitz N, Canonical sets of Horn clauses, Proc. 18th ICALP, LNCS 510, 1991, 267–278.
Bonacina M P and Dershowitz N, Canonical ground Horn theories, Ganzinger Festchrift, LNCS 7797, 2013, 39–69.
Cyrluk D, Lincoln P, and Shankar N, On Shostak’s decision procedures for combination of theories, Proc. Automated Deduction - CADE 13, LNAI 1104 (Eds. by McRobbie and Slaney), Springer Verlag, 1996, 463–477.
Kapur D, Efficient Interpolant generation algorithms based on quantifier elimination: EUF, Octagons,..., Proc. Dagstuhl Seminar 17371–Deduction beyond First-order Logic, Wadern, Germany, Sep. 2017, A journal version is under preparation; a draft can be obtained from the author.
Bachmair L, Ramakrishnan I V, Tiwari A, et al., Congruence closure modulo associativity and commutativity, Proc. Frontiers of Combining Systems, Third International Workshop (FroCoS), Nancy, France, 2000, 245–259.
Narendran P and Rusinowitch M, Any ground associative-commutative theory has a finite canonical rewrite system, Proc. 4th Intl. Conf. on Rewriting Techniques and Applications (RTA), LNCS 488, Springer, 1991, 423–434.
Kandri-Rody A, Kapur D, and Narendran P, An ideal-theoretic approach for word problems and unification problems over commutative algebras, Proc. First International Conference on Rewriting Techniques and Applications (RTA-85), Dijon, France (Eds. by Jouannaud and Musser), Springer LNCS 202, May 1985, 345–364.
Bonacina M P and Johansson M, On interpolation in automated theorem proving, J. Autom. Reasoning, 2015, 54(11): 69–97.
Gulwani S and Musuvathi M, Cover algorithms and their combination, Proc. 17th European Symposium on Programming, ESOP 2008, Springer LNCS, 2008, 193–207.
Le Chenadec P, Canonical forms in the finitely presented algebras, Ph.D. Thesis, U. of Paris 11, 1983.
Ballantyne A M and Lankford D, New decision algorithms for finitely presented commutative semigroups, Computers and Mathematics Applications, 1981, 7: 159–165.
Acknowledgements
I would like to thank Jose Castellanos Joo for comments and implementing parts of the algorithm in the context of interpolant generation. I also thank the referees for numerous suggestions for improving the presentation.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Kapur, D. Conditional Congruence Closure over Uninterpreted and Interpreted Symbols. J Syst Sci Complex 32, 317–355 (2019). https://doi.org/10.1007/s11424-019-8377-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11424-019-8377-8