Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types

  • Hyeonseung Im
  • Keiko Nakata
  • Sungwoo Park
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7966)


Although theories of equivalence or subtyping for recursive types have been extensively investigated, sophisticated interaction between recursive types and abstract types has gained little attention. The key idea behind type theories for recursive types is to use syntactic contractiveness, meaning every μ-bound variable occurs only under a type constructor such as → or ∗. This syntactic contractiveness guarantees the existence of the unique solution of recursive equations and thus has been considered necessary for designing a sound theory for recursive types. However, in an advanced type system, such as OCaml, with recursive types, type parameters, and abstract types, we cannot easily define the syntactic contractiveness of types. In this paper, we investigate a sound type system for recursive types, type parameters, and abstract types. In particular, we develop a new semantic notion of contractiveness for types and signatures using mixed induction and coinduction, and show that our type system is sound with respect to the standard call-by-value operational semantics, which eliminates signature sealings. Moreover we show that while non-contractive types in signatures lead to unsoundness of the type system, they may be allowed in modules. We have also formalized the whole system and its type soundness proof in Coq.


Type System Operational Semantic Type Constructor Type Soundness Contractive Signature 
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.
  2. 2.
    Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)CrossRefGoogle Scholar
  3. 3.
    Brandt, M., Henglein, F.: Coinductive axiomatization of recursive type equality and subtyping. In: de Groote, P., Hindley, J.R. (eds.) TLCA 1997. LNCS, vol. 1210, pp. 63–81. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  4. 4.
    Crary, K., Harper, R., Puri, S.: What is a recursive module? In: PLDI 1999 (1999)Google Scholar
  5. 5.
    Danielsson, N.A., Altenkirch, T.: Subtyping, declaratively: an exercise in mixed induction and coinduction. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 100–118. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Gapeyev, V., Levin, M.Y., Pierce, B.C.: Recursive subtyping revealed. Journal of Functional Programming 12(6), 511–548 (2002)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Im, H., Nakata, K., Garrigue, J., Park, S.: A syntactic type system for recursive modules. In: OOPSLA 2011 (2011)Google Scholar
  8. 8.
    Komendantsky, V.: Subtyping by folding an inductive relation into a coinductive one. In: Peña, R., Page, R. (eds.) TFP 2011. LNCS, vol. 7193, pp. 17–32. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  9. 9.
    MacQueen, D., Plotkin, G., Sethi, R.: An ideal model for recursive polymorphic types. In: POPL 1984 (1984)Google Scholar
  10. 10.
    Mendler, N.P.: Inductive types and type constraints in the second-order lambda calculus. Annals of Pure and Applied Logic 51(1-2), 159–172 (1991)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). The MIT Press (1997)Google Scholar
  12. 12.
    Montagu, B.: Programming with first-class modules in a core language with subtyping, singleton kinds and open existential types. PhD thesis, École Polytechnique, Palaiseau, France (December 2010)Google Scholar
  13. 13.
    Montagu, B., Rémy, D.: Modeling abstract types in modules with open existential types. In: POPL 2009 (2009)Google Scholar
  14. 14.
    Nakata, K., Uustalu, T.: Resumptions, weak bisimilarity and big-step semantics for While with interactive I/O: An exercise in mixed induction-coinduction. In: SOS 2010, pp. 57–75 (2010)Google Scholar
  15. 15.
    Rossberg, A., Dreyer, D.: Mixin’ up the ML module system. ACM Transactions on Programming Languages and Systems 35(1), 2:1–2:84 (2013)Google Scholar
  16. 16.
    Sénizergues, G.: The equivalence problem for deterministic pushdown automata is decidable. In: Degano, P., Gorrieri, R., Marchetti-Spaccamela, A. (eds.) ICALP 1997. LNCS, vol. 1256, pp. 671–681. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  17. 17.
    Solomon, M.: Type definitions with parameters (extended abstract). In: POPL 1978 (1978)Google Scholar
  18. 18.
    Stone, C.A., Schoonmaker, A.P.: Equational theories with recursive types (2005),

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Hyeonseung Im
    • 1
  • Keiko Nakata
    • 2
  • Sungwoo Park
    • 3
  1. 1.LRIUniversité Paris-Sud 11OrsayFrance
  2. 2.Institute of CyberneticsTallinn University of TechnologyEstonia
  3. 3.Pohang University of Science and TechnologyRepublic of Korea

Personalised recommendations