Well-typings for Javaλ

  • Authors:
  • Martin Plümicke

  • Affiliations:
  • Baden-Wuerttemberg Cooperative State University Stuttgart, Florianstraße, Horb

  • Venue:
  • Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the last decade Java has been extended by some features, which are well-known from functional programming languages. In Java 8 the language will be expanded by closures (λ-expressions). In our contribution we give a formal definition for an abstract syntax of a reduced language Javaλ with closures, define the type system, and formalize the subtyping relation. We define the set of types as an extension of the generic type definition for Java 5 types. Finally, we give a type inference system, which describes the typings of Javaλ expressions and statements and we present a type inference algorithm. The type inference algorithm is an adaptation of a type inference algorithm for a typed λ--calculus. The inferred types are well-typings. A well-typing is a conditional type for an expression, where the conditions are given by a set of consistent coercions.