English

Global Type Inference for Featherweight Generic Java

Programming Languages 2022-05-20 v2

Abstract

Java's type system mostly relies on type checking augmented with local type inference to improve programmer convenience. We study global type inference for Featherweight Generic Java (FGJ), a functional Java core language. Given generic class headers and field specifications, our inference algorithm infers all method types if classes do not make use of polymorphic recursion. The algorithm is constraint-based and improves on prior work in several respects. Despite the restricted setting, global type inference for FGJ is NP-complete.

Keywords

Cite

@article{arxiv.2205.08768,
  title  = {Global Type Inference for Featherweight Generic Java},
  author = {Andreas Stadelmeier and Martin Plümicke and Peter Thiemann},
  journal= {arXiv preprint arXiv:2205.08768},
  year   = {2022}
}

Comments

33 pages, abridged version appears in ECOOP 2022