Expressing Polymorphic Types in a Many-Sorted Language

  • François Bobot
  • Andrei Paskevich
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6989)


In this paper, we study translation from a first-order logic with polymorphic types la ML (of which we give a formal description) to a many-sorted or one-sorted logic as accepted by mainstream automated theorem provers. We consider a three-stage scheme where the last stage eliminates polymorphic types while adding the necessary “annotations” to preserve soundness, and the first two stages serve to protect certain terms so that they can keep their original unannotated form. This protection allows us to make use of provers’ built-in theories and operations. We present two existing translation procedures as sound and complete instances of this generic scheme. Our formulation generalizes over the previous ones by allowing us to protect terms of arbitrary monomorphic types. In particular, we can benefit from the built-in theory of arrays in SMT solvers such as Z3, CVC3, and Yices. The proposed methods are implemented in the Why3 tool and we compare their performance in combination with several automated provers.


Type Signature Function Symbol Predicate Symbol Closed Formula Type Constructor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barrett, C., Stump, A., Tinelli, C.: The SMT-LIB Standard: Version 2.0. Tech. rep., Department of Computer Science, The University of Iowa (2010)Google Scholar
  2. 2.
    Barrett, C.W., Tinelli, C.: CVC3. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 298–302. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Bobot, F., Conchon, S., Contejean, E., Lescuyer, S.: Implementing polymorphism in SMT solvers. In: SMT 2008. ACM ICPS, vol. 367, pp. 1–5 (2008)Google Scholar
  4. 4.
    Bobot, F., Filliâtre, J.C., Marché, C., Paskevich, A.: Why3: Shepherd your herd of provers. In: Boogie 2011 (co-loc. with CADE-23), Wrocław, Poland (August 2011)Google Scholar
  5. 5.
    Bobot, F., Paskevich, A.: Expressing polymorphic types in a many-sorted language (extended version) (July 2011),
  6. 6.
    Couchot, J.F., Lescuyer, S.: Handling polymorphism in automated deduction. In: Pfenning, F. (ed.) CADE 2007. LNCS (LNAI), vol. 4603, pp. 263–278. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Dutertre, B., de Moura, L.: The YICES SMT solver. Tech. rep., SRI International (2006)Google Scholar
  8. 8.
    Filliâtre, J.C., Marché, C.: Multi-prover verification of C programs. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 15–29. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  9. 9.
    Hurd, J.: An LCF-style interface between HOL and first-order logic. In: Voronkov, A. (ed.) CADE 2002. LNCS (LNAI), vol. 2392, pp. 134–138. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  10. 10.
    Hurd, J.: First-order proof tactics in higher-order logic theorem provers. In: Design and Application of Strategies/Tactics in Higher Order Logics. NASA Technical Report NASA/CP-2003-212448, pp. 56–68 (2003)Google Scholar
  11. 11.
    Leino, K.R.M., Rümmer, P.: A polymorphic intermediate verification language: Design and logical encoding. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 312–327. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  12. 12.
    Manzano, M.: Extensions of First-Order Logic, Cambridge Tracts in Theoretical Computer Science, vol. 19. Cambridge University Press, Cambridge (1996)Google Scholar
  13. 13.
    Marché, C., Moy, Y.: Jessie plug-in (2010),
  14. 14.
    Meng, J., Paulson, L.C.: Translating higher-order clauses to first-order clauses. Journal of Automated Reasoning 40(1), 35–60 (2008)CrossRefzbMATHMathSciNetGoogle Scholar
  15. 15.
    de Moura, L., Bjørner, N.: 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
  16. 16.
    Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  17. 17.
    The Coq Development Team: The Coq Proof Assistant Reference Manual – Version V8.0 (2004),

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • François Bobot
    • 1
    • 2
  • Andrei Paskevich
    • 1
    • 2
  1. 1.LRI, Université Paris-Sud 11, CNRSOrsayFrance
  2. 2.INRIA Saclay-Île de France, ProValOrsayFrance

Personalised recommendations