Skip to main content

Model Finding for Recursive Functions in SMT

  • Conference paper
  • First Online:
Automated Reasoning (IJCAR 2016)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 9706))

Included in the following conference series:

Abstract

SMT solvers have recently been extended with techniques for finding models of universally quantified formulas in some restricted fragments of first-order logic. This paper introduces a translation that reduces axioms specifying a large class of recursive functions, including terminating functions, to universally quantified formulas for which these techniques are applicable. An evaluation confirms that the approach improves the performance of existing solvers on benchmarks from three sources. The translation is implemented as a preprocessor in the CVC4 solver and in a new higher-order model finder called Nunchaku.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/epfl-lara/leon/.

References

  1. Atkey, R., McBride, C.: Productive coprogramming with guarded recursion. In: Morrisett, G., Uustalu, T. (eds.) ICFP 2013, pp. 197–208. ACM (2013)

    Google Scholar 

  2. Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanović, 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)

    Chapter  Google Scholar 

  3. Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard–Version 2.5. Technical report, The University of Iowa (2015). http://smt-lib.org/

  4. Baumgartner, P., Bax, J.: Proving infinite satisfiability. In: McMillan, K., Middeldorp, A., Voronkov, A. (eds.) LPAR-19 2013. LNCS, vol. 8312, pp. 86–95. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  5. Baumgartner, P., Fuchs, A., de Nivelle, H., Tinelli, C.: Computing finite models by reduction to function-free clause logic. J. Appl. Log. 7(1), 58–74 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  6. Blanc, R., Kuncak, V., Kneuss, E., Suter, P.: An overview of the Leon verification system–Verification by translation to recursive functions. In: Scala 2013. ACM (2013)

    Google Scholar 

  7. Blanchette, J.C.: Relational analysis of (co)inductive predicates, (co)inductive datatypes, and (co)recursive functions. Softw. Qual. J. 21(1), 101–126 (2013)

    Article  Google Scholar 

  8. Blanchette, J.C., Böhme, S., Paulson, L.C.: Extending sledgehammer with SMT solvers. J. Autom. Reasoning 51(1), 109–128 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  9. Blanchette, J.C., Krauss, A.: Monotonicity inference for higher-order formulas. J. Autom. Reasoning 47(4), 369–398 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Blanchette, J.C., Popescu, A., Traytel, D.: Foundational extensible corecursion: a proof assistant perspective. In: Reppy, J. (ed.) ICFP 2015. ACM (2015)

    Google Scholar 

  12. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: ICFP 2000, pp. 268–279. ACM (2000)

    Google Scholar 

  13. Claessen, K., Lillieström, A., Smallbone, N.: Sort it out with monotonicity. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS, vol. 6803, pp. 207–221. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  14. Claessen, K., Sörensson, N.: New techniques that improve MACE-style model finding. In: MODEL (2003)

    Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. de Moura, L., Bjørner, N.: Relevancy propagation. Technical report, Microsoft Research, October 2007

    Google Scholar 

  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)

    Chapter  Google Scholar 

  18. Dunets, A., Schellhorn, G., Reif, W.: Automated flaw detection in algebraic specifications. J. Autom. Reasoning 45(4), 359–395 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  19. Ge, Y., de Moura, L.: Complete instantiation for quantified formulas in satisfiabiliby modulo theories. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 306–320. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  20. Goguen, J.A., Burstall, R.M.: Institutions: abstract model theory for specification and programming. J. ACM 39(1), 95–146 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  21. Jackson, D.: Nitpick: a checkable specification language. In: FMSP 1996, pp. 60–69 (1996)

    Google Scholar 

  22. Johansson, M., Dixon, L., Bundy, A.: Case-analysis for rippling and inductive proof. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 291–306. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  23. Korovin, K.: Non-cyclic sorts for first-order satisfiability. In: Fontaine, P., Ringeissen, C., Schmidt, R.A. (eds.) FroCoS 2013. LNCS, vol. 8152, pp. 214–228. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  24. Krauss, A.: Automating recursive definitions and termination proofs in higher-order logic. Ph.D. thesis, Technische Universität München (2009)

    Google Scholar 

  25. Kuncak, V., Jackson, D.: Relational analysis of algebraic datatypes. In: Wermelinger, M., Gall, H. (eds.) ESEC/FSE 2005. ACM (2005)

    Google Scholar 

  26. Lindblad, F.: Property directed generation of first-order test data. In: Morazán, M. (ed.) TFP 2007, pp. 105–123. Intellect (2008)

    Google Scholar 

  27. McCune, W.: Prover9 and Mace4. http://www.cs.unm.edu/mccune/prover9/

  28. McCune, W.: A Davis-Putnam program and its application to finite first-order model search: quasigroup existence problems. Technical report, Argonne National Laboratory (1994)

    Google Scholar 

  29. Reynolds, A., Blanchette, J.C.: A decision procedure for (co)datatypes in SMT solvers. In: Felty, A., Middeldorp, A. (eds.) CADE-25. LNCS, vol. 9195, pp. 197–213. Springer, Heidelberg (2015)

    Chapter  Google Scholar 

  30. Reynolds, A., Blanchette, J.C., Tinelli, C.: Model finding for recursive functions in SMT. In: Ganesh, V., Jovanović, D. (eds.) SMT 2015 (2015)

    Google Scholar 

  31. 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 

  32. Reynolds, A., Tinelli, C., Goel, A., Krstić, S.: Finite model finding in SMT. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 640–655. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  33. 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)

    Chapter  Google Scholar 

  34. Reynolds, A.J.: Finite model finding in satisfiability modulo theories. Ph.D. thesis, The University of Iowa (2013)

    Google Scholar 

  35. Runciman, C., Naylor, M., Lindblad, F.: Smallcheck and lazy smallcheck: automatic exhaustive testing for small values. In: Gill, A. (ed.) Haskell 2008, pp. 37–48. ACM (2008)

    Google Scholar 

  36. Slaney, J.K.: FINDER: finite domain enumerator system description. In: Bundy, A. (ed.) CADE 1994. LNCS, vol. 814, pp. 798–801. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  37. Torlak, E., Jackson, D.: Kodkod: a relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  38. Turner, D.A.: Elementary strong functional programming. In: Hartel, P.H., Plasmeijer, R. (eds.) FPLE 1995. LNCS, vol. 1022, pp. 1–13. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  39. Weber, T.: SAT-based finite model generation for higher-order logic. Ph.D. thesis, Technische Universität München (2008)

    Google Scholar 

  40. Zhang, J., Zhang, H.: SEM: a system for enumerating models. In: Mellish, C.S. (ed.) IJCAI 1995, vol. 1, pp. 298–303. Morgan Kaufmann (1995)

    Google Scholar 

Download references

Acknowledgments

Viktor Kuncak and Stephan Merz have made this work possible. We would also like to thank Damien Busato-Gaston and Emmanouil Koukoutos for providing the set of Leon benchmarks used in the evaluation, and Mark Summerfield for suggesting several textual improvements. Cruanes is supported by the Inria technological development action “Contre-exemples utilisables par Isabelle et Coq” (CUIC). Reynolds and Tinelli are partially supported by grant 1228765 from the National Science Foundation.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andrew Reynolds .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Reynolds, A., Blanchette, J.C., Cruanes, S., Tinelli, C. (2016). Model Finding for Recursive Functions in SMT. In: Olivetti, N., Tiwari, A. (eds) Automated Reasoning. IJCAR 2016. Lecture Notes in Computer Science(), vol 9706. Springer, Cham. https://doi.org/10.1007/978-3-319-40229-1_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-40229-1_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-40228-4

  • Online ISBN: 978-3-319-40229-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics