Results 1  10
of
12
Expansion: the Crucial Mechanism for Type Inference with Intersection Types: Survey and Explanation
 In: (ITRS ’04
, 2005
"... The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying ..."
Abstract

Cited by 17 (7 self)
 Add to MetaCart
The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying out compositional type inference. The fundamental idea of expansion is to be able to calculate the effect on the final judgement of a typing derivation of inserting a use of the intersectionintroduction typing rule at some (possibly deeply nested) position, without actually needing to build the new derivation.
Types, potency, and idempotency: why nonlinearity and amnesia make a type system work
 In ICFP ’04: Proceedings of the ninth ACM SIGPLAN international conference on Functional programming, 138–149, ACM
, 2004
"... Useful type inference must be faster than normalization. Otherwise, you could check safety conditions by running the program. We analyze the relationship between bounds on normalization and type inference. We show how the success of type inference is fundamentally related to the amnesia of the type ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
Useful type inference must be faster than normalization. Otherwise, you could check safety conditions by running the program. We analyze the relationship between bounds on normalization and type inference. We show how the success of type inference is fundamentally related to the amnesia of the type system: the nonlinearity by which all instances of a variable are constrained to have the same type. Recent work on intersection types has advocated their usefulness for static analysis and modular compilation. We analyze SystemI (and some instances of its descendant, System E), an intersection type system with a type inference algorithm. Because SystemI lacks idempotency, each occurrence of a variable requires a distinct type. Consequently, type inference is equivalent to normalization in every single case, and time bounds on type inference and normalization are identical. Similar relationships hold for other intersection type systems without idempotency. The analysis is founded on an investigation of the relationship between linear logic and intersection types. We show a lockstep correspondence between normalization and type inference. The latter shows the promise of intersection types to facilitate static analyses of varied granularity, but also belies an immense challenge: to add amnesia to such analysis without losing all of its benefits.
Inferring intersection typings that are equivalent to callbyname and callbyvalue evaluations
, 2005
"... Abstract. We present a procedure to infer a typing for an arbitrary λterm M in an intersectiontype system that translates into exactly the callbyname (resp., callbyvalue) evaluation of M. Our framework is the recently developed System E which augments intersection types with expansion variable ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
Abstract. We present a procedure to infer a typing for an arbitrary λterm M in an intersectiontype system that translates into exactly the callbyname (resp., callbyvalue) evaluation of M. Our framework is the recently developed System E which augments intersection types with expansion variables. The inferred typing for M is obtained by setting up a unification problem involving both type variables and expansion variables, which we solve with a confluent rewrite system. The inference procedure is compositional in the sense that typings for different program components can be inferred in any order, and without knowledge of the definition of other program components. 3 Using expansion variables lets us achieve a compositional inference procedure easily. Termination of the procedure is generally undecidable. The procedure terminates and returns a typing iff the input M is normalizing according to callbyname (resp., callbyvalue). The inferred typing is exact in the sense that the exact callbyname (resp., callbyvalue) behaviour of M can be obtained by a (polynomial) transformation of the typing. The inferred typing is also principal in the sense that any other typing that translates the callbyname (resp., callbyvalue) evaluation of M can be obtained from the inferred typing for M using a substitutionbased transformation.
Intersection Type System with de Bruijn Indices
, 2008
"... λcalculus in de Bruijn notation is relevant because it avoids variable names using instead indices which makes it more adequate computationally; in fact, several calculi of explicit substitutions are written in de Bruijn notation because it simplifies the formalization of the atomic operations invo ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
λcalculus in de Bruijn notation is relevant because it avoids variable names using instead indices which makes it more adequate computationally; in fact, several calculi of explicit substitutions are written in de Bruijn notation because it simplifies the formalization of the atomic operations involved in βreductions. Intersection types provide finitary type polymorphism which is of principal interest. Moreover, intersection types characterize normalizable λterms, that is a term is normalizable if and only if it is typable. Versions of explicit substitutions calculi without types and with simple type systems are well investigated in contrast to versions with more elaborated type systems such as intersection types. In this paper λcalculus in de Bruijn notation with an intersection type system is introduced and it is proved that this system satisfies the basic property of subject reduction, that is λterms preserve theirs types under βreduction. 1
Exact intersection typing inference and callbyname evaluation
, 2004
"... Abstract. It is known that inferring an exact intersection typing for a λterm (i.e., a typing where the intersection operator is not idempotent) is equivalent to strong βnormalisation of that term. Intersection typing derivations can provide very precise information about program behaviour, making ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Abstract. It is known that inferring an exact intersection typing for a λterm (i.e., a typing where the intersection operator is not idempotent) is equivalent to strong βnormalisation of that term. Intersection typing derivations can provide very precise information about program behaviour, making them — in principle — an attractive framework for program analysis. The recent innovation of expansion variables greatly simplifies the production of such typing derivations, allows their production for all βnormalising terms and allows inference to be done in a truly compositional 3 way — a big advantage for programs where components are updated frequently and separately. We present a new, truly compositional, exact intersection typing inference procedure for the recent, expansion variablebased, System E framework. Inference uses a confluent rewrite system to solve instances of a unification problem with expansion variables. Moreover, we explain precisely how the inferred typingderivation describes the evaluation of the term, showing that the typing derivation most accurately describes its callbyname evaluation via a linear transformation. For other evaluation strategies, different inference algorithms will be required. 1
Type inference for generic Haskell
, 2005
"... Abstract. The more expressive a type system, the more type information has to be provided in a program. Having to provide a type is sometimes a pain, but lacking expressivity is often even worse. There is a continuous struggle between expressivity and (type)verbosity. However, even very expressive ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Abstract. The more expressive a type system, the more type information has to be provided in a program. Having to provide a type is sometimes a pain, but lacking expressivity is often even worse. There is a continuous struggle between expressivity and (type)verbosity. However, even very expressive type systems allow type inference for parts of a program. Generic Haskell is an extension of Haskell that supports defining generic functions. Generic Haskell assumes that the type of a generic function is explicitly specified. This is often no problem, but sometimes it is rather painful to have to specify a type – in particular for generic functions with many dependencies – and sometimes the specified type can be generalized. In this paper, we identify three type inference problems specific to generic functions, and present (partial) solutions to each of them. 1
Principal Typings in a Restricted Intersection Type System for Beta Normal Forms with de Bruijn Indices
, 2009
"... The λcalculus with de Bruijn indices assembles each αclass of λterms in a unique term, using indices instead of variable names. Intersection types provide finitary type polymorphism and can characterise normalisable λterms, that is a term is normalisable if and only if it is typeable. To be clos ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
The λcalculus with de Bruijn indices assembles each αclass of λterms in a unique term, using indices instead of variable names. Intersection types provide finitary type polymorphism and can characterise normalisable λterms, that is 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 βcontractions several calculi of explicit substitution were developed and some of them are written 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 elaborated type systems such as intersection types. In previous work, we introduced a de Bruijn version of the λcalculus with an intersection type system and proved it preserves the subject reduction, a basic type system property. In this paper a version with de Bruijn indices of an intersection type system originally introduced to characterise principal typings for βnormal forms (βnf for short) 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 about the failure of the subject reduction property and some possible solutions for it. ∗ Supported by a PhD scholarship at the Universidade de Brasília. † Supported by the Fundação de Apoio à Pesquisa do Distrito Federal [FAPDF 8004/2007] 1 1
www.cs.uu.nl Exploiting Type Annotations
, 2006
"... The Haskell type system has been designed in such a way that all allowed types can be inferred automatically; any explicit type specification only serves as a means of documentation and safeguarding. Consequently, a programmer is free to omit any type signature, and the program will still type check ..."
Abstract
 Add to MetaCart
The Haskell type system has been designed in such a way that all allowed types can be inferred automatically; any explicit type specification only serves as a means of documentation and safeguarding. Consequently, a programmer is free to omit any type signature, and the program will still type check. The price to be paid for this convenience is limited expressiveness of the type system: even if a programmer is willing to explicitly provide higherranked types with polymorphic arguments, this is not allowed. In an effort to obtain the same expressiveness as System F, the use of universally quantified types on higher ranked positions in types in particular has received much attention in recent years. Because type inference for such types in general is not possible, much work has been done to investigate which limitations on higher ranked types still allow type inference. In this paper we explore an alternative, algorithmic, approach to this problem, which does not limit expressiveness: we propagate explicitly specified type information to all program locations where this information provides starting information for a standard HindleyMilner type inference algorithm. 1
Exact Intersection Typing Inference and CallbyName Evaluation
, 2004
"... It is known that inferring an exact intersection typing for a #term (i.e., a typing where the intersection operator is not idempotent) is equivalent to strong #normalisation of that term. Intersection typing derivations can provide very precise information about program behaviour, making them  ..."
Abstract
 Add to MetaCart
It is known that inferring an exact intersection typing for a #term (i.e., a typing where the intersection operator is not idempotent) is equivalent to strong #normalisation of that term. Intersection typing derivations can provide very precise information about program behaviour, making them  in principle  an attractive framework for program analysis. The recent innovation of expansion variables greatly simplifies the production of such typing derivations, allows their production for all #normalising terms and allows inference to be done in a truly compositional way  a big advantage for programs where components are updated frequently and separately. We present a new, truly compositional, exact intersection typing inference procedure for the recent, expansion variablebased, System E framework. Inference uses a confluent rewrite system to solve instances of a unification problem with expansion variables. Moreover, we explain precisely how the inferred typingderivation describes the evaluation of the term, showing that the typing derivation most accurately describes its callbyname evaluation via a linear transformation. For other evaluation strategies, di#erent inference algorithms will be required. 1