License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2017.18
URN: urn:nbn:de:0030-drops-72628
Go to the corresponding LIPIcs Volume Portal

Kuci, Edlira ; Erdweg, Sebastian ; Bracevac, Oliver ; Bejleri, Andi ; Mezini, Mira

A Co-contextual Type Checker for Featherweight Java

LIPIcs-ECOOP-2017-18.pdf (0.6 MB)


This paper addresses compositional and incremental type checking for object-oriented programming languages. Recent work achieved incremental type checking for structurally typed functional languages through co-contextual typing rules, a constraint-based formulation that removes any context dependency for expression typings. However, that work does not cover key features of object-oriented languages: Subtype polymorphism, nominal typing, and implementation inheritance. Type checkers encode these features in the form of class tables, an additional form of typing context inhibiting incrementalization.

In the present work, we demonstrate that an appropriate co-contextual notion to class tables exists, paving the way to efficient incremental type checkers for object-oriented languages. This yields a novel formulation of Igarashi et al.'s Featherweight Java (FJ) type system, where we replace class tables by the dual concept of class table requirements and class table operations by dual operations on class table requirements. We prove the equivalence of FJ's type system and our co-contextual formulation. Based on our formulation, we implemented an incremental FJ type checker and compared its performance against javac on a number of realistic example programs.

BibTeX - Entry

  author =	{Edlira Kuci and Sebastian Erdweg and Oliver Bracevac and Andi Bejleri and Mira Mezini},
  title =	{{A Co-contextual Type Checker for Featherweight Java }},
  booktitle =	{31st European Conference on Object-Oriented Programming (ECOOP 2017)},
  pages =	{18:1--18:26},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-035-4},
  ISSN =	{1868-8969},
  year =	{2017},
  volume =	{74},
  editor =	{Peter M{\"u}ller},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{},
  URN =		{urn:nbn:de:0030-drops-72628},
  doi =		{10.4230/LIPIcs.ECOOP.2017.18},
  annote =	{Keywords: type checking, co-contextual, constraints, class table, Featherweight Java}

Keywords: type checking, co-contextual, constraints, class table, Featherweight Java
Collection: 31st European Conference on Object-Oriented Programming (ECOOP 2017)
Issue Date: 2017
Date of publication: 16.06.2017

DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI