Gradual ownership types

  • Authors:
  • Ilya Sergey;Dave Clarke

  • Affiliations:
  • IBBT-DistriNet, Department of Computer Science, Katholieke Universiteit Leuven, Belgium;IBBT-DistriNet, Department of Computer Science, Katholieke Universiteit Leuven, Belgium

  • Venue:
  • ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Gradual Ownership Types are a framework allowing programs to be partially annotated with ownership types, while providing the same encapsulation guarantees. The formalism provides a static guarantee of the desired encapsulation property for fully annotated programs, and dynamic guarantees for partially annotated programs via dynamic checks inserted by the compiler. This enables a smooth migration from ownership-unaware to ownership-typed code. The paper provides a formal account of gradual ownership types. The theoretical novelty of this work is in adapting the notion of gradual type system with respect to program heap properties, which, unlike types in functional languages or object calculi, impose restrictions not only on data, but also on the environment the data is being processed in. From the practical side, we evaluate applicability of Gradual Ownership Types for Java 1.4 in the context of the Java Collection Framework and measure the necessary amount of annotations for ensuring the owners-as-dominators invariant.