Results 1  10
of
17
Intersection Types and Computational Effects
, 2000
"... We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to letexpressions and re ..."
Abstract

Cited by 65 (6 self)
 Add to MetaCart
We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to letexpressions and requires an additional weakening of the usual subtyping rules. We also present a bidirectional typechecking algorithm for the resulting language that does not require an excessive amount of type annotations and illustrate it through some examples. We further show that the type assignment system can be extended to incorporate parametric polymorphism. Taken together, we see our system and associated typechecking algorithm as a significant step towards the introduction of intersection types into realistic programming languages. The added expressive power would allow many more properties of programs to be stated by the programmer and statically verified by a compiler.
Typability and Type Checking in System F Are Equivalent and Undecidable
 Annals of Pure and Applied Logic
, 1998
"... Girard and Reynolds independently invented System F (a.k.a. the secondorder polymorphically typed lambda calculus) to handle problems in logic and computer programming language design, respectively. Viewing F in the Curry style, which associates types with untyped lambda terms, raises the questions ..."
Abstract

Cited by 58 (4 self)
 Add to MetaCart
Girard and Reynolds independently invented System F (a.k.a. the secondorder polymorphically typed lambda calculus) to handle problems in logic and computer programming language design, respectively. Viewing F in the Curry style, which associates types with untyped lambda terms, raises the questions of typability and type checking . Typability asks for a term whether there exists some type it can be given. Type checking asks, for a particular term and type, whether the term can be given that type. The decidability of these problems has been settled for restrictions and extensions of F and related systems and complexity lowerbounds have been determined for typability in F, but this report is the rst to resolve whether these problems are decidable for System F. This report proves that type checking in F is undecidable, by a reduction from semiuni cation, and that typability in F is undecidable, by a reduction from type checking. Because there is an easy reduction from typability to typ...
Essential language support for generic programming
 In PLDI ’05
, 2005
"... “Concepts ” are an essential language feature needed to support generic programming in the large. Concepts allow for succinct expression of bounds on type parameters of generic algorithms, enable systematic organization of problem domain abstractions, and make generic algorithms easier to use. In th ..."
Abstract

Cited by 27 (4 self)
 Add to MetaCart
“Concepts ” are an essential language feature needed to support generic programming in the large. Concepts allow for succinct expression of bounds on type parameters of generic algorithms, enable systematic organization of problem domain abstractions, and make generic algorithms easier to use. In this paper we formalize the design of a type system and semantics for concepts that is suitable for nontypeinferencing languages. Our design shares much in common with the type classes of Haskell, though our primary influence is from best practices in the C ++ community, where concepts are used to document type requirements for templates in generic libraries. The technical development in this paper defines an extension to System F and a typedirected translation from the extension back to System F. The translation is proved sound; the proof is written in the human readable but machine checkable Isar language and has been automatically verified by the Isabelle proof assistant. This document was generated directly from the Isar theory files using Isabelle’s support for literate proofs.
A Logic of Subtyping
, 1996
"... The relation of inclusion between types has been suggested by the practice of programming, as it enriches the polymorphism of functional languages. We propose a simple (and linear) calculus of sequents for subtyping as logical entailment. This allows us to derive a complete and coherent approach to ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
The relation of inclusion between types has been suggested by the practice of programming, as it enriches the polymorphism of functional languages. We propose a simple (and linear) calculus of sequents for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subtyping from a few, logically meaningful, sequents. In particular, transitivity and antisymmetry will be derived from elementary logical principles, which stresses the power of sequents and Gentzenstyle proof methods. Proof techniques based on cutelimination will be at the core of our results. 1 Introduction 1.1 Motivations, Theories and Models In recent years, several extensions of core functional languages have been proposed to deal with the notion of subtyping; see, for example, [CW85, Mit88, BL90, BCGS91, CMMS91, CG92, PS94, Tiu96, TU96]. These extensions were suggested by the practice of programming in computer science. In particular, they were inspired by the notion of inheritance...
Typability and Type Checking in the SecondOrder lambdaCalculus Are Equivalent and Undecidable
, 1993
"... We consider the problems of typability and type checking in the Girard/Reynolds secondorder polymorphic typedcalculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pureterms. These problems have been considered and proven to be d ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
We consider the problems of typability and type checking in the Girard/Reynolds secondorder polymorphic typedcalculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pureterms. These problems have been considered and proven to be decidable or undecidable for various restrictions and extensions of System F and other related systems, and lowerbound complexity results for System F have been achieved, but they have remained "embarrassing open problems" 3 for System F itself. We first prove that type checking in System F is undecidable by a reduction from semiunification. We then prove typability in System F is undecidable by a reduction from type checking. Since the reverse reduction is already known, this implies the two problems are equivalent. The second reduction uses a novel method of constructingterms such that in all type derivations, specific bound variables must always be assigned a specific type. Using this technique, we can require that specif subterms must be typable using a specific, fixed type assignment in order for the entire term to be typable at all. Any desired type assignment maybe simulated. We develop this method, which we call \constants for free", for both the K and I calculi.
Coherence and Transitivity of Subtyping as Entailment
, 1996
"... The relation of inclusion between types has been suggested by the practice of programming as it enriches the polymorphism of functional languages. We propose a simple (and linear) sequent calculus for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subty ..."
Abstract

Cited by 11 (3 self)
 Add to MetaCart
The relation of inclusion between types has been suggested by the practice of programming as it enriches the polymorphism of functional languages. We propose a simple (and linear) sequent calculus for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subtyping from a few, logically meaningful sequents. In particular, transitivity and antisymmetry will be derived from elementary logical principles.
Typability is undecidable for F+eta
, 1995
"... System F is the wellknown polymorphicallytypedcalculus with universal quanti ers (\8"). F+ is System F extended with the eta rule, which says that if term M can be given type and Mreduces to N, then N can also be given the type. Adding the eta rule to System F is equivalent to adding the subsump ..."
Abstract

Cited by 9 (6 self)
 Add to MetaCart
System F is the wellknown polymorphicallytypedcalculus with universal quanti ers (\8"). F+ is System F extended with the eta rule, which says that if term M can be given type and Mreduces to N, then N can also be given the type. Adding the eta rule to System F is equivalent to adding the subsumption rule using the subtyping (\containment") relation that Mitchell de ned and axiomatized [Mit88]. The subsumption rule says that if M can be given type and is a subtype of type,thenMcan be given type. Mitchell's subtyping relation involves no extensions to the syntaxoftypes, i.e., no bounded polymorphism and no supertype of all types, and is thus unrelated to the system F (\Fsub"). Typability for F+ is the problem of determining for any termMwhether there is any type that can be given to it using the type inference rules of F+. Typability has been proven undecidable for System F [Wel94] (without the eta rule), but the decidability oftypability has been an open problem for F+. Mitchell's subtyping relation has recently been proven undecidable [TU95, Wel95b], implying the undecidability of\type checking " for F+. This paper reduces the problem of subtyping to the problem of typability for F+,thus proving the undecidability oftypability. The proof methods are similar in outline to those used to prove the undecidability oftypability for System F, but the ne details di er greatly. 1
Subtyping Recursive Types in Kernel Fun
 In IEEE Symposium on Logic in Computer Science (LICS
, 1999
"... The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17]. ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17].
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 ω ρ.
Subtyping Parametric and Dependent Types
, 1996
"... A type may be a subtype of another type. The intuition about this should be clear: a type is a type of data, some data then may live in a given type as well as in a larger one, up to a simple "transformation". The advantage is that those data may be "seen" or used in different contexts. The formal ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
A type may be a subtype of another type. The intuition about this should be clear: a type is a type of data, some data then may live in a given type as well as in a larger one, up to a simple "transformation". The advantage is that those data may be "seen" or used in different contexts. The formal treatment of this intuition, though, is not so obvious, in particular when data may be programs. In Object Oriented Programming, where the issue of "reusing data" is crucial, there has been a longlasting discussion on "inheritance" and ... little agreement. There are several ways to understand and formalize inheritance, which depend on the specific programming environment used. Since early work of Cardelli and Wegner, there has been a large amount of papers developing several possible functional approaches to inheritance, as subtyping. Indeed, functional subtyping captures only one point of view on inheritance, yet this notion largely motivated most of that work. Whethe