Intensional polymorphism in type-erasure semantics

Citation
K. Crary et al., Intensional polymorphism in type-erasure semantics, ACM SIGPL N, 34(1), 1999, pp. 301-312
Citations number
28
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
34
Issue
1
Year of publication
1999
Pages
301 - 312
Database
ISI
SICI code
1523-2867(199901)34:1<301:IPITS>2.0.ZU;2-W
Abstract
Intensional polymorphism, the ability to dispatch to different routines bas ed on types at run time, enables a variety of advanced implementation techn iques for polymorphic languages, including tag-free garbage collection, unb oxed function arguments, polymorphic marshalling, and flattened data struct ures. To date, languages that support intensional polymorphism have require d a type-passing (as opposed to type-erasure) interpretation where types ar e constructed and passed to polymorphic functions at run time. Unfortunatel y, type-passing suffers from a number of drawbacks: it requires duplication of constructs at the term and type levels, it prevents abstraction, and it severely complicates polymorphic closure conversion. We present a type-theoretic framework that supports intensional polymorphis m, but avoids many of the disadvantages of type passing. In our approach, r un-time type information is represented by ordinary terms. This avoids the duplication problem, allows us to recover abstraction, and avoids complicat ions with closure conversion. In addition, our type system provides another improvement in expressiveness; it allows unknown types to be refined in pl ace thereby avoiding certain beta-expansions required by other frameworks.