Generativity and dynamic opacity for abstract types

The standard formalism for explaining abstract types is existential quantification. While it provides a sufficient model for type abstraction in entirely statically typed languages, it proves to be too weak for languages enriched with forms of dynamic typing, where parametricity is violated. As an alternative approach to type abstraction that addresses this shortcoming we present a calculus for dynamic type generation. It features an explicit construct for generating new type names and relies on coercions for managing abstraction boundaries between generated types and their designated representation. Sealing is represented as a generalized form of these coercions. The calculus maintains abstractions dynamically without restricting type analysis.

[1]  Xavier Leroy,et al.  Applicative functors and fully transparent higher-order modules , 1995, POPL '95.

[2]  Robert Harper,et al.  Compiling polymorphism using intensional type analysis , 1995, POPL '95.

[3]  Xavier Leroy,et al.  Dynamics in ML , 1991, Journal of Functional Programming.

[4]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[5]  Andrew M. Pitts,et al.  Parametric polymorphism and operational equivalence , 2000, Mathematical Structures in Computer Science.

[6]  Zhong Shao,et al.  Fully reflexive intensional type analysis , 2000, ICFP '00.

[7]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[8]  Stephanie Weirich,et al.  Type-safe cast: (functional pearl) , 2000, ICFP '00.

[9]  Robin Milner,et al.  Definition of standard ML , 1990 .

[10]  Peter Sewell Modules, abstract types, and distributed versioning , 2001, POPL '01.

[11]  Niklaus Wirth,et al.  Programming in Modula-2 , 1985, Texts and Monographs in Computer Science.

[12]  Claudio V. Russo Types for Modules , 2004, Electronic Notes in Theoretical Computer Science.

[13]  Luca Cardelli,et al.  Modula-3 language definition , 1992, SIGP.

[14]  Luca Cardelli,et al.  Abstract Types and the Dot Notation , 1990, Programming Concepts and Methods.

[15]  Pierre Weis,et al.  Extensional polymorphism , 1995, POPL 1995.

[16]  Craig Schaffert,et al.  CLU Reference Manual , 1984, Lecture Notes in Computer Science.

[17]  Neal Glew Type dispatch for named hierarchical types , 1999, ICFP '99.

[18]  Stephanie Weirich Type-FUNCTIONAL PEARL safe cast , 2004 .

[19]  Davide Sangiorgi,et al.  The Pi-Calculus - a theory of mobile processes , 2001 .

[20]  Martín Abadi,et al.  Dynamic typing in polymorphic languages , 1995, Journal of Functional Programming.

[21]  Christopher Strachey,et al.  Fundamental Concepts in Programming Languages , 2000, High. Order Symb. Comput..

[22]  John C. Mitchell,et al.  On the Equivalence of Data Representations , 1991, Artificial and Mathematical Theory of Computation.

[23]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

[24]  Derek Dreyer,et al.  A type system for higher-order modules , 2003, POPL '03.

[25]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[26]  M. Lillibridge Translucent Sums: A Foundation for Higher-Order Module Systems , 1997 .

[27]  I. Stark,et al.  On the Observable Properties of Higher Order Functions that Dynamically Create Local Names (Preliminary Report) , 1993 .

[28]  Dan Grossman,et al.  Syntactic type abstraction , 2000, TOPL.

[29]  Stephanie Weirich,et al.  Type-safe cast , 2004, J. Funct. Program..

[30]  Benjamin C. Pierce,et al.  Relating Cryptography and Polymorphism , 2000 .

[31]  Andrew M. Pitts Existential Types: Logical Relations and Operational Equivalence , 1998, ICALP.

[32]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.