Advertisement

Journal of Systems Science and Complexity

, Volume 32, Issue 1, pp 317–355 | Cite as

Conditional Congruence Closure over Uninterpreted and Interpreted Symbols

  • Deepak KapurEmail author
Article

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.

Keywords

Completion congruence closure conditional congruence closure intepreted symbols rewriting uninterpreted symbols 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Notes

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.

References

  1. [1]
    Kozen D, Complexity of Finitely Presented Algebras, Technical Report TR 76–294, Dept. of Computer Science, Cornell Univ., Ithaca, NY, 1976.Google Scholar
  2. [2]
    Downey P J, Sethi R, and Tarjan R E, Variations on the common subexpression problem, JACM, 1980, 27(4): 758–771.MathSciNetCrossRefzbMATHGoogle Scholar
  3. [3]
    Shostak R E, An algorithm for reasoning about equality, Communications of ACM, 1978, 21(7): 583–585.MathSciNetCrossRefzbMATHGoogle Scholar
  4. [4]
    Nelson G and Oppen D C, Fast decision procedures based on congruence closure, JACM, 1980, 27(2): 356–364.MathSciNetCrossRefzbMATHGoogle Scholar
  5. [5]
    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.Google Scholar
  6. [6]
    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.CrossRefGoogle Scholar
  7. [7]
    Kapur D and Zhang H, An overview of rewrite rule laboratory (RRL), Computers and Math. with Applications, 1995, 29(2): 91–114.MathSciNetCrossRefGoogle Scholar
  8. [8]
    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.Google Scholar
  9. [9]
    Rybalchenko A and Sofronie-Stokkermans V, Constraint solving for interpolation, J. Symb. Comput., 2010, 45(11): 1212–1233.MathSciNetCrossRefzbMATHGoogle Scholar
  10. [10]
    Gallier J H, Fast algorithms for testing unatisfiability of ground Horn clauses with equations, J. Symb. Comput., 1987, 4(2): 233–254.CrossRefzbMATHGoogle Scholar
  11. [11]
    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.MathSciNetCrossRefzbMATHGoogle Scholar
  12. [12]
    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.CrossRefGoogle Scholar
  13. [13]
    Baader F and Nipkow T, Term Rewriting and All That, Cambridge University Press, Cambridge, 1998.CrossRefzbMATHGoogle Scholar
  14. [14]
    Tarjan R E, Efficiency of a good but not linear set union algorithm, Journal of ACM, 1975, 22: 215–225.MathSciNetCrossRefzbMATHGoogle Scholar
  15. [15]
    Galler B A and Fisher M J, An improved equivalence algorithm, C. ACM, 1964, 7(5): 301–303.CrossRefzbMATHGoogle Scholar
  16. [16]
    Cocke J and Schwartz J T, Programming Languages and Their Compilers: Preliminary Notes, Second Revised Version, Courant Institute of Mathematical Sciences, NY, 1970.Google Scholar
  17. [17]
    Nieuwenhuis R and Oliveras A, Fast congruence closure and extensions, Information and Computation, 2007, 205(4): 557–580.MathSciNetCrossRefzbMATHGoogle Scholar
  18. [18]
    Peterson G E and Stickel M E, Complete set of reductions for some equational theories, J. ACM, 1981, 28(2): 233–264.MathSciNetCrossRefzbMATHGoogle Scholar
  19. [19]
    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.Google Scholar
  20. [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.Google Scholar
  21. [21]
    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.MathSciNetCrossRefzbMATHGoogle Scholar
  22. [22]
    Knuth D and Bendix P, Simple word problems in universal algebras, Computational Problems in Abstract Algebra (Ed. by Leech), Pergamon Press, 1970, 263–297.Google Scholar
  23. [23]
    Bachmair L, Tiwari A, and Vigneron L, Abstract Congruence Closure, Springer-Verlag, New York, 2003.CrossRefzbMATHGoogle Scholar
  24. [24]
    Dershowitz N, Canonical sets of Horn clauses, Proc. 18th ICALP, LNCS 510, 1991, 267–278.Google Scholar
  25. [25]
    Bonacina M P and Dershowitz N, Canonical ground Horn theories, Ganzinger Festchrift, LNCS 7797, 2013, 39–69.Google Scholar
  26. [26]
    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.CrossRefGoogle Scholar
  27. [27]
    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.Google Scholar
  28. [28]
    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.CrossRefGoogle Scholar
  29. [29]
    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.CrossRefGoogle Scholar
  30. [30]
    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.Google Scholar
  31. [31]
    Bonacina M P and Johansson M, On interpolation in automated theorem proving, J. Autom. Reasoning, 2015, 54(11): 69–97.MathSciNetCrossRefzbMATHGoogle Scholar
  32. [32]
    Gulwani S and Musuvathi M, Cover algorithms and their combination, Proc. 17th European Symposium on Programming, ESOP 2008, Springer LNCS, 2008, 193–207.Google Scholar
  33. [33]
    Le Chenadec P, Canonical forms in the finitely presented algebras, Ph.D. Thesis, U. of Paris 11, 1983.zbMATHGoogle Scholar
  34. [34]
    Ballantyne A M and Lankford D, New decision algorithms for finitely presented commutative semigroups, Computers and Mathematics Applications, 1981, 7: 159–165.MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Institute of Systems Science, Academy of Mathematics and Systems Science, Chinese Academy of Sciences and Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Computer ScienceUniversity of New MexicoAlbuquerqueUSA

Personalised recommendations