TY - JOUR AU - Palsberg, Jens PY - 1995/06/04 Y2 - 2024/03/28 TI - Type Inference with Selftype JF - BRICS Report Series JA - BRICS VL - 2 IS - 34 SE - Articles DO - 10.7146/brics.v2i34.19937 UR - https://tidsskrift.dk/brics/article/view/19937 SP - AB - The metavariable self is fundamental in object-oriented languages.<br />Typing self in the presence of inheritance has been studied by Abadi<br />and Cardelli, Bruce, and others. A key concept in these developments<br />is the notion of selftype, which enables flexible type annotations that<br />are impossible with recursive types and subtyping. Bruce et al. demonstrated<br />that, for the language TOOPLE, type checking is decidable.<br />Open until now is the problem of type inference with selftype.<br />In this paper we present a type inference algorithm for a type<br />system with selftype, recursive types, and subtyping. The example<br />language is the object calculus of Abadi and Cardelli, and the type<br />inference algorithm runs in nondeterministic polynomial time. ER -