752 research outputs found

    Game Semantics and Subtyping

    Get PDF
    Game Semantics is a relatively new framework for the description of the semantics of programming languages. By combining the mathematical elegance of Denotational Semantics with explicitly operational concepts, Game Semantics has made possible the direct and intuitive modelling of a large range of programming constructs. In this thesis, we show how Game Semantics is able to model subtyping. We start by designing an untyped λ-calculus with ground values that explicitly internalises the notion of typing error. We then equip this calculus with a rich typing system that includes quantification (both universal and existential) as well as recursive types. In a second part, we show how to interpret the untyped calculus; after equipping the domain of the interpretation with an ordering --- the liveness ordering --- loosely inspired from implication on process specifications, we show how our interpretation is both sound and computationally adequate. In a third part, we introduce a notion of game which we use for interpreting types, and show how the liveness ordering on games is suitable for interpreting subtyping. Finally, we prove that under the (unproved) assumption that recursive types are compatible with quantification, our interpretation is sound with respect to both subtyping and typing

    A Type System for First-Class Layers with Inheritance, Subtyping, and Swapping

    Get PDF
    Context-Oriented Programming (COP) is a programming paradigm to encourage modularization of context-dependent software. Key features of COP are layers---modules to describe context-dependent behavioral variations of a software system---and their dynamic activation, which can modify the behavior of multiple objects that have already been instantiated. Typechecking programs written in a COP language is difficult because the activation of a layer can even change objects' interfaces. Inoue et al. have informally discussed how to make JCop, an extension of Java for COP by Appeltauer et al., type-safe. In this article, we formalize a small COP language called ContextFJ<:_{<:} with its operational semantics and type system and show its type soundness. The language models main features of the type-safe version of JCop, including dynamically activated first-class layers, inheritance of layer definitions, layer subtyping, and layer swapping

    Dinaturality Meets Genericity: A Game Semantics of Bounded Polymorphism

    Get PDF
    We study subtyping and parametric polymorphism, with the aim of providing direct and tractable semantic representations of type systems with these expressive features. The liveness order uses the Player-Opponent duality of game semantics to give a simple representation of subtyping: we generalize it to include graphs extracted directly from second-order intuitionistic types, and use the resulting complete lattice to interpret bounded polymorphic types in the style of System F_<:, but with a more tractable subtyping relation. To extend this to a semantics of terms, we use the type-derived graphs as arenas, on which strategies correspond to dinatural transformations with respect to the canonical coercions ("on the nose" copycats) induced by the liveness ordering. This relationship between the interpretation of generic and subtype polymorphism thus provides the basis of the semantics of our type system

    Value Types in Eiffel

    Get PDF
    Identifies a number of problems with Eiffel's expanded types in modelling value types, and proposes a backward compatible syntactic extension, and a modified semantics. The latter is also shown to be (effectively) backward compatible, in the sense that existing programs would run unaffected if compilers implemented the new semantics. The benefits of the approach are discussed, including an elegant approach to rebuilding data structure libraries

    Liquid Intersection Types

    Full text link
    We present a new type system combining refinement types and the expressiveness of intersection type discipline. The use of such features makes it possible to derive more precise types than in the original refinement system. We have been able to prove several interesting properties for our system (including subject reduction) and developed an inference algorithm, which we proved to be sound.Comment: In Proceedings ITRS 2014, arXiv:1503.0437
    corecore