Extending SMT Solvers to Higher-Order Logic

  • Haniel Barbosa
  • Andrew Reynolds
  • Daniel El OuraouiEmail author
  • Cesare Tinelli
  • Clark Barrett
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11716)


SMT solvers have throughout the years been able to cope with increasingly expressive formulas, from ground logics to full first-order logic (FOL). In contrast, the extension of SMT solvers to higher-order logic (HOL) is mostly unexplored. We propose a pragmatic extension for SMT solvers to support HOL reasoning natively without compromising performance on FOL reasoning, thus leveraging the extensive research and implementation efforts dedicated to efficient SMT solving. We show how to generalize data structures and the ground decision procedure to support partial applications and extensionality, as well as how to reconcile quantifier instantiation techniques with higher-order variables. We also discuss a separate approach for redesigning an HOL SMT solver from the ground up via new data structures and algorithms. We apply our pragmatic extension to the CVC4 SMT solver and discuss a redesign of the veriT SMT solver. Our evaluation shows they are competitive with state-of-the-art HOL provers and often outperform the traditional encoding into FOL.



We are grateful to Jasmin Blanchette and Pascal Fontaine for numerous discussions throughout the development of this work, for providing funding for research visits and for suggesting many improvements. We also thank Jasmin for generating several of the benchmarks with which we evaluate our approach; Simon Cruanes and Martin Riener for many fruitful discussions on the intricacies of HOL; Andres Nötzli for help with the table and plot scripts; Mathias Fleury, Hans-Jörg Schurr and Sophie Tourret for suggesting many improvements. This work was partially supported by the National Science Foundation under Award 1656926 and the European Research Council (ERC) under starting grant Matryoshka (713999).


  1. 1.
    Andrews, P.B.: Resolution in type theory. J. Symb. Log. 36(3), 414–432 (1971)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Bachmair, L., Ganzinger, H.: Rewrite-based equational theorem proving with selection and simplification. J. Log. Comput. 4(3), 217–247 (1994)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Barbosa, H., Blanchette, J.C., Cruanes, S., El Ouraoui, D., Fontaine, P.: Language and proofs for higher-order SMT (work in progress). In: Dubois, C., Paleo, B.W. (eds.) PXTP 2017. EPTCS, vol. 262, pp. 15–22 (2017)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Barbosa, H., Fontaine, P., Reynolds, A.: Congruence closure with free variables. In: Legay, A., Margaria, T. (eds.) TACAS 2017. LNCS, vol. 10206, pp. 214–230. Springer, Heidelberg (2017). Scholar
  5. 5.
    Barbosa, H., Reynolds, A., El Ouraoui, D., Tinelli, C., Barrett, C.: Extending SMT solvers to higher-order logic. Technical report. The University of Iowa, May 2019Google Scholar
  6. 6.
    Barrett, C., et al.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011). Scholar
  7. 7.
    Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.6. Technical report. Department of Computer Science, The University of Iowa (2017)Google Scholar
  8. 8.
    Barrett, C., Sebastiani, R., Seshia, S., Tinelli, C.: Satisfiability modulo theories, Chap. 26. In: Biere, A., Heule, M.J.H., van Maaren, H., Walsh, T. (eds.) Handbook of Satisfiability. FAIA, vol. 185, pp. 825–885. IOS Press (2009)Google Scholar
  9. 9.
    Bentkamp, A., Blanchette, J.C., Cruanes, S., Waldmann, U.: Superposition for lambda-free higher-order logic. In: Galmiche, D., Schulz, S., Sebastiani, R. (eds.) IJCAR 2018. LNCS, vol. 10900, pp. 28–46. Springer, Cham (2018). Scholar
  10. 10.
    Benzmüller, C., Miller, D.: Automation of higher-order logic. In: Siekmann, J.H. (ed.) Computational Logic. Handbook of the History of Logic, vol. 9, pp. 215–254. Elsevier (2014)Google Scholar
  11. 11.
    Benzmüller, C., Sultana, N., Paulson, L.C., Theiss, F.: The higher-order prover LEO-II. J. Autom. Reason. 55, 389–404 (2015)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Bhayat, A., Reger, G.: Set of support for higher-order reasoning. In: Konev, B., Urban, J., Rümmer, P. (eds.) PAAR-2018. CEUR Workshop Proceedings, vol. 2162, pp. 2–16. (2018)Google Scholar
  13. 13.
    Blanchette, J.C.: Automatic proofs and refutations for higher-order logic. Ph.D. thesis. Technical University Munich (2012)Google Scholar
  14. 14.
    Blanchette, J.C., Kaliszyk, C., Paulson, L.C., Urban, J.: Hammering towards QED. J. Formaliz. Reason. 9(1), 101–148 (2016)MathSciNetGoogle Scholar
  15. 15.
    Böhme, S., Nipkow, T.: Sledgehammer: judgement day. In: Giesl, J., Hähnle, R. (eds.) IJCAR 2010. LNCS, vol. 6173, pp. 107–121. Springer, Heidelberg (2010). Scholar
  16. 16.
    Bouton, T., Caminha B. de Oliveira, D., Déharbe, D., Fontaine, P.: veriT: an open, trustable and efficient SMT-solver. In: Schmidt, R.A. (ed.) CADE 2009. LNCS, vol. 5663, pp. 151–156. Springer, Heidelberg (2009). Scholar
  17. 17.
    Brown, C.E.: Satallax: an automatic higher-order prover. In: Gramlich, B., Miller, D., Sattler, U. (eds.) IJCAR 2012. LNCS, vol. 7364, pp. 111–117. Springer, Heidelberg (2012). Scholar
  18. 18.
    Cruanes, S.: Superposition with structural induction. In: Dixon, C., Finger, M. (eds.) FroCoS 2017. LNCS, vol. 10483, pp. 172–188. Springer, Cham (2017). Scholar
  19. 19.
    Czajka, Ł., Kaliszyk, C.: Hammer for Coq: automation for dependent type theory. J. Autom. Reason. 61, 423–453 (2018)MathSciNetCrossRefGoogle Scholar
  20. 20.
    de Moura, L., Bjørner, N.: Efficient E-matching for SMT solvers. In: Pfenning, F. (ed.) CADE 2007. LNCS, vol. 4603, pp. 183–198. Springer, Heidelberg (2007). Scholar
  21. 21.
    de Moura, L., Bjørner, N.: Generalized, efficient array decision procedures. In: FMCAD 2009, pp. 45–52. IEEE (2009)Google Scholar
  22. 22.
    Detlefs, D., Nelson, G., Saxe, J.B.: Simplify: a theorem prover for program checking. J. ACM 52, 365–473 (2005)MathSciNetCrossRefGoogle Scholar
  23. 23.
    Dowek, G.: Higher-order unification and matching. In: Robinson, J.A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. II, pp. 1009–1062. Elsevier and MIT Press (2001)Google Scholar
  24. 24.
    Downey, P.J., Sethi, R., Tarjan, R.E.: Variations on the common subexpression problem. J. ACM 27, 758–771 (1980)MathSciNetCrossRefGoogle Scholar
  25. 25.
    Färber, M., Brown, C.: Internal guidance for Satallax. In: Olivetti, N., Tiwari, A. (eds.) IJCAR 2016. LNCS, vol. 9706, pp. 349–361. Springer, Cham (2016). Scholar
  26. 26.
    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). Scholar
  27. 27.
    Henkin, L.: Completeness in the theory of types. J. Symb. Log. 15(2), 81–91 (1950)MathSciNetCrossRefGoogle Scholar
  28. 28.
    Hughes, R.J.M.: Super combinators: a new implementation method for applicative languages. In: Symposium on LISP and Functional Programming, pp. 1–10 (1982)Google Scholar
  29. 29.
    Kohlhase, M.: Higher-order tableaux. In: Baumgartner, P., Hähnle, R., Possega, J. (eds.) TABLEAUX 1995. LNCS, vol. 918, pp. 294–309. Springer, Heidelberg (1995). Scholar
  30. 30.
    Meng, J., Paulson, L.C.: Translating higher-order clauses to first-order clauses. J. Autom. Reason. 40(1), 35–60 (2008)MathSciNetCrossRefGoogle Scholar
  31. 31.
    Nelson, G., Oppen, D.C.: Fast decision procedures based on congruence closure. J. ACM 27, 356–364 (1980)MathSciNetCrossRefGoogle Scholar
  32. 32.
    Nieuwenhuis, R., Oliveras, A.: Fast congruence closure and extensions. Inf. Comput. IC 2005(4), 557–580 (2007)MathSciNetCrossRefGoogle Scholar
  33. 33.
    Nieuwenhuis, R., Rubio, A.: Paramodulation-based theorem proving. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. 1, pp. 371–443. Elsevier Science (2001)Google Scholar
  34. 34.
    Nipkow, T., Wenzel, M., Paulson, L.C.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002). Scholar
  35. 35.
    Noshita, K.: Translation of Turner combinators in O(n log n) space. IPL 20, 71–74 (1985)MathSciNetCrossRefGoogle Scholar
  36. 36.
    Paulson, L.C., Blanchette, J.C.: Three years of experience with Sledgehammer, a practical link between automatic and interactive theorem provers. In: Sutcliffe, G., Schulz, S., Ternovska, E. (eds.) IWIL-2010. EPiC, vol. 2, pages 1–11. EasyChair (2012)Google Scholar
  37. 37.
    Reynolds, A., Barbosa, H., Fontaine, P.: Revisiting enumerative instantiation. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10806, pp. 112–131. Springer, Cham (2018). Scholar
  38. 38.
    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
  39. 39.
    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). Scholar
  40. 40.
    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). Scholar
  41. 41.
    Robinson, J.A.: Mechanizing higher order logic. Mach. Intell. 4, 151–170 (1969)MathSciNetzbMATHGoogle Scholar
  42. 42.
    Schulz, S.: E - a brainiac theorem prover. AI Commun. 15, 111–126 (2002)zbMATHGoogle Scholar
  43. 43.
    Steen, A., Benzmüller, C.: The higher-order prover Leo-III. In: Galmiche, D., Schulz, S., Sebastiani, R. (eds.) IJCAR 2018. LNCS, vol. 10900, pp. 108–116. Springer, Cham (2018). Scholar
  44. 44.
    Stump, A., Barrett, C.W., Dill, D.L., Levitt, J.R.: A decision procedure for an extensional theory of arrays. In: LICS 2001, pp. 29–37. IEEE Computer Society (2001)Google Scholar
  45. 45.
    Sultana, N., Blanchette, J.C., Paulson, L.C.: LEO-II and Satallax on the Sledgehammer test bench. J. Appl. Log. 11, 91–102 (2013)MathSciNetCrossRefGoogle Scholar
  46. 46.
    Sutcliffe, G.: The TPTP problem library and associated infrastructure. J. Autom. Reason. 43, 337–362 (2009)CrossRefGoogle Scholar
  47. 47.
    Sutcliffe, G.: The CADE ATP system competition - CASC. AI Mag. 37, 99–101 (2016)CrossRefGoogle Scholar
  48. 48.
    Vukmirović, P., Blanchette, J.C., Cruanes, S., Schulz, S.: Extending a brainiac prover to lambda-free higher-order logic. In: Vojnar, T., Zhang, L. (eds.) TACAS 2019. LNCS, vol. 11427, pp. 192–210. Springer, Cham (2019). Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Haniel Barbosa
    • 1
  • Andrew Reynolds
    • 1
  • Daniel El Ouraoui
    • 2
    Email author
  • Cesare Tinelli
    • 1
  • Clark Barrett
    • 3
  1. 1.The University of IowaIowa CityUSA
  2. 2.University of Lorraine, CNRS, Inria, and LORIANancyFrance
  3. 3.Stanford UniversityStanfordUSA

Personalised recommendations