Run-Time Type Information and Casting

Author(s):  
Graham M. Seed
Keyword(s):  
Run Time ◽  
Author(s):  
Tyson Dowd ◽  
Zoltan Somogyi ◽  
Fergus Henderson ◽  
Thomas Conway ◽  
David Jeffery
Keyword(s):  
Run Time ◽  

2002 ◽  
Vol 12 (6) ◽  
pp. 567-600 ◽  
Author(s):  
KARL CRARY ◽  
STEPHANIE WEIRICH ◽  
GREG MORRISETT

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 attened 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 run-time 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.


1999 ◽  
Vol 34 (3) ◽  
pp. 146-153
Author(s):  
Sheetal V. Kakkad ◽  
Mark S. Johnstone ◽  
Paul R. Wilson
Keyword(s):  
Run Time ◽  

1994 ◽  
Vol VII (3) ◽  
pp. 12-23 ◽  
Author(s):  
Shail Aditya ◽  
Christine H. Flood ◽  
James E. Hicks

2006 ◽  
Vol 16 (6) ◽  
pp. 681-710 ◽  
Author(s):  
STEPHANIE WEIRICH

Polytypic programming is a way of defining type-indexed operations, such as map, fold and zip, based on type information. Run-time polytypic programming allows that type information to be dynamically computed – this support is essential in modern programming languages that support separate compilation, first-class type abstraction, or polymorphic recursion. However, in previous work we defined run-time polytypic programming with a type-passing semantics. Although it is natural to define polytypic programs as operating over first-class types, such a semantics suffers from a number of drawbacks. This paper describes how to recast that work in a type-erasure semantics, where terms represent type information in a safe manner. The resulting language is simple and easy to implement – we present a prototype implementation of the necessary machinery as a small Haskell library.


2000 ◽  
Vol 25 (1) ◽  
pp. 58
Author(s):  
Susan Horwitz
Keyword(s):  
Run Time ◽  

2021 ◽  
Author(s):  
◽  
Constantine Dymnikov

<p>Object ownership allows us to statically control run-time aliasing in order to provide a strong notion of object encapsulation. Unfortunately in order to use ownership, code must first be annotated with extra type information. This imposes a heavy burden on the programmer, and has contributed to the slow adoption of ownership. Ownership inference is the process of reconstructing ownership type information based on the existing ownership patterns in code. This thesis presents OwnKit—an automatic ownership inference tool for Java. OwnKit conducts inference in a modular way: by only considering a single class at the time. The modularity makes our algorithm highly scalable in both time and memory usage.</p>


Sign in / Sign up

Export Citation Format

Share Document