Skip to main content

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

  • Conference paper
Automata, Languages, and Programming (ICALP 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7966))

Included in the following conference series:

Abstract

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.

An expanded version of this paper, containing detailed proofs and omitted definitions, and the Coq development are available at http://toccata.lri.fr/~im .

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. OCaml, http://caml.inria.fr/ocaml/

  2. Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  4. Crary, K., Harper, R., Puri, S.: What is a recursive module? In: PLDI 1999 (1999)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  6. Gapeyev, V., Levin, M.Y., Pierce, B.C.: Recursive subtyping revealed. Journal of Functional Programming 12(6), 511–548 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  7. Im, H., Nakata, K., Garrigue, J., Park, S.: A syntactic type system for recursive modules. In: OOPSLA 2011 (2011)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  9. MacQueen, D., Plotkin, G., Sethi, R.: An ideal model for recursive polymorphic types. In: POPL 1984 (1984)

    Google Scholar 

  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)

    Article  MathSciNet  MATH  Google Scholar 

  11. Milner, R., Tofte, M., Harper, R., MacQueen, D.: The Definition of Standard ML (Revised). The MIT Press (1997)

    Google Scholar 

  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. Montagu, B., Rémy, D.: Modeling abstract types in modules with open existential types. In: POPL 2009 (2009)

    Google Scholar 

  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. 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. 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)

    Chapter  Google Scholar 

  17. Solomon, M.: Type definitions with parameters (extended abstract). In: POPL 1978 (1978)

    Google Scholar 

  18. Stone, C.A., Schoonmaker, A.P.: Equational theories with recursive types (2005), http://www.cs.hmc.edu/~stone/publications.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Im, H., Nakata, K., Park, S. (2013). Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types. In: Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds) Automata, Languages, and Programming. ICALP 2013. Lecture Notes in Computer Science, vol 7966. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39212-2_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39212-2_28

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39211-5

  • Online ISBN: 978-3-642-39212-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics