Java Generics are Turing Complete
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.
- Publication:
-
arXiv e-prints
- Pub Date:
- May 2016
- DOI:
- 10.48550/arXiv.1605.05274
- arXiv:
- arXiv:1605.05274
- Bibcode:
- 2016arXiv160505274G
- Keywords:
-
- Computer Science - Programming Languages;
- D.3.3
- E-Print:
- POPL2017