Corrective hints for type incorrect generic Java programs

  • Authors:
  • Nabil El Boustani;Jurriaan Hage

  • Affiliations:
  • Universiteit Utrecht, Utrecht, Netherlands;Universiteit Utrecht, Utrecht, Netherlands

  • Venue:
  • Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Since version 1.5, generics (parametric polymorphism) are part of the Java language. Experience with implementations of the Java Language Specification such as EJC and JAVAC has shown that the type error messages provided by these tools leave more than a little to be desired. Type error messages are often uninformative and sometimes show artifacts of the type checking process in the messages. Apparently, providing good type error messages for a language as large and complex as Java currently is, is not easy. To alleviate the problem, we describe a number of heuristics that suggest fixes for generic method invocations in Generic Java, and illustrate their effect by means of examples. The heuristics are part of an extension to the original type checking process that has been implemented into the JastAdd Extensible Java Compiler.