skip to main content
research-article

Modeling abstract types in modules with open existential types

Published: 21 January 2009 Publication History

Abstract

We propose F-zip, a calculus of open existential types that is an extension of System F obtained by decomposing the introduction and elimination of existential types into more atomic constructs. Open existential types model modular type abstraction as done in module systems. The static semantics of F-zip adapts standard techniques to deal with linearity of typing contexts, its dynamic semantics is a small-step reduction semantics that performs extrusion of type abstraction as needed during reduction, and the two are related by subject reduction and progress lemmas. Applying the Curry-Howard isomorphism, F-zip can be also read back as a logic with the same expressive power as second-order logic but with more modular ways of assembling partial proofs. We also extend the core calculus to handle the double vision problem as well as type-level and term-level recursion. The resulting language turns out to be a new formalization of (a minor variant of) Dreyer's internal language for recursive and mixin modules.

References

[1]
Luca Cardelli and Xavier Leroy. Abstract types and the dot notation. In M. Broy and C. B. Jones, editors, Proceedings IFIP TC2 working conference on programming concepts and methods, pages 479--504. North-Holland, 1990.
[2]
Derek Dreyer. Recursive type generativity. Journal of Functional Programming, pages 433--471, 2007.
[3]
Derek Dreyer. A type system for recursive modules. In Proceedings of ACM SIGPLAN International Conference on Functional Programming, pages 289--302, 2007.
[4]
Derek Dreyer, Karl Crary, and Robert Harper. A type system for higher-order modules. In Proceedings of ACM SIGPLAN Symposium on Principles of Programming Languages, pages 236--249, 2003.
[5]
Matthew Flatt and Matthias Felleisen. Units: Cool modules for hot languages. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 236--248, 1998.
[6]
Robert Harper and Mark Lillibridge. A type-theoretic approach to higher-order modules with sharing. In Proceedings of ACM SIGPLAN Symposium on Principles of Programming Languages, pages 123--137, New York, NY, USA, 1994. ACM.
[7]
Robert Harper, John C. Mitchell, and Eugenio Moggi. Higher-order modules and the phase distinction. In Proceedings of ACM SIGPLAN Symposium on Principles of Programming Languages, pages 341--354, San Francisco, CA, January 1990.
[8]
Robert Harper and Benjamin C. Pierce. Design considerations for ML-style module systems. In Benjamin C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 8, pages 293--345. The MIT Press, 2005.
[9]
Daniel K. Lee, Karl Crary, and Robert Harper. Towards a mechanized metatheory of Standard ML. SIGPLAN Not., 42(1):173--184, 2007.
[10]
A syntactic theory of type generativity and sharing. Journal of Functional Programming, 6(5):667--698, 1996.
[11]
Xavier Leroy, Damien Doligez, Jacques Garrigue, Didier Remy, and Jerome Vouillon. The Objective Caml system release 3.10. INRIA, May 2007.
[12]
David MacQueen. Modules for Standard ML. In ACM Symposium on LISP and functional programming, pages 198--207, New York, NY, USA, 1984. ACM.
[13]
Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). The MIT Press, May 1997.
[14]
John C. Mitchell and Gordon D. Plotkin. Abstract types have existential type. ACM Trans. Program. Lang. Syst., 10(3):470--502, 1988.
[15]
Benoit Montagu and Didier Remy. Towards a simpler account of modules and generativity: Abstract types have Open existential types. Available at http://gallium.inria.fr/remy/modules/, March 2008.
[16]
Martin Odersky, Vincent Cremet, Christine Rockl, and Matthias Zenger. A nominal theory of objects with dependent types. In Proceedings of European Conference on Object-Oriented Programming, pages 201--224, 2003.
[17]
Gilles Peskine. Abstract types in collaborative programs. PhD thesis, Universite Paris VII -- Denis Diderot, June 2008.
[18]
John C. Reynolds. Types, abstraction and parametric polymorphism. In Information Processing 83, pages 513--523. Elsevier Science, 1983.
[19]
Sergei Romanenko, Claudio Russo, and Peter Sestoft. Moscow ML Owner's Manual, June 2000.
[20]
Andreas Rossberg. Generativity and dynamic opacity for abstract types. In Proceedings of ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pages 241--252, Uppsala, Sweden, September 2003.
[21]
Claudio V. Russo. Types for modules. Electronic Notes in Theoretical Computer Science, 60, January 2003.
[22]
Christopher A. Stone and Robert Harper. Deciding type equivalence in a language with singleton kinds. In Proceedings of ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pages 214--227, Boston, January 2000.
[23]
Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38--94, 1994.

Cited By

View all
  • (2024)Fulfilling OCaml Modules with TransparencyProceedings of the ACM on Programming Languages10.1145/36498188:OOPSLA1(194-222)Online publication date: 29-Apr-2024
  • (2024)The existential fragment of second-order propositional intuitionistic logic is undecidableJournal of Applied Non-Classical Logics10.1080/11663081.2024.231277434:1(55-74)Online publication date: 6-Mar-2024
  • (2021)CPS transformation with affine types for call-by-value implicit polymorphismProceedings of the ACM on Programming Languages10.1145/34736005:ICFP(1-30)Online publication date: 19-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2009
464 pages
ISBN:9781605583792
DOI:10.1145/1480881
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 1
    POPL '09
    January 2009
    453 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1594834
    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: 21 January 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. abstract types
  2. existential types
  3. generativity
  4. lambda-calculus
  5. linear type systems
  6. modularity
  7. modules
  8. type systems

Qualifiers

  • Research-article

Conference

POPL09

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)4
  • Downloads (Last 6 weeks)1
Reflects downloads up to 22 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Fulfilling OCaml Modules with TransparencyProceedings of the ACM on Programming Languages10.1145/36498188:OOPSLA1(194-222)Online publication date: 29-Apr-2024
  • (2024)The existential fragment of second-order propositional intuitionistic logic is undecidableJournal of Applied Non-Classical Logics10.1080/11663081.2024.231277434:1(55-74)Online publication date: 6-Mar-2024
  • (2021)CPS transformation with affine types for call-by-value implicit polymorphismProceedings of the ACM on Programming Languages10.1145/34736005:ICFP(1-30)Online publication date: 19-Aug-2021
  • (2021)An existential crisis resolved: type inference for first-class existential typesProceedings of the ACM on Programming Languages10.1145/34735695:ICFP(1-29)Online publication date: 19-Aug-2021
  • (2016)A Lazy Language Needs a Lazy Type SystemProceedings of the 28th Symposium on the Implementation and Application of Functional Programming Languages10.1145/3064899.3064906(1-12)Online publication date: 31-Aug-2016
  • (2013)Mixin’ Up the ML Module SystemACM Transactions on Programming Languages and Systems10.1145/2450136.245013735:1(1-84)Online publication date: 1-Apr-2013
  • (2011)A syntactic type system for recursive modulesACM SIGPLAN Notices10.1145/2076021.204814146:10(993-1012)Online publication date: 22-Oct-2011
  • (2011)A syntactic type system for recursive modulesProceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications10.1145/2048066.2048141(993-1012)Online publication date: 22-Oct-2011
  • (2011)Generative type abstraction and type-level computationProceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/1926385.1926411(227-240)Online publication date: 26-Jan-2011
  • (2011)Generative type abstraction and type-level computationACM SIGPLAN Notices10.1145/1925844.192641146:1(227-240)Online publication date: 26-Jan-2011
  • Show More Cited By

View Options

Get Access

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