Confined Gradual Typing

Allende E.; Fabry, J; García R; Tanter É.

Keywords: Gradual typing; Performance; Reliability

Abstract

Gradual typing combines static and dynamic typing flexibly and safely in a single programming language. To do so, gradually typed languages implicitly insert casts where needed, to ensure at runtime that typing assumptions are not violated by untyped code. However, the implicit nature of cast insertion, especially on higher-order values, can jeopardize reliability and efficiency: higher-order casts can fail at any time, and are costly to execute. We propose Confined Gradual Typing, which extends gradual typing with two new type qualifiers that let programmers control the flow of values between the typed and the untyped worlds, and thereby trade some flexibility for more reliability and performance. We formally develop two variants of Confined Gradual Typing that capture different flexibility/guarantee tradeoffs. We report on the implementation of Confined Gradual Typing in Gradualtalk, a gradually-typed Smalltalk, which confirms the performance advantage of avoiding unwanted higher-order casts and the low overhead of the approach.

Más información

Título según WOS: Confined Gradual Typing
Título según SCOPUS: Confined gradual typing
Título de la Revista: ACM SIGPLAN NOTICES
Volumen: 49
Número: 10
Editorial: ASSOC COMPUTING MACHINERY
Fecha de publicación: 2014
Página de inicio: 251
Página final: 270
Idioma: English
DOI:

10.1145/2660193.2660222

Notas: ISI, SCOPUS