{"title":"Well-typings for Javaλ","authors":"Martin Plümicke","doi":"10.1145/2093157.2093171","DOIUrl":null,"url":null,"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).\n 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.\n 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.\n 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.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2093157.2093171","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7
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.