Type Inference with Selftype

Authors

  • Jens Palsberg

DOI:

https://doi.org/10.7146/brics.v2i34.19937

Abstract

The metavariable self is fundamental in object-oriented languages.
Typing self in the presence of inheritance has been studied by Abadi
and Cardelli, Bruce, and others. A key concept in these developments
is the notion of selftype, which enables flexible type annotations that
are impossible with recursive types and subtyping. Bruce et al. demonstrated
that, for the language TOOPLE, type checking is decidable.
Open until now is the problem of type inference with selftype.
In this paper we present a type inference algorithm for a type
system with selftype, recursive types, and subtyping. The example
language is the object calculus of Abadi and Cardelli, and the type
inference algorithm runs in nondeterministic polynomial time.

Downloads

Published

1995-06-04

How to Cite

Palsberg, J. (1995). Type Inference with Selftype. BRICS Report Series, 2(34). https://doi.org/10.7146/brics.v2i34.19937