首页    期刊浏览 2025年12月04日 星期四
登录注册

文章基本信息

  • 标题:Type Inference with Selftype
  • 本地全文:下载
  • 作者:Jens Palsberg
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:1995
  • 卷号:2
  • 期号:34
  • 出版社:Aarhus University
  • 摘要: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.
国家哲学社会科学文献中心版权所有