Results 1  10
of
13
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 60 (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...
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 considere ..."
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.
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 su ..."
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
A System F with callbyname exceptions
"... Abstract. We present an extension of System F with callbyname exceptions. The type system is enriched with two syntactic constructs: a union type A ⋆ ∪ {ε} for programs of type A whose execution may raise the exception ε at top level, and a corruption type A {ε} for programs that may raise the exc ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Abstract. We present an extension of System F with callbyname exceptions. The type system is enriched with two syntactic constructs: a union type A ⋆ ∪ {ε} for programs of type A whose execution may raise the exception ε at top level, and a corruption type A {ε} for programs that may raise the exception ε in any evaluation context (not necessarily at top level). We present the syntax and reduction rules of the system, as well as its typing and subtyping rules. We then study its properties, such as confluence. Finally, we construct a realizability model using orthogonality techniques, from which we deduce that welltyped programs are weakly normalizing and that the ones who have the type of natural numbers really compute a natural number, without raising exceptions. 1
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 c ..."
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
Type systems for programming languages
"... 1.1 Overview of the course................................. 7 ..."
Abstract
"... Simple, partial typeinference for System F based on typecontainment We explore partial typeinference for System F based on typecontainment. We consider both cases of a purely functional semantics and a callbyvalue stateful semantics. To enable typeinference, we require higherrank polymorphis ..."
Abstract
 Add to MetaCart
Simple, partial typeinference for System F based on typecontainment We explore partial typeinference for System F based on typecontainment. We consider both cases of a purely functional semantics and a callbyvalue stateful semantics. To enable typeinference, we require higherrank polymorphism to be userspecified via type annotations on source terms. We allow implicit predicative typecontainment and explicit impredicative typeinstantiation. We obtain a core language that is both as expressive as System F and conservative over ML. Its type system has a simple logical specification and a partial typereconstruction algorithm that are both very close to the ones for ML. We then propose a surface language where some annotations may be omitted and rebuilt by some algorithmically defined but logically incomplete elaboration mechanism.
Abstract
"... Simple, partial typeinference for System F based on typecontainment We explore partial typeinference for System F based on typecontainment. We consider both cases of a purely functional semantics and a callbyvalue stateful semantics. To enable typeinference, we require higherrank polymorphis ..."
Abstract
 Add to MetaCart
Simple, partial typeinference for System F based on typecontainment We explore partial typeinference for System F based on typecontainment. We consider both cases of a purely functional semantics and a callbyvalue stateful semantics. To enable typeinference, we require higherrank polymorphism to be userspecified via type annotations on source terms. We allow implicit predicative typecontainment and explicit impredicative typeinstantiation. We obtain a core language that is both as expressive as System F and conservative over ML. Its type system has a simple logical specification and a partial typereconstruction algorithm that are both very close to the ones for ML. We then propose a surface language where some annotations may be omitted and rebuilt by some algorithmically defined but logically incomplete elaboration mechanism.