Relaxing the Value Restriction

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


Restricting polymorphism to values is now the standard way to obtain soundness in ML-like programming languages with imperative features. While this solution has undeniable advantages over previous approaches, it forbids polymorphism in many cases where it would be sound. We use a subtyping based approach to recover part of this lost polymorphism, without changing the type algebra itself, and this has significant applications.


Type System Type Variable Polymorphic Variant Reduction Rule Typing Rule 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Wright, A.K.: Simple imperative polymorphism. Lisp and Symbolic Computation 8 (1995)Google Scholar
  2. 2.
    Garrigue, J.: Relaxing the value restriction (extended version). RIMS Preprint 1444, Research Institute for Mathematical Sciences, Kyoto University (2004),
  3. 3.
    Tofte, M.: Type inference for polymorphic references. Information and Computation 89, 1–34 (1990)zbMATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Milner, R., Tofte, M., Harper, R.: The Definition of Standard ML. MIT Press, Cambridge (1990)Google Scholar
  5. 5.
    Greiner, J.: SML weak polymorphism can be sound. Technical Report CMU-CS-93-160R, Canegie-Mellon University, School of Computer Science (1993)Google Scholar
  6. 6.
    Hoang, M., Mitchell, J., Viswanathan, R.: Standard ML-NJ weak polymorphism and imperative constructs. In: Proc. IEEE Symposium on Logic in Computer Science, pp. 15–25 (1993)Google Scholar
  7. 7.
    Talpin, J.P., Jouvelot, P.: The type and effect discipline. In: Proc. IEEE Symposium on Logic in Computer Science, pp. 162–173 (1992)Google Scholar
  8. 8.
    Leroy, X., Weis, P.: Polymorphic type inference and assignment. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 291–302 (1991)Google Scholar
  9. 9.
    Leroy, X.: Polymorphic typing of an algorithmic language. Research report 1778, INRIA (1992)Google Scholar
  10. 10.
    Rémy, D., Vouillon, J.: Objective ML: A simple object-oriented extension of ML. In: Proc. ACM Symposium on Principles of Programming Languages, pp. 40–53 (1997)Google Scholar
  11. 11.
    Garrigue, J.: Programming with polymorphic variants. In: ML Workshop, Baltimore (1998)Google Scholar
  12. 12.
    Garrigue, J., Rémy, D.: Extending ML with semi-explicit higher order polymorphism. Information and Computation 155, 134–171 (1999)zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Ohori, A., Yoshida, N.: Type inference with rank 1 polymorphism for type-directed compilation of ML. In: Proc. International Conference on Functional Programming. ACM Press, New York (1999)Google Scholar
  14. 14.
    Leroy, X., Doligez, D., Garrigue, J., Rémy, D., Vouillon, J.: The Objective Caml system release 3.06, Documentation and user’s manual. Projet Cristal, INRIA (2002)Google Scholar
  15. 15.
    Garrigue, J.: Simple type inference for structural polymorphism. In: The Ninth International Workshop on Foundations of Object-Oriented Languages, Portland, Oregon (2002)Google Scholar
  16. 16.
    Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Information and Computation 115, 38–94 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Pottier, F.: A semi-syntactic soundness proof for HM(X). Research Report 4150, INRIA (2001)Google Scholar
  18. 18.
    Odersky, M., Sulzmann, M., Wehr, M.: Type inference with constrained types. Theory and Practice of Object Systems 5, 35–55 (1999)CrossRefGoogle Scholar
  19. 19.
    Skalka, C., Pottier, F.: Syntactic type soundness for HM(X). In: Proceedings of the 2002 Workshop on Types in Programming (TIP 2002), Dagstuhl, Germany. Electronic Notes in Theoretical Computer Science, vol. 75 (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Jacques Garrigue
    • 1
  1. 1.Research Institute for Mathematical SciencesKyoto UniversitySakyo-ku, Kyoto

Personalised recommendations