A Decision Procedure for (Co)datatypes in SMT Solvers

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9195)

Abstract

We present a decision procedure that combines reasoning about datatypes and codatatypes. The dual of the acyclicity rule for datatypes is a uniqueness rule that identifies observationally equal codatatype values, including cyclic values. The procedure decides universal problems and is composable via the Nelson–Oppen method. It has been implemented in CVC4, a state-of-the-art SMT solver. An evaluation based on problems generated from theories developed with Isabelle demonstrates the potential of the procedure.

References

  1. 1.
    Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanovic, D., King, T., Reynolds, A., Tinelli, C.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  2. 2.
    Barrett, C., Shikanian, I., Tinelli, C.: An abstract decision procedure for satisfiability in the theory of inductive data types. J. Satisf. Boolean Model. Comput. 3, 21–46 (2007)MathSciNetMATHGoogle Scholar
  3. 3.
    Blanchette, J.C., Böhme, S., Paulson, L.C.: Extending Sledgehammer with SMT solvers. J. Autom. Reasoning 51(1), 109–128 (2013)CrossRefGoogle Scholar
  4. 4.
    Blanchette, J.C., Nipkow, T.: Nitpick: a counterexample generator for higher-order logic based on a relational model finder. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 131–146. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  5. 5.
    Carayol, A., Morvan, C.: On rational trees. In: Ésik, Z. (ed.) CSL 2006. LNCS, vol. 4207, pp. 225–239. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  6. 6.
    Djelloul, K., Dao, T., Frühwirth, T.W.: Theory of finite or infinite trees revisited. Theor. Pract. Log. Prog. 8(4), 431–489 (2008)MATHGoogle Scholar
  7. 7.
    Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., Tinelli, C.: DPLL(T): fast decision procedures. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 175–188. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  8. 8.
    Jovanović, D., Barrett, C.: Sharing is caring: combination of theories. In: Tinelli, C., Sofronie-Stokkermans, V. (eds.) FroCoS 2011. LNCS, vol. 6989, pp. 195–210. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  9. 9.
    Kersani, A., Peltier, N.: Combining superposition and induction: a practical realization. In: Fontaine, P., Ringeissen, C., Schmidt, R.A. (eds.) FroCoS 2013. LNCS, vol. 8152, pp. 7–22. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  10. 10.
    Klein, G., Nipkow, T., Paulson, L. (eds.): Archive of Formal Proofs. http://afp.sf.net/
  11. 11.
    Kozen, D.: Results on the propositional \(\mu \)-calculus. Theor. Comput. Sci. 27, 333–354 (1983)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Leino, K.R.M., Moskal, M.: Co-induction simply. In: Jones, C., Pihlajasaari, P., Sun, J. (eds.) FM 2014. LNCS, vol. 8442, pp. 382–398. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  13. 13.
    Leroy, X.: A formally verified compiler back-end. J. Autom. Reasoning 43(4), 363–446 (2009)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Lochbihler, A.: Verifying a compiler for java threads. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 427–447. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  15. 15.
    Lochbihler, A.: Making the java memory model safe. ACM Trans. Program. Lang. Syst. 35(4), 12:1–12:65 (2014)Google Scholar
  16. 16.
    de Moura, L., Bjørner, N.S.: Efficient E-matching for smt solvers. In: Pfenning, F. (ed.) CADE 2007. LNCS (LNAI), vol. 4603, pp. 183–198. Springer, Heidelberg (2007) CrossRefGoogle Scholar
  17. 17.
    de Moura, L., Bjørner, N.S.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  18. 18.
    Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Trans. Program. Lang. Syst. 1(2), 245–257 (1979)CrossRefMATHGoogle Scholar
  19. 19.
    Pham, T., Whalen, M.W.: RADA: a tool for reasoning about algebraic data types with abstractions. In: Meyer, B., Baresi, L., Mezini, M. (eds.) ESEC/FSE 2013, pp. 611–614. ACM (2013)Google Scholar
  20. 20.
    Reynolds, A., Blanchette, J.C.: A decision procedure for (co)datatypes in SMT solvers. Technical report (2015). http://lara.epfl.ch/reynolds/CADE2015-cdt/
  21. 21.
    Reynolds, A., Kuncak, V.: Induction for SMT solvers. In: D’Souza, D., Lal, A., Larsen, K.G. (eds.) VMCAI 2015. LNCS, vol. 8931, pp. 80–98. Springer, Heidelberg (2015) Google Scholar
  22. 22.
    Reynolds, A., Tinelli, C., Goel, A., Krstić, S., Deters, M., Barrett, C.: Quantifier instantiation techniques for finite model finding in SMT. In: Bonacina, M.P. (ed.) CADE 2013. LNCS, vol. 7898, pp. 377–391. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  23. 23.
    Reynolds, A., Tinelli, C., de Moura, L.: Finding conflicting instances of quantified formulas in SMT. In: FMCAD 2014. pp. 195–202. IEEE (2014)Google Scholar
  24. 24.
    Rutten, J.J.M.M.: Universal coalgebra—a theory of systems. Theor. Comput. Sci. 249, 3–80 (2000)MathSciNetCrossRefMATHGoogle Scholar
  25. 25.
    Stump, A., Sutcliffe, G., Tinelli, C.: StarExec: a cross-community infrastructure for logic solving. In: Demri, S., Kapur, D., Weidenbach, C. (eds.) IJCAR 2014. LNCS, vol. 8562, pp. 367–373. Springer, Heidelberg (2014) Google Scholar
  26. 26.
    Suter, P., Köksal, A.S., Kuncak, V.: Satisfiability modulo recursive programs. In: Yahav, E. (ed.) Static Analysis. LNCS, vol. 6887, pp. 298–315. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  27. 27.
    Wand, D.: Polymorphic+typeclass superposition. In: de Moura, L., Konev, B., Schulz, S. (eds.) PAAR 2014 (2014)Google Scholar
  28. 28.
    Weber, T.: SAT-Based Finite Model Generation for Higher-Order Logic. Ph.D. Thesis, Technische Universität München (2008)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Andrew Reynolds
    • 1
  • Jasmin Christian Blanchette
    • 2
    • 3
  1. 1.École Polytechnique Fédérale de Lausanne (EPFL)LausanneSwitzerland
  2. 2.Inria Nancy and LORIAVillers-lès-NancyFrance
  3. 3.Max-Planck-Institut für InformatikSaarbrückenGermany

Personalised recommendations