2,995 research outputs found

    Translating Generalized Algebraic Data Types to System F

    Get PDF
    Generalized algebraic data types (GADTs) extend ordinary algebraic data types by refining the types of constructors with syntactic equality constraints. This is highly useful and allows for novel applications such as strongly-typed evaluators, typed LR parsing etc. To translate GADTs we need to enrich the System F style typed intermediate languages of modern language implementations to capture these equality constraints. We show that GADTs can be translated to a minor extension of System F where type equality proofs are compiled into System F typable proof terms. At run-time proof terms evaluate to the identity. Hence, they can be safely erased before execution of the program. We provide evidence that our approach scales to deal with extensions where equality is not anymore syntactic. The benefit of our method is that type checking of target programs remains as simple as type checking in System F. Thus, we can offer a light-weight approach to integrate GADTs and extensions of it into existing implementations

    Practical Theory Extension in Event-B

    No full text
    Abstract. The Rodin tool for Event-B supports formal modelling and proof using a mathematical language that is based on predicate logic and set theory. Although Rodin has in-built support for a rich set of operators and proof rules, for some application areas there may be a need to extend the set of operators and proof rules supported by the tool. This paper outlines a new feature of the Rodin tool, the theory component, that allows users to extend the mathematical language supported by the tool. Using theories, Rodin users may define new data types and polymorphic operators in a systematic and practical way. Theories also allow users to extend the proof capabilities of Rodin by defining new proof rules that get incorporated into the proof mechanisms. Soundness of new definitions and rules is provided through validity proof obligations.

    A Light Modality for Recursion

    Full text link
    We investigate the interplay between a modality for controlling the behaviour of recursive functional programs on infinite structures which are completely silent in the syntax. The latter means that programs do not contain "marks" showing the application of the introduction and elimination rules for the modality. This shifts the burden of controlling recursion from the programmer to the compiler. To do this, we introduce a typed lambda calculus a la Curry with a silent modality and guarded recursive types. The typing discipline guarantees normalisation and can be transformed into an algorithm which infers the type of a program.Comment: 32 pages 1 figure in pdf forma

    Read Operators and their Expressiveness in Process Algebras

    Full text link
    We study two different ways to enhance PAFAS, a process algebra for modelling asynchronous timed concurrent systems, with non-blocking reading actions. We first add reading in the form of a read-action prefix operator. This operator is very flexible, but its somewhat complex semantics requires two types of transition relations. We also present a read-set prefix operator with a simpler semantics, but with syntactic restrictions. We discuss the expressiveness of read prefixes; in particular, we compare them to read-arcs in Petri nets and justify the simple semantics of the second variant by showing that its processes can be translated into processes of the first with timed-bisimilar behaviour. It is still an open problem whether the first algebra is more expressive than the second; we give a number of laws that are interesting in their own right, and can help to find a backward translation.Comment: In Proceedings EXPRESS 2011, arXiv:1108.407

    On duality relations for session types

    Get PDF
    Session types are a type formalism used to describe communication protocols over private session channels. Each participant in a binary session owns one endpoint of a session channel. A key notion is that of duality: the endpoints of a session channel should have dual session types in order to guarantee communication safety. Duality relations have been independently defined in different ways and different works, without considering their effect on the type system. In this paper we systematically study the existing duality relations and some new ones, and compare them in order to understand their expressiveness. The outcome is that those relations are split into two groups, one related to the na¨ıve inductive duality, and the other related to a notion of mutual compliance, which we borrow from the literature on contracts for web-services
    • …
    corecore