by Mark Shields, Tim Sheard, Simon Peyton Jones
In Symposium on Principles of Programming Languages
http://www.cse.ogi.edu/~mbs/pub/dynamic_typing/dyntyping_tr.ps
Add To MetaCart
Abstract:
Dynamic typing extends statically typed languages with a universal datatype, simplifying programs which must manipulate other programs as data, such as distributed, persistent, interpretive and generic programs. Current approaches, however, limit the use of polymorphism in dynamic values, and can be syntactically awkward. We introduce a new approach to dynamic typing, based on staged computation, which allows a single type-reconstruction algorithm to execute partly at compile time and partly at run-time. This approach seamlessly extends a single type system to accommodate types that are only known at run-time, while still supporting both type inference and polymorphism. The system is significantly more expressive than other approaches. Furthermore it can be implemented efficiently; most of the type inference is done at compile-time, leaving only some residual unification for run-time. We demonstrate our approach by examples in a small polymorphic functional language, and present its type system, type reconstruction algorithm, and operational semantics. Our proposal could also be readily adapted to many other programming languages. 1
Citations
|
801
|
A theory of type polymorphism in programming
– Milner
- 1978
|
|
552
|
Partial evaluation and automatic program generation
– Jones, Gomard, et al.
- 1993
|
|
444
|
Lambda calculi with types
– Barendregt
- 1991
|
|
277
|
Abstract types have existential type
– Mitchell, Plotkin
- 1988
|
|
196
|
Type inclusion constraints and type inference
– Aiken, Wimmers
- 1993
|
|
177
|
Soft typing with conditional types
– Aiken, Wimmers, et al.
- 1994
|
|
176
|
A modal analysis of staged computation
– Davies, Pfenning
- 1996
|
|
151
|
Optimizing ML with run-time code generation
– Leone, Lee
- 1995
|
|
134
|
Soft typing
– Cartwright, Fagan
- 1991
|
|
124
|
Dynamic Typing in a Statically Typed Language
– Abadi, Cardelli, et al.
- 1991
|
|
117
|
The System F of Variable Types, Fifteen years later. Theoretical Computer Science,45:159-192
– Girard
- 1986
|
|
114
|
An extension of system F with subtyping
– Cardelli, Martini, et al.
- 1991
|
|
87
|
Putting type annotations to work
– Odersky, Läufer
- 1996
|
|
86
|
An Orthogonally Persistent Java
– Atkinson, Daynes, et al.
- 1996
|
|
78
|
Dynamic Typing in Polymorphic Languages
– Abadi, Cardelli, et al.
- 1992
|
|
49
|
Introduction to generalized type systems
– Barendregt
- 1991
|
|
49
|
Dynamics in ML
– Leroy, Mauny
- 1993
|
|
42
|
Extensional polymorphism
– Dubois, Rouaix, et al.
- 1995
|
|
36
|
Two-Level Functional Languages
– Nielson, Nielson
- 1992
|
|
26
|
A categorical account of two-level languages
– Moggi
- 1997
|
|
21
|
Report on the Programming Language Haskell (version 1.4) - draft
– Peterson, Hammond, et al.
- 1997
|
|
19
|
Safe polymorphic type inference for a dynamically typed language: translating Scheme to ML
– Henglein, Rehof
- 1995
|
|
13
|
The component object model specification
– Microsoft
- 1995
|
|
12
|
A temporal logic approach to binding-time analysis
– Davies
- 1996
|
|
7
|
A categorical account oftwo-level languages
– Moggi
- 1997
|
|
4
|
Thunks and the lambda-calculus
– Hatcliff, Danvy
- 1997
|
|
2
|
Persistence in the object-oriented database programming language VML
– Klas, Turau
- 1992
|
|
1
|
The component object model speci cation
– Microsoft
- 1995
|
|
1
|
Dynamic types in ML. (unpublished draft article
– Mycroft
- 1983
|