skip to main content
10.1145/1190216.1190245acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Towards a mechanized metatheory of standard ML

Published: 17 January 2007 Publication History

Abstract

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.

References

[1]
H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. Elsevier, 1984.
[2]
Karl Crary and Susmit Sarkar. Foundational certified code in a metalogical framework. In Nineteenth International Conference on Automated Deduction, Miami, Florida, 2003. Extended version published as CMU technical report CMU-CS-03-108.
[3]
Luis Damas and Robin Milner. Principal type-schemes for functional programs. In Ninth ACM Symposium on Principles of Programming Languages, pages 207--212, Albuquerque, New Mexico, January 1982.
[4]
Joëlle Despeyroux, Amy Felty, and Andr'e Hirschowitz. Higher-order syntax in Coq. In 1995 International Conference on Typed Lambda Calculi and Applications, volume 905 of Lecture Notes in Computer Science, Edinburgh, April 1995. Springer-Verlag.
[5]
Derek Dreyer. Understanding and Evolving the ML Module System. PhD thesis, Carnegie Mellon University, School of Computer Science, Pittsburgh, Pennsylvania, May 2005.
[6]
Derek Dreyer, Karl Crary, and Robert Harper. A type system for higher-order modules. In Thirtieth ACM Symposium on Principles of Programming Languages, pages 236--249, New Orleans, Louisiana, January 2003.
[7]
Derek Dreyer, Robert Harper, Manuel M.T. Chakravarty, and Gabriele Keller. Modular type classes. Technical Report TR-2006-03, University of Chicago, April 2006.
[8]
Sophia Drossopoulou and Susan Eisenbach. Towards an operational semantics and proof of type soundness for Java. In Formal Syntax and Semantics of Java. Springer-Verlag, March 1998.
[9]
Sophia Drossopoulou, Tanya Valkevych, and Susan Eisenbach. Java type soundness revisited, September 2000 Technical report, Imperial College London.
[10]
Michael J. C. Gordon and Tom F. Melham. Introduction to HOL: A Theorem Proving Environment for Higher-Order Logic. Cambridge University Press, 1993.
[11]
Robert Harper. A simplified account of polymorphic references. Information Processing Letters, 51(4):201--206, 1994. Follow-up note in Information Processing Letters, 57(1), 1996.
[12]
Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the ACM, 40(1):143--184, January 1993.
[13]
Robert Harper and Daniel R. Licata. Mechanizing language definitions. Submitted for publication, April 2006.
[14]
Robert Harper and Mark Lillibridge. A type-theoretic approach to higher-order modules with sharing. In Twenty-First ACM Symposium on Principles of Programming Languages, pages 123--137, Portland, Oregon, January 1994.
[15]
Robert Harper, John C. Mitchell, and Eugenio Moggi. Higher-order modules and the phase distinction. In Seventeenth ACM Symposium on Principles of Programming Languages, pages 341--354, San Francisco, January 1990.
[16]
Robert Harper and Chris Stone. A type-theoretic interpretation of Standard ML. In Proof, Language and Interaction: Essays in Honour of Robin Milner. The MIT Press, 2000. Extended version published as CMU technical report CMU-CS-97-147.
[17]
Gerwin Klein and Tobias Nipkow. A machine-checked model for a Java-like language, virtual machine and compiler. Technical Report 0400001T.1, National ICT Australia, Sydney, March 2004.
[18]
Daniel K. Lee, Karl Crary, and Robert Harper. Mechanizing the metatheory of Standard ML. Technical Report CMU-CS-06-138, Carnegie Mellon University, School of Computer Science, 2006.
[19]
Xavier Leroy. Manifest types, modules and separate compilation. In Twenty-First ACM Symposium on Principles of Programming Languages, pages 109--122, Portland, Oregon, January 1994.
[20]
Xavier Leroy. Applicative functors and fully transparent higher-order modules. In Twenty-Second ACM Symposium on Principles of Programming Languages, San Francisco, January 1995.
[21]
Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). The MIT Press, Cambridge, Massachusetts, 1997.
[22]
Greg Morrisett, Matthias Felleisen, and Robert Harper. Abstract models of memory management. In Conference on Functional Programming Languages and Computer Architecture, pages 66--77, La Jolla, California, June 1995.
[23]
Lawrence C. Paulson. The foundation of a generic theorem prover. Journal of Automated Reasoning, 5:363--397, 1989.
[24]
Leaf Petersen. Certfying Compilation for Standard ML in a Type Analysis Framework. PhD thesis, Carnegie Mellon University, School of Computer Science, Pittsburgh, Pennsylvania, 2005.
[25]
Leaf Petersen, Perry Cheng, Robert Harper, and Chris Stone. Implementing the TILT internal language. Technical Report CMU-CS-00-180, Carnegie Mellon University, School of Computer Science, December 2000.
[26]
Frank Pfenning. Computation and deduction. Lecture notes, available electronically at http://www.cs.cmu.edu/char"7Etwelf.
[27]
Frank Pfenning and Carsten Schürmann. Twelf User's Guide, Version 1.4, 2002. Available electronically at http://www.cs.cmu.edu/char"7Etwelf.
[28]
Brigitte Pientka and Frank Pfenning. Termination and reduction checking in the logical framework. In Workshop of Automation of Proofs by Mathematical Induction, June 2000.
[29]
Benjamin Pierce and Martin Steffen. Higher-order subtyping. Theoretical Computer Science, 176(1--2):235--282, 1997.
[30]
Benjamin C. Pierce. Types and Programming Languages, chapter 13. The MIT Press, 2002.
[31]
Gordon D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, University of Aarhus, 1981.
[32]
John C. Reynolds. The essence of Algol. In J. W. de Bakker and J. C. van Vliet, editors, Proceedings of the International Symposium on Algorithmic Languages, pages 345--372, Amsterdam, October 1981. North-Holland.
[33]
Jeffrey Sarnat and Carsten Schürmann. A proof-theoretic account of logical relations. Submitted for publication, 2006.
[34]
Christopher A. Stone. Singleton Kinds and Singleton Types. PhD thesis, Carnegie Mellon University, School of Computer Science, Pittsburgh, Pennsylvania, August 2000.
[35]
Christopher A. Stone and Robert Harper. Extensional equivalence and singleton types. ACM Transactions on Computational Logic, 2006? To appear. An earlier version appeared in the 2000 Symposium on Principles of Programming Languages.
[36]
Donald Syme. Reasoning with the formal definition of Standard ML in HOL. In Sixth International Workshop on Higher Order Logic Theorem Proving and its Applications, pages 43--60, Vancouver, August 1993.
[37]
D. Tarditi, G. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A type-directed optimizing compiler for ML. In 1996 SIGPLAN Conference on Programming Language Design and Implementation, pages 181--192, May 1996.
[38]
Myra VanInwegen. The Machine-Assisted Proof of Programming Language Properties. PhD thesis, University of Pennsylvania, Philadelphia, Pennsylvania, May 1996.
[39]
Myra VanInwegen and Elsa Gunter. Hol-ml. In Sixth International Workshop on Higher Order Logic Theorem Proving and its Applications, pages 61--74, Vancouver, August 1993.
[40]
Kevin Watkins, Iliano Cervesato, Frank Pfenning, and David Walker. A concurrent logical framework: The propositional fragment. In S. Berardi, M. Coppo, and F. Damiani, editors, Types for Proofs and Programs, volume 3085 of Lecture Notes in Computer Science, pages 355--377. Springer-Verlag, 2004. Papers from the Third International Workshop on Types for Proofs and Programs, April 2003, Torino, Italy.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '07: Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2007
400 pages
ISBN:1595935754
DOI:10.1145/1190216
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 1
    Proceedings of the 2007 POPL Conference
    January 2007
    379 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1190215
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 January 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. language definitions
  2. logical frameworks
  3. mechanized metatheory
  4. standard ML
  5. twelf
  6. type safety

Qualifiers

  • Article

Conference

POPL07

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)1
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media