428 research outputs found

    Safe Compositional Specification of Networking Systems: A Compositional Analysis Approach

    Full text link
    We present a type inference algorithm, in the style of compositional analysis, for the language TRAFFIC—a specification language for flow composition applications proposed in [2]—and prove that this algorithm is correct: the typings it infers are principal typings, and the typings agree with syntax-directed type checking on closed flow specifications. This algorithm is capable of verifying partial flow specifications, which is a significant improvement over syntax-directed type checking algorithm presented in [3]. We also show that this algorithm runs efficiently, i.e., in low-degree polynomial time.National Science Foundation (ITR ANI-0205294, ANI-0095988, ANI-9986397, EIA-0202067

    Principal typings and type inference

    Get PDF
    Thesis (Ph. D.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 1996.Includes bibliographical references (p. 115-120) and index.by Trevor Jim.Ph.D

    Principality and decidable type inference for finite-rank intersection types

    Full text link
    Principality of typings is the property that for each typable term, there is a typing from which all other typings are obtained via some set of operations. Type inference is the problem of finding a typing for a given term, if possible. We define an intersection type system which has principal typings and types exactly the strongly normalizable λ-terms. More interestingly, every finite-rank restriction of this system (using Leivant's first notion of rank) has principal typings and also has decidable type inference. This is in contrast to System F where the finite rank restriction for every finite rank at 3 and above has neither principal typings nor decidable type inference. This is also in contrast to earlier presentations of intersection types where the status of these properties is not known for the finite-rank restrictions at 3 and above.Furthermore, the notion of principal typings for our system involves only one operation, substitution, rather than several operations (not all substitution-based) as in earlier presentations of principality for intersection types (of unrestricted rank). A unification-based type inference algorithm is presented using a new form of unification, β-unification.NATO (CRG 97107); National Science Foundation (CCR-9417382); Engineering and Physical Sciences Research Council (GR/L 36963

    Principal Typings in a Restricted Intersection Type System for Beta Normal Forms with De Bruijn Indices

    Full text link
    The lambda-calculus with de Bruijn indices assembles each alpha-class of lambda-terms in a unique term, using indices instead of variable names. Intersection types provide finitary type polymorphism and can characterise normalisable lambda-terms through the property that a term is normalisable if and only if it is typeable. To be closer to computations and to simplify the formalisation of the atomic operations involved in beta-contractions, several calculi of explicit substitution were developed mostly with de Bruijn indices. Versions of explicit substitutions calculi without types and with simple type systems are well investigated in contrast to versions with more elaborate type systems such as intersection types. In previous work, we introduced a de Bruijn version of the lambda-calculus with an intersection type system and proved that it preserves subject reduction, a basic property of type systems. In this paper a version with de Bruijn indices of an intersection type system originally introduced to characterise principal typings for beta-normal forms is presented. We present the characterisation in this new system and the corresponding versions for the type inference and the reconstruction of normal forms from principal typings algorithms. We briefly discuss the failure of the subject reduction property and some possible solutions for it

    Compositional Explanation of Types and Algorithmic Debugging of Type Errors

    Get PDF
    The type systems of most typed functional programming languages are based on the Hindley-Milner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the Hindley-Milner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semi-automatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods

    Expressiveness of Generic Process Shape Types

    Full text link
    Shape types are a general concept of process types which work for many process calculi. We extend the previously published Poly* system of shape types to support name restriction. We evaluate the expressiveness of the extended system by showing that shape types are more expressive than an implicitly typed pi-calculus and an explicitly typed Mobile Ambients. We demonstrate that the extended system makes it easier to enjoy advantages of shape types which include polymorphism, principal typings, and a type inference implementation.Comment: Submitted to Trustworthy Global Computing (TGC) 2010

    A theory of qualified types

    Get PDF
    AbstractThis paper describes a general theory of overloading based on a system of qualified types. The central idea is the use of predicates in the type of a term, restricting the scope of universal quantification. A corresponding semantic notion of evidence is introduced and provides a uniform framework for implementing applications of this system, including Haskell style type classes, extensible records and subtyping.Working with qualified types in a simple, implicitly typed, functional language, we extend the Damas-Milner approach to type inference. As a result, we show that the set of all possible typings for a given term can be characterized by a principal type scheme, calculated by a type inference algorithm

    Generic process shape types and the Poly* system

    Get PDF
    Shape types are a general concept of process types which allows verification of various properties of processes from various calculi. The key property is that shape types “look like processes”, that is, they resemble process structure and content. PolyV, originally designed by Makholm and Wells, is a type system scheme which can be instantiated to a shape type system for many calculi. Every PolyV instantiation has desirable properties including subject reduction, polymorphism, the existence of principal typings, and a type inference algorithm. In the first part of this thesis, we fix and describe inconsistencies found in the original PolyV system, we extend the system to support name restriction, and we provide a detailed proof of the correctness of the system. In the second part, we present a description of the type inference algorithm which we use to constructively prove the existence of principal typings. In the third part, we present various applications of shape types which demonstrate their advantages. Furthermore we prove that shape types can provide the same expressive power as and also strictly superior expressive power than predicates of three quite dissimilar analysis systems from the literature, namely, (1) an implicitly typed π-calculus, (2) an explicitly typed Mobile Ambients, (3) and a flow analysis system for BioAmbients.Engineering and Physical Sciences Research Council (EPSRC) EP/C013573/
    corecore