License
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2017.18
URN: urn:nbn:de:0030-drops-72628
URL: http://drops.dagstuhl.de/opus/volltexte/2017/7262/
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

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


Abstract

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

@InProceedings{kuci_et_al:LIPIcs:2017:7262,
  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 =		{http://drops.dagstuhl.de/opus/volltexte/2017/7262},
  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
Seminar: 31st European Conference on Object-Oriented Programming (ECOOP 2017)
Issue Date: 2017
Date of publication: 13.06.2017


DROPS-Home | Fulltext Search | Imprint Published by LZI