Gradual Typing for Objects

  • Jeremy Siek
  • Walid Taha
Conference paper

DOI: 10.1007/978-3-540-73589-2_2

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4609)
Cite this paper as:
Siek J., Taha W. (2007) Gradual Typing for Objects. In: Ernst E. (eds) ECOOP 2007 – Object-Oriented Programming. ECOOP 2007. Lecture Notes in Computer Science, vol 4609. Springer, Berlin, Heidelberg

Abstract

Static and dynamic type systems have well-known strengths and weaknesses. In previous work we developed a gradual type system for a functional calculus named \(\lambda^?_\to\). Gradual typing provides the benefits of both static and dynamic checking in a single language by allowing the programmer to control whether a portion of the program is type checked at compile-time or run-time by adding or removing type annotations on variables. Several object-oriented scripting languages are preparing to add static checking. To support that work this paper develops \(\mathbf{Ob}^{?}_{<:}\), a gradual type system for object-based languages, extending the Ob< : calculus of Abadi and Cardelli. Our primary contribution is to show that gradual typing and subtyping are orthogonal and can be combined in a principled fashion. We also develop a small-step semantics, provide a machine-checked proof of type safety, and improve the space efficiency of higher-order casts.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Jeremy Siek
    • 1
  • Walid Taha
    • 2
  1. 1.University of Colorado, Boulder, CO 80309, USA, and LogicBlox Inc., Atlanta, GA 30309USA
  2. 2.Rice University, Houston, TX 77005USA

Personalised recommendations