2 research outputs found

    Inference, Targeting and Compatibility in a Type System for Java with SAM Typed Closures

    No full text
    Abstract. In this paper we consider the new type structure that has been pro- posed for Java closures, in the last Java Specification Language [BS11a]. This structure uses SAM types that are in fact, nominal types instead of the struc- tural, functional types, used in the previous, proposals. In addition, it allows type inference for closures and for closure arguments. Through a technique, al- ready consolidated in previous studies in Java extensions, we extend the calculus FGJ, [IPW01], with interfaces, anonymous classes, closures of the new form and SAM types. We define a type system and a reduction semantics for this calculus FGATCJ. Using the type system, we formalize the notions of closure context, target type, compatibility type and closure type as they emerge in [BS11a]. Even- tually, we prove the soundness of the type system
    corecore