Advertisement

A Certified Implementation of ML with Structural Polymorphism

  • Jacques Garrigue
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)

Abstract

The type system of Objective Caml has many unique features, which make ensuring the correctness of its implementation difficult. One of these features is structurally polymorphic types, such as polymorphic object and variant types, which have the extra specificity of allowing recursion. We implemented in Coq a certified interpreter for Core ML extended with structural polymorphism and recursion. Along with type soundness of evaluation, soundness and principality of type inference are also proved.

Keywords

Type System Type Variable Dependent Type Type Inference Type Soundness 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 3–15 (2008)Google Scholar
  2. 2.
    Aydemir, B.E., Bohannon, A., Fairbairn, M., Foster, J.N., Pierce, B.C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S., Zdancewic, S.: Mechanized metatheory for the masses: The PoplMark challenge. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 50–65. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Barras, B.: Auto-validation d’un système de preuves avec familles inductives. Thèse de doctorat, Université Paris 7 (November 1999)Google Scholar
  4. 4.
    Crary, K., Harper, B.: Mechanized definition of Standard ML alpha release. Twelf proof scripts (August 2009)Google Scholar
  5. 5.
    Dubois, C.: Proving ML type soundness within Coq. In: Aagaard, M.D., Harrison, J. (eds.) TPHOLs 2000. LNCS, vol. 1869, pp. 126–144. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  6. 6.
    Dubois, C., Ménissier-Morain, V.: Certification of a type inference tool for ML: Damas-Milner within Coq. Journal of Automated Reasoning 23(3), 319–346 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Furuse, J.P., Garrigue, J.: A label-selective lambda-calculus with optional arguments and its compilation method. RIMS Preprint 1041, Research Institute for Mathematical Sciences, Kyoto University (October 1995)Google Scholar
  8. 8.
    Garrigue, J.: Simple type inference for structural polymorphism. In: The Ninth International Workshop on Foundations of Object-Oriented Languages, Portland, Oregon (2002)Google Scholar
  9. 9.
    Garrigue, J.: Relaxing the value restriction. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, Springer, Heidelberg (2004)CrossRefGoogle Scholar
  10. 10.
    Garrigue, J., Rémy, D.: Extending ML with semi-explicit higher order polymorphism. Information and Computation 155, 134–171 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Lee, D.K., Crary, K., Harper, R.: Towards a mechanized metatheory of standard ML. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 173–184 (January 2007)Google Scholar
  12. 12.
    Leroy, X., Doligez, D., Garrigue, J., Rémy, D., Vouillon, J.: The Objective Caml system release 3.11, Documentation and user’s manual. Projet Gallium, INRIA (November 2008)Google Scholar
  13. 13.
    Naraschewski, W., Nipkow, T.: Type inference verified: Algorithm W in Isabelle/HOL. Journal of Automated Reasoning 23, 299–318 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Oheimb, D.v., Nipkow, T.: Machine-checking the Java specification: Proving type-safety. In: Alves-Foss, J. (ed.) Formal Syntax and Semantics of Java. LNCS, vol. 1523, pp. 119–156. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  15. 15.
    Owens, S.: A sound semantics for OCaml light. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 1–15. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  16. 16.
    Paulson, L.: Verifying the unification algorithm in LCF. Science of Computer Programming 5, 143–169 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    The Coq Team. The Coq Proof Assistant, Version 8.2. INRIA (2009)Google Scholar
  18. 18.
    Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of typed scheme. In: Proc. ACM Symposium on Principles of Programming Languages (2008)Google Scholar
  19. 19.
    Urban, C., Nipkow, T.: Nominal verification of algorithm W. In: Huet, G., Lévy, J.-J., Plotkin, G. (eds.) From Semantics to Computer Science. Essays in Honour of Gilles Kahn, pp. 363–382. Cambridge University Press, Cambridge (2009)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Jacques Garrigue
    • 1
  1. 1.Graduate School of Mathematical SciencesNagoya UniversityChikusa-kuJapan

Personalised recommendations