Results 1  10
of
11
Recursive Subtyping Revealed
 Journal of Functional Programming
, 2000
"... Algorithms for checking subtyping between recursive types lie at the core of many programming language implementations. But the fundamental theory of these algorithms and how they relate to simpler declarative specifications is not widely understood, due in part to the difficulty of the available in ..."
Abstract

Cited by 37 (4 self)
 Add to MetaCart
Algorithms for checking subtyping between recursive types lie at the core of many programming language implementations. But the fundamental theory of these algorithms and how they relate to simpler declarative specifications is not widely understood, due in part to the difficulty of the available introductions to the area. This tutorial paper offers an "endtoend" introduction to recursive types and subtyping algorithms, from basic theory to efficient implementation, set in the unifying mathematical framework of coinduction. 1. INTRODUCTION Recursively defined types in programming languages and lambdacalculi come in two distinct varieties. Consider, for example, the type X described by the equation X = Nat!(Nat\ThetaX): An element of X is a function that maps a number to a pair consisting of a number and a function of the same form. This type is often written more concisely as X.Nat!(Nat\ThetaX). A variety of familiar recursive types such as lists and trees can be defined analogou...
An ImplicitlyTyped DeadlockFree Process Calculus
 In Proc. of Workshop on HighLevel Concurrent Language (HLCL’98), volume 16(3) of ENTCS
"... We extend Kobayashi and Sumii's type system for the deadlock free #calculus and develop a type reconstruction algorithm. Kobayashi and Sumii's type system helps highlevel reasoning about concurrent programs by guaranteeing that communication on certain channels will eventually succeed. It can ens ..."
Abstract

Cited by 27 (8 self)
 Add to MetaCart
We extend Kobayashi and Sumii's type system for the deadlock free #calculus and develop a type reconstruction algorithm. Kobayashi and Sumii's type system helps highlevel reasoning about concurrent programs by guaranteeing that communication on certain channels will eventually succeed. It can ensure, for example, that a process implementing a function really behaves like a function. However, because it lacked a type reconstruction algorithm and required rather complicated type annotations, applying it to real concurrent languages was impractical. We have therefore developed a type reconstruction algorithm for an extension of the type system. The key novelties that made it possible are generalization of usages (which specifies how each communication channel is used) and a subusage relation. 1
On the theory of structural subtyping
, 2003
"... We show that the firstorder theory of structural subtyping of nonrecursive types is decidable. Let Σ be a language consisting of function symbols (representing type constructors) and C a decidable structure in the relational language L containing a binary relation ≤. C represents primitive types; ..."
Abstract

Cited by 18 (8 self)
 Add to MetaCart
We show that the firstorder theory of structural subtyping of nonrecursive types is decidable. Let Σ be a language consisting of function symbols (representing type constructors) and C a decidable structure in the relational language L containing a binary relation ≤. C represents primitive types; ≤ represents a subtype ordering. We introduce the notion of Σtermpower of C, which generalizes the structure arising in structural subtyping. The domain of the Σtermpower of C is the set of Σterms over the set of elements of C. We show that the decidability of the firstorder theory of C implies the decidability of the firstorder theory of the Σtermpower of C. This result implies the decidability of the firstorder theory of structural subtyping of nonrecursive types.
Programming With Types
 CORNELL UNIVERSITY
, 2002
"... Runtime type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection m ..."
Abstract

Cited by 11 (1 self)
 Add to MetaCart
Runtime type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection mechanisms so they may discover and interact with program interfaces dynamically. Runtime type analysis is also crucial for large, distributed systems that must be dynamically extended, because it allows those systems to check program invariants when new code and new forms of data are added. Finally, many generic userlevel algorithms for iteration, pattern matching, and unification can be defined through type analysis mechanisms. However, existing frameworks for runtime type analysis were designed for simple type systems. They do not scale well to the sophisticated type systems of modern and nextgeneration programming languages that include complex constructs such as firstclass abstract types, recursive types, objects, and type parameterization. In addition, facilities to support type analysis often require complicated
Simple Usage Polymorphism
 TIC 2000
, 2000
"... We present a novel inference algorithm for a type system featuring subtyping and usage (annotation) polymorphism. This algorithm infers simplypolymorphic types rather than the constrainedpolymorphic types usual in such a setting; it achieves this by means of constraint approximation. The algorithm ..."
Abstract

Cited by 11 (0 self)
 Add to MetaCart
We present a novel inference algorithm for a type system featuring subtyping and usage (annotation) polymorphism. This algorithm infers simplypolymorphic types rather than the constrainedpolymorphic types usual in such a setting; it achieves this by means of constraint approximation. The algorithm is motivated by practical considerations and experience of a previous system, and has been implemented in a production compiler with positive results. We believe the algorithm may well have applications in settings other than usagetype inference.
Efficient Type Matching
, 2001
"... Palsberg and Zhao [14] presented an O(n²) time algorithm for matching two recursive types. In this paper, we present an O(n log n) algorithm for the same problem. Our algorithm works by reducing the type matching problem to the wellunderstood problem of finding a sizestable partition of a graph. ..."
Abstract

Cited by 10 (3 self)
 Add to MetaCart
Palsberg and Zhao [14] presented an O(n²) time algorithm for matching two recursive types. In this paper, we present an O(n log n) algorithm for the same problem. Our algorithm works by reducing the type matching problem to the wellunderstood problem of finding a sizestable partition of a graph. Our result may help improve systems, such as Polyspin and Mockingbird, that are designed to facilitate interoperability of software components. We also discuss possible applications of our algorithm to Java. Issues related to subtyping of recursive types are also discussed.
Efficient and Flexible Matching of Recursive Types
, 2000
"... Equality and subtyping of recursive types have been studied in the 1990s by Amadio and Cardelli; Kozen, Palsberg, and Schwartzbach; Brandt and Henglein; and others. Potential applications include automatic generation of bridge code for multilanguage systems and typebased retrieval of software m ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
Equality and subtyping of recursive types have been studied in the 1990s by Amadio and Cardelli; Kozen, Palsberg, and Schwartzbach; Brandt and Henglein; and others. Potential applications include automatic generation of bridge code for multilanguage systems and typebased retrieval of software modules from libraries. Auerbach, Barton, and Raghavachari advocate a highly exible combination of matching rules for which there, until now, are no ecient algorithmic techniques. In this paper, we present an ecient decision procedure for a notion of type equality that includes unfolding of recursive types, and associativity and commutativity of product types, as advocated by Auerbach et al. For two types of size at most n, our algorithm decides equality in O(n 2 ) time. The algorithm iteratively prunes a set of type pairs, and eventually it produces a set of pairs of equal types. In each iteration, the algorithm exploits a socalled coherence property of the set of type pairs pr...
Inference of generic types in Java
, 2003
"... Future versions of Java will include support for parametric polymorphism, or generic classes. This will bring many benefits to Java programmers, not least because current Java practise makes heavy use of pseudogeneric classes. Such classes (for example, those in package java.util) have logically ge ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
Future versions of Java will include support for parametric polymorphism, or generic classes. This will bring many benefits to Java programmers, not least because current Java practise makes heavy use of pseudogeneric classes. Such classes (for example, those in package java.util) have logically generic specifications and documentation, but the type system cannot prove their patterns of use to be safe.
Logic of subtyping
 Theoretical Computer Science
, 2005
"... We introduce new modal logical calculi that describe subtyping properties of Cartesian product and disjoint union type constructors as well as mutuallyrecursive types defined using those type constructors. Basic Logic of Subtyping S extends classical propositional logic by two new binary modalities ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
We introduce new modal logical calculi that describe subtyping properties of Cartesian product and disjoint union type constructors as well as mutuallyrecursive types defined using those type constructors. Basic Logic of Subtyping S extends classical propositional logic by two new binary modalities ⊗ and ⊕. An interpretation of S is a function that maps standard connectives into settheoretical operations (intersection, union, and complement) and modalities into Cartesian product and disjoint union type constructors. This allows S to capture many subtyping properties of the above type constructors. We also consider logics Sρ and S ω ρ that incorporate into S mutuallyrecursive types over arbitrary and wellfounded universes correspondingly. The main results are completeness of the above three logics with respect to appropriate type universes. In addition, we prove Cut elimination theorem for S and establish decidability of S and S ω ρ.
Behavioural Subtyping in Name Passing Synchronisation Trees
, 1999
"... . We present a general theory of behavioural subtyping for name passing interactive behaviours using early namepassing synchronisation trees. In this theory types are collections of name passing synchronisation trees organised by typed variants of processtheoretic operations, and a simple behaviour ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
. We present a general theory of behavioural subtyping for name passing interactive behaviours using early namepassing synchronisation trees. In this theory types are collections of name passing synchronisation trees organised by typed variants of processtheoretic operations, and a simple behavioural notion of subtyping specifies when one type denotes more constrained behaviours than another, offering a semantic basis for diverse instances of subtyping in sequential and concurrent computation through their representation in name passing. The robustness of the notion is shown by a few equivalent characterisations, including the one based on the subset inclusion with respect to inhabitants of types and another concerning a basic substitutability property. As an application, we show how the subtyping in the calculus with constant data domains is soundly embeddable into the present theory, illuminating the functional notion of subtyping from a behavioural viewpoint. 1. Introduction The ...