Certification of a Type Inference Tool for ML: Damas–Milner within Coq

We develop a formal proof of the ML type inference algorithm, within the Coq proof assistant. We are much concerned with methodology and reusability of such a mechanization. This proof is an essential step toward the certification of a complete ML compiler.In this paper we present the Coq formalization of the typing system and its inference algorithm. We establish formally the correctness and the completeness of the type inference algorithm with respect to the typing rules of the language. We describe and comment on the mechanized proofs.

[1]  Christine Paulin-Mohring,et al.  Synthesis of ML Programs in the System Coq , 1993, J. Symb. Comput..

[2]  Delphine Terrasse,et al.  Encoding Natural Semantics in Coq , 1995, AMAST.

[3]  Andrew K. Wright Simple imperative polymorphism , 1995, LISP Symb. Comput..

[4]  Samuel Boutin,et al.  Proving Correctness of the Translation from Mini-ML to the CAM with the Coq Proof Development System , 1995 .

[5]  Frank Pfenning,et al.  Inductively Defined Types in the Calculus of Constructions , 1989, Mathematical Foundations of Programming Semantics.

[6]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[7]  Tobias Nipkow,et al.  Formal Verification of Algorithm W: The Monomorphic Case , 1996, TPHOLs.

[8]  Tobias Nipkow,et al.  Type Inference Verified: Algorithm W in Isabelle/HOL , 2004, Journal of Automated Reasoning.

[9]  Catherine Parent,et al.  Developing Certified Programs in the System Coq - The Program Tactic , 1994, TYPES.

[10]  Mathieu Jaume Unification: a Case Study in Transposition of Formal Properties , 1997 .

[11]  Pierre Weis,et al.  Extensional polymorphism , 1995, POPL 1995.

[12]  Dominique Clément,et al.  A simple applicative language: mini-ML , 1986, LFP '86.

[13]  Hugo Herbelin,et al.  The Coq proof assistant : reference manual, version 6.1 , 1997 .

[14]  J. Rouyer Développement de l'algorithme d'unification dans le calcul des constructions avec types inductifs , 1992 .

[15]  Xavier Leroy,et al.  Polymorphic typing of an algorithmic language , 1992 .

[16]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.