Intensional polymorphism in type-erasure semantics
- 29 September 1998
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 34 (1) , 301-312
- https://doi.org/10.1145/291251.289459
Abstract
Intensional polymorphism, the ability to dispatch to different routines based on types at run time, enables a variety of advanced implementation techniques for polymorphic languages, including tag-free garbage collection, unboxed function arguments, polymorphic marshalling, and flattened data structures. To date, languages that support intensional polymorphism have required a type-passing (as opposed to type-erasure) interpretation where types are constructed and passed to polymorphic functions at run time. Unfortunately, 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 polymorphism, but avoids many of the disadvantages of type passing. In our approach, run-time type information is represented by ordinary terms. This avoids the duplication problem, allows us to recover abstraction, and avoids complications with closure conversion. In addition, our type system provides another improvement in expressiveness; it allows unknown types to be refined in place thereby avoiding certain beta-expansions required by other frameworks.This publication has 16 references indexed in Scilit:
- Flexible representation analysisPublished by Association for Computing Machinery (ACM) ,1997
- TILPublished by Association for Computing Machinery (ACM) ,1996
- From region inference to von Neumann machines via region representation inferencePublished by Association for Computing Machinery (ACM) ,1996
- Typed closure conversionPublished by Association for Computing Machinery (ACM) ,1996
- Compiling polymorphism using intensional type analysisPublished by Association for Computing Machinery (ACM) ,1995
- Abstract models of memory managementPublished by Association for Computing Machinery (ACM) ,1995
- Compiler-directed type reconstruction for polymorphic languagesPublished by Association for Computing Machinery (ACM) ,1993
- Abstract types have existential typeACM Transactions on Programming Languages and Systems, 1988
- The Type Theory of PL/CV3ACM Transactions on Programming Languages and Systems, 1984
- Une Extension De ĽInterpretation De Gödel a ĽAnalyse, Et Son Application a ĽElimination Des Coupures Dans ĽAnalyse Et La Theorie Des TypesPublished by Elsevier ,1971