## The Essence of Principal Typings (2002)

### Cached

### Download Links

- [www.macs.hw.ac.uk]
- [www.macs.hw.ac.uk]
- [www.macs.hw.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. 29th Int’l Coll. Automata, Languages, and Programming, volume 2380 of LNCS |

Citations: | 86 - 12 self |

### BibTeX

@INPROCEEDINGS{Wells02theessence,

author = {J. B. Wells},

title = {The Essence of Principal Typings},

booktitle = {In Proc. 29th Int’l Coll. Automata, Languages, and Programming, volume 2380 of LNCS},

year = {2002},

pages = {913--925},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

Let S be some type system. A typing in S for a typable term M is the collection of all of the information other than M which appears in the final judgement of a proof derivation showing that M is typable. For example, suppose there is a derivation in S ending with the judgement A M : # meaning that M has result type # when assuming the types of free variables are given by A. Then (A, #) is a typing for M .

### Citations

939 | A theory of type polymorphism in programming
- Milner
- 1978
(Show Context)
Citation Context ...or HM. The HM system supports polymorphism with quite restricted uses of ∀ quantifiers. In practice, the limitations of the HM system on polymorphic types make some kinds of code reuse more difficul=-=t [21]-=-. As a result, programmers are often forced into contortions to provide code for which the compiler can find typings. This has motivated a long search for more flexible type systems with good type inf... |

607 |
The Definition of Standard ML (Revised
- Harper, Milner, et al.
- 1997
(Show Context)
Citation Context ... σ)) ⇒ (MN) : (A ⊢ τ) ABS M : (Ax ∪ {x:σ} ⊢ τ) ⇒ (λx.M) : (A ⊢ σ → τ) The Hindley/Milner type system (HM) is an extension of STLC which was introduced by Milner for use in the ML =-=programming language [21, 22]. -=-The HM system introduces a syntactic form (let x = M in N) for allowing definitions with polymorphic types. The set Types(HM) is the subset of Types containing all types which do not mention ∩ and w... |

365 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...mpiler can find typings. This has motivated a long search for more flexible type systems with good type inference algorithms. Popular candidates have been extensions of the HM system such as System F =-=[8, 28], F�-=-��, F+η, or Fω. In this search, there have been a great number of negative results. For quite some time it seemed that the HM system was as good as a system could get and still have a complete/termi... |

240 |
Interprétation Fonctionnelle et Élimination des Coupures de L’arithmétique D’order Supérieur
- Girard
- 1972
(Show Context)
Citation Context ...mpiler can find typings. This has motivated a long search for more flexible type systems with good type inference algorithms. Popular candidates have been extensions of the HM system such as System F =-=[8, 28], F�-=-��, F+η, or Fω. In this search, there have been a great number of negative results. For quite some time it seemed that the HM system was as good as a system could get and still have a complete/termi... |

233 |
Principal Type Schemes for Functional Programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...noncompositional, or use something other than typings of the system to represent intermediate results. An example of a noncompositional type inference algorithm is the W algorithm of Damas and Milner =-=[7]-=- for the Hindley/Milner (HM) type system which is used in programming languages like Haskell and Standard ML (SML). For an SML program fragment of the form (let val x = e1 in e2 end), the W algorithm ... |

208 |
Feys R. \Combinatory Logic
- Curry
- 1958
(Show Context)
Citation Context ...ng principal typings. Some Specific Type Systems The formulation of the simply typed lambda calculus (STLC) presented here is in Curry style, meaning that type information is assigned to pure λ-terms=-= [6]. The set Type-=-s(STLC) is the subset of Types containing all types which do not mention ∀ or ∩. The typing rules of STLC are CON, VAR, APP, and ABS: CON ⇒ c : (A ⊢ o) VAR A(x) = τ ⇒ x : (A ⊢ τ) APP (M ... |

156 |
The Lambda Calculus, its Syntax and Semantics. NorthHolland, 2nd edition
- Barendregt
- 1984
(Show Context)
Citation Context ...ore due to the lack of a system-independent definition. 2 Definitions This paper restricts attention to the pure λ-calculus extended with one constant c of ground type. The notation generally follows=-= [2]. T-=-he common features of the type systems discussed in this paper are as follows. The type systems considered are restricted to those deriving judgements of the form A ⊢ M : τ. There are many interest... |

153 | P.: The type and effect discipline
- Talpin, Jouvelot
- 1992
(Show Context)
Citation Context ... interesting type systems that derive judgements with more information, e.g., effect systems deriving judgements of the form A ⊢ M : τ, φ where φ is information about the side effects of evaluati=-=ng M [16, 32]-=-. To extend the machinery here to such type systems, the extra information should be considered part of the typing which is defined below. Types Each type system S will have a set of types Types(S). L... |

128 |
Lambda calculus models of programming languages
- Morris
- 1968
(Show Context)
Citation Context ...rincipal derivation (called by Hindley “deduction”) which is not needed for this discussion. These definitions of Hindley essentially represent the earlier approaches of Curry and Feys [6] and Mor=-=ris [24]. Th-=-ere are two important aspects of this approach: 1. The notion of “more general” is tied to substitution and weakening. For STLC, this exactly captures what is needed, but this fails for more sophi... |

109 | Algebraic Reconstruction of Types and Effects
- Jouvelot, Gifford
- 1991
(Show Context)
Citation Context ... interesting type systems that derive judgements with more information, e.g., effect systems deriving judgements of the form A ⊢ M : τ, φ where φ is information about the side effects of evaluati=-=ng M [16, 32]-=-. To extend the machinery here to such type systems, the extra information should be considered part of the typing which is defined below. Types Each type system S will have a set of types Types(S). L... |

102 |
Polymorphic type inference and containment
- Mitchell
- 1988
(Show Context)
Citation Context ...is necessary to point out that in the case of the system F (defined below), the relation ≤F is very different from type containment relations that have been defined in the literature. For example, i=-=n [23] Mitchell -=-defines two relations denoted by the symbol ⊆, which will be referred to here as ⊆1 and ⊆2. The relations ⊆1 and ⊆2 are defined for types rather than typings, so they can not possibly provid... |

102 | Bounded quantification is undecidable
- Pierce
- 1994
(Show Context)
Citation Context ... of F above 3 [18], and F+η [37]. Urzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping relation of F≤ is undecida=-=ble [25]-=-. Even worse, for System F it seems hard to find an amount of type information less than total that is enough to obtain a terminating type inference algorithm [31]. Along the way, there have been a fe... |

101 | On the type structure of Standard ML
- R, MITCHELL
- 1993
(Show Context)
Citation Context ...nition of principal typing that will work for HM. Milner’s cleverness was in finding a way around this problem. The key lies in in the following definition (a clear statement of which can be found i=-=n [9]). Definition 3-=- (A-Typable and A-Principal). 1. A term M is A-typable in HM iff there is some A ′ mentioning only monotypes (types without any occurrence of “∀”) and some type τ such that M : (A∪A ′ ⊢... |

93 | What are principal typings and what are they good for
- Jim
- 1996
(Show Context)
Citation Context ...The new definition 4 of principal typings can be used to finally prove that certain type systems do not have principal typings. These results are significant, as clarified by this statement by Jim in =-=[14] abo-=-ut the best previous knowledge: “This imprecision [in the definition of principal typings] makes it impossible for us to prove that a given type system lacks the principal type property.” Theorem ... |

85 |
Polymorphic Type Inference
- Leivant
- 1983
(Show Context)
Citation Context ...ormulated System F [8] (independently invented by Reynolds [28]) in the Church style, with explicitly typed terms. The Curry style presentation of F which is given here was first published by Leivant =-=[20]. Th-=-e set Types(F) is the subset of Types containing all types which do not mention ∩. The typing rules of F are CON, VAR, APP, and ABS from STLC and the new typing rules INST and GEN: INST (M : (A ⊢ ... |

78 | A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus
- Kfoury, Wells
- 1994
(Show Context)
Citation Context ...undecidable, which means no type inference algorithm can be both complete and terminating for all program fragments.sWells proved this for System F [36, 39], the finite-rank restrictions of F above 3 =-=[18], an-=-d F+η [37]. Urzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping relation of F≤ is undecidable [25]. Even worse, ... |

77 |
Basic Simple Type Theory
- Hindley
- 1995
(Show Context)
Citation Context ... been designed so that their intermediate results for subterms are, in some sense, most general. There have been several different ways of characterizing the needed notions of “most general”. Hind=-=ley [10] gi-=-ves the following definitions which were intended for use with STLC.sDefinition 1 (Hindley’s Principal Type). A principal type in system S of a term M is a type τ such that 1. there exists a type e... |

61 | Intersection Type Assignment Systems - Bakel - 1995 |

59 | Typability and type checking in system f are equivalent and undecidable
- Wells
- 1998
(Show Context)
Citation Context ...ogram fragment can be given a type) has been proven undecidable, which means no type inference algorithm can be both complete and terminating for all program fragments.sWells proved this for System F =-=[36, 39], -=-the finite-rank restrictions of F above 3 [18], and F+η [37]. Urzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping ... |

58 |
Principal type schemes for an extended type theory
- Rocca, S, et al.
- 1984
(Show Context)
Citation Context ...on types for which principal typings was proved was presented by Coppo, Dezani, and Venneri [3] (a later version is [4]). The same general approach has been followed by Ronchi Della Rocca and Venneri =-=[30] and-=- van Bakel [34] for other systems of intersection types. In this approach, finding a principal typing algorithm for a term M involves – finding a normal form (or approximate normal form) M ′ for M... |

54 | A modular, polyvariant and type-based closure analysis
- Banerjee
- 1997
(Show Context)
Citation Context ...th more emphasis on handling practical programming language issues such as recursive definitions, separate compilation, and accurate error messages [15]. Successors to Jim’s method include Banerjee�=-=��s [1], -=-which integrates flow analysis, and Jensen’s [13], which integrates strictness analysis. Other approaches to principal typings and type inference with intersection types include [5] and [12]. The mo... |

51 | Principality and decidable type inference for finiterank intersection types
- Kfoury, Wells
- 1999
(Show Context)
Citation Context ...f the HM system, but, perhaps more interestingly, some with restricted intersection types (cf. recent work on intersection types of arbitrarily high finite ranks by Kfoury, Mairson, Turbak, and Wells =-=[19, 17]). A-=- New Principal Typing Definition vs. ∀ Quantifiers For many years it was not known whether type systems with ∀ quantifiers could have principal typings. The first difficulty is simply in finding a... |

47 |
Principal type schemes and λ-calculus semantics
- Coppo, Dezani-Ciancaglini, et al.
- 1980
(Show Context)
Citation Context ...l about intersection types, so the discussion here gives only the highlights. The first system of intersection types for which principal typings was proved was presented by Coppo, Dezani, and Venneri =-=[3]-=- (a later version is [4]). The same general approach has been followed by Ronchi Della Rocca and Venneri [30] and van Bakel [34] for other systems of intersection types. In this approach, finding a pr... |

46 | Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems
- Bakel
- 1993
(Show Context)
Citation Context ...principal typings was proved was presented by Coppo, Dezani, and Venneri [3] (a later version is [4]). The same general approach has been followed by Ronchi Della Rocca and Venneri [30] and van Bakel =-=[34] for o-=-ther systems of intersection types. In this approach, finding a principal typing algorithm for a term M involves – finding a normal form (or approximate normal form) M ′ for M, – assigning a typ... |

43 |
type assignment for the strongly normalizable λ-terms,” pp. 561–577
- Pottinger, “A
- 1980
(Show Context)
Citation Context ...agments.sWells proved this for System F [36, 39], the finite-rank restrictions of F above 3 [18], and F+η [37]. Urzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection type=-=s [27], -=-and Pierce proved that even the subtyping relation of F≤ is undecidable [25]. Even worse, for System F it seems hard to find an amount of type information less than total that is enough to obtain a ... |

33 |
and B.Venneri (1981), Functional Characters of Solvable Terms, Zeitschrift fur Mathematische Logik und Grundlagen der Mathematik
- Coppo
(Show Context)
Citation Context ...es, so the discussion here gives only the highlights. The first system of intersection types for which principal typings was proved was presented by Coppo, Dezani, and Venneri [3] (a later version is =-=[4]-=-). The same general approach has been followed by Ronchi Della Rocca and Venneri [30] and van Bakel [34] for other systems of intersection types. In this approach, finding a principal typing algorithm... |

29 |
Principal type scheme and unification for intersection type discipline
- Rocca
- 1988
(Show Context)
Citation Context ...ions on typings are sometimes quite complicated, so they will not be discussed in this paper. The first unification-based approach to principal typing with intersection types is by Ronchi Della Rocca =-=[29-=-]. An always-terminating restriction is presented which bounds the height of types. Unfortunately, this approach uses a complicated approach to expansion and is thus quite difficult to understand. The... |

28 |
A complete type inference algorithm for simple intersection types
- Coppo, Giannini
- 1992
(Show Context)
Citation Context ...clude Banerjee’s [1], which integrates flow analysis, and Jensen’s [13], which integrates strictness analysis. Other approaches to principal typings and type inference with intersection types incl=-=ude [5]-=- and [12]. The most recent development in this area is the introduction of the notion of expansion variables [19]. The key idea is that with expansion variables, the earlier notions of expansion and s... |

22 |
Typability and type-checking in the second-order λ-calculus are equivalent and undecidable
- Wells
- 1994
(Show Context)
Citation Context ...ogram fragment can be given a type) has been proven undecidable, which means no type inference algorithm can be both complete and terminating for all program fragments.sWells proved this for System F =-=[36, 39], -=-the finite-rank restrictions of F above 3 [18], and F+η [37]. Urzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping ... |

21 | Relating Typability and Expressibility in Finite-Rank Intersection Type Systems
- Kfoury, Mairson, et al.
- 1999
(Show Context)
Citation Context ...f the HM system, but, perhaps more interestingly, some with restricted intersection types (cf. recent work on intersection types of arbitrarily high finite ranks by Kfoury, Mairson, Turbak, and Wells =-=[19, 17]). A-=- New Principal Typing Definition vs. ∀ Quantifiers For many years it was not known whether type systems with ∀ quantifiers could have principal typings. The first difficulty is simply in finding a... |

16 | Inference of polymorphic and conditional strictness properties
- Jensen
- 1998
(Show Context)
Citation Context ... language issues such as recursive definitions, separate compilation, and accurate error messages [15]. Successors to Jim’s method include Banerjee’s [1], which integrates flow analysis, and Jense=-=n’s [13]-=-, which integrates strictness analysis. Other approaches to principal typings and type inference with intersection types include [5] and [12]. The most recent development in this area is the introduct... |

16 |
Type reconstruction in Fω
- Urzyczyn
- 1997
(Show Context)
Citation Context ...orithm can be both complete and terminating for all program fragments.sWells proved this for System F [36, 39], the finite-rank restrictions of F above 3 [18], and F+η [37]. Urzyczyn proved it for F�=-=� [33], -=-Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping relation of F≤ is undecidable [25]. Even worse, for System F it seems hard to find an amount o... |

15 |
Filter models with polymorphic types
- Jacobs, Margaria, et al.
- 1992
(Show Context)
Citation Context ...nerjee’s [1], which integrates flow analysis, and Jensen’s [13], which integrates strictness analysis. Other approaches to principal typings and type inference with intersection types include [5] =-=and [12]-=-. The most recent development in this area is the introduction of the notion of expansion variables [19]. The key idea is that with expansion variables, the earlier notions of expansion and substituti... |

12 | Second-order unification and type inference for church-style polymorphism
- Schubert
- 1997
(Show Context)
Citation Context ...typing relation of F≤ is undecidable [25]. Even worse, for System F it seems hard to find an amount of type information less than total that is enough to obtain a terminating type inference algorith=-=m [31]-=-. Along the way, there have been a few positive results, some extensions of the HM system, but, perhaps more interestingly, some with restricted intersection types (cf. recent work on intersection typ... |

9 | Typability is undecidable for F+eta
- Wells
- 1996
(Show Context)
Citation Context ...hich means no type inference algorithm can be both complete and terminating for all program fragments.sWells proved this for System F [36, 39], the finite-rank restrictions of F above 3 [18], and F+η=-= [37]. U-=-rzyczyn proved it for Fω [33], Pottinger proved it for unrestricted intersection types [27], and Pierce proved that even the subtyping relation of F≤ is undecidable [25]. Even worse, for System F i... |

7 | Type Inference for System F with and without the Eta Rule - Wells - 1996 |