English

Java Generics are Turing Complete

Programming Languages 2016-11-08 v2

Abstract

This paper describes a reduction from the halting problem of Turing machines to subtype checking in Java. It follows that subtype checking in Java is undecidable, which answers a question posed by Kennedy and Pierce in 2007. It also follows that Java's type checker can recognize any recursive language, which improves a result of Gil and Levy from 2016. The latter point is illustrated by a parser generator for fluent interfaces.

Cite

@article{arxiv.1605.05274,
  title  = {Java Generics are Turing Complete},
  author = {Radu Grigore},
  journal= {arXiv preprint arXiv:1605.05274},
  year   = {2016}
}

Comments

POPL2017

R2 v1 2026-06-22T14:03:01.019Z