Expressing Polymorphic Types in a Many-Sorted Language
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.
KeywordsType Signature Function Symbol Predicate Symbol Closed Formula Type Constructor
Unable to display preview. Download preview PDF.
- 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
- 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.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.Bobot, F., Paskevich, A.: Expressing polymorphic types in a many-sorted language (extended version) (July 2011), http://hal.inria.fr/inria-00591414/en/
- 7.Dutertre, B., de Moura, L.: The YICES SMT solver. Tech. rep., SRI International (2006)Google Scholar
- 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
- 12.Manzano, M.: Extensions of First-Order Logic, Cambridge Tracts in Theoretical Computer Science, vol. 19. Cambridge University Press, Cambridge (1996)Google Scholar
- 13.Marché, C., Moy, Y.: Jessie plug-in (2010), http://frama-c.com/jessie.html
- 17.The Coq Development Team: The Coq Proof Assistant Reference Manual – Version V8.0 (2004), http://coq.inria.fr