Towards a mechanized metatheory of standard ML

We present an internal language with equivalent expressive power to Standard ML, and discuss its formalization in LF and the machine-checked verification of its type safety in Twelf. The internal language is intended to serve as the target of elaboration in an elaborative semantics for Standard ML in the style of Harper and Stone. Therefore, it includes all the programming mechanisms necessary to implement Standard ML, including translucent modules, abstraction, polymorphism, higher kinds, references, exceptions, recursive types, and recursive functions. Our successful formalization of the proof involved a careful interplay between the precise formulations of the various mechanisms, and required the invention of new representation and proof techniques of general interest.

[1]  John C. Mitchell,et al.  Higher-order modules and the phase distinction , 1989, POPL '90.

[2]  P. Cheng,et al.  Implementing the TILT Internal Language , 2000 .

[3]  Derek Dreyer,et al.  A type system for higher-order modules , 2003, POPL '03.

[4]  David Walker,et al.  A Concurrent Logical Framework: The Propositional Fragment , 2003, TYPES.

[5]  Mads Tofte,et al.  A Type-Theoretic Interpretation of Standard ML , 2000 .

[6]  Sophia Drossopoulou,et al.  Java Type Soundness Revisited , 2000 .

[7]  Lawrence C. Paulson,et al.  The foundation of a generic theorem prover , 1989, Journal of Automated Reasoning.

[8]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[9]  R. Harper,et al.  Singleton kinds and singleton types , 2000 .

[10]  Sophia Drossopoulou,et al.  Towards an Operational Semantics and Proof of Type Soundness for Java , 2007 .

[11]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[12]  Karl Crary,et al.  Foundational Certified Code in a Metalogical Framework , 2003, CADE.

[13]  Elsa L. Gunter,et al.  Hol-ml , 1993, HUG.

[14]  Frank Pfenning,et al.  Twelf User''s Guide , 2002 .

[15]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[16]  Frank Pfenning,et al.  Termination and Reduction Checking in the Logical Framework , 2000 .

[17]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

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

[19]  Tobias Nipkow,et al.  A machine-checked model for a Java-like language, virtual machine, and compiler , 2006, TOPL.

[20]  Karl Crary,et al.  A type system for higher-order modules , 2003, POPL '03.

[21]  Carl A. Gunter,et al.  The machine-assisted proof of programming language properties , 1996 .

[22]  Amy P. Felty,et al.  Higher-Order Abstract Syntax in Coq , 1995, TLCA.

[23]  Carsten Schürmann,et al.  A Proof-Theoretic Account of Logical Relations , 2005 .

[24]  Xavier Leroy,et al.  Applicative functors and fully transparent higher-order modules , 1995, POPL '95.

[25]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[26]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[27]  Frank Pfenning,et al.  Twelf User's Guide Version 1.2., , 1998 .

[28]  Robin Milner,et al.  Definition of standard ML , 1990 .

[29]  Robert Harper,et al.  A type-theoretic interpretation of standard ML , 2000, Proof, Language, and Interaction.

[30]  Robert Harper,et al.  Certifying compilation for standard ml in a type analysis framework , 2005 .

[31]  John C. Reynolds,et al.  The essence of ALGOL , 1997 .

[32]  Robert Harper,et al.  Extensional equivalence and singleton types , 2006, TOCL.

[33]  M. Gordon,et al.  Introduction to HOL: a theorem proving environment for higher order logic , 1993 .

[34]  Don Syme,et al.  Reasoning with the Formal Definition of Standard ML in HOL , 1993, HUG.

[35]  Benjamin C. Pierce,et al.  Higher-Order Subtyping , 1994, Theor. Comput. Sci..

[36]  R. Harper,et al.  Mechanizing the Metatheory of Standard ML ∗ , 2006 .

[37]  Manuel M. T. Chakravarty,et al.  Modular type classes , 2007, POPL '07.

[38]  Robert Harper,et al.  A Simplified Account of Polymorphic References , 1994, Inf. Process. Lett..

[39]  Matthias Felleisen,et al.  Abstract models of memory management , 1995, FPCA '95.

[40]  Karl Crary,et al.  Understanding and evolving the ml module system , 2005 .

[41]  Peter Lee,et al.  TIL: a type-directed, optimizing compiler for ML , 2004, SIGP.