## Polymorphic Type Inference for Languages with Overloading and Subtyping (1991)

Citations: | 20 - 1 self |

### BibTeX

@TECHREPORT{Smith91polymorphictype,

author = {Seward Smith and Geoffrey Seward Smith and Ph. D},

title = {Polymorphic Type Inference for Languages with Overloading and Subtyping},

institution = {},

year = {1991}

}

### OpenURL

### Abstract

Many computer programs have the property that they work correctly on a variety of types of input; such programs are called polymorphic. Polymorphic type systems support polymorphism by allowing programs to be given multiple types. In this way, programs are permitted greater flexibility of use, while still receiving the benefits of strong typing. One especially successful polymorphic type system is the system of Hindley, Milner, and Damas, which is used in the programming language ML. This type system allows programs to be given universally quantified types as a means of expressing polymorphism. It has two especially nice properties. First, every well-typed program has a “best ” type, called the principal type, that captures all the possible types of the program. Second, principal types can be inferred, allowing programs to be written without type declarations. However, two useful kinds of polymorphism cannot be expressed in this type system: overloading and subtyping. Overloading is the kind of polymorphism exhibited by a function like addition, whose types cannot be captured by a single universally quantified type formula.

### Citations

3839 |
Introduction to Automata Theory, Languages, and Computation
- Hopcroft, Ullman
- 1979
(Show Context)
Citation Context .... Theorem 2.25 Given an assumption set A and a set B of τ -assumptions, it is undecidable whether B is satisfiable with respect to A. Proof: It is easy to reduce the Post Correspondence Problem (PCP) =-=[HU79]-=- to the satisfiability problem. We present the reduction by means of an example. 74sSuppose we are given the PCP instance x1 = 10 y1 = 101 x2 = 011 y2 = 11 x3 = 110 y3 = ε, where ε denotes the empty s... |

2446 |
The design and analysis of computer algorithms
- Aho, Hopcroft, et al.
- 1974
(Show Context)
Citation Context ...ls will probably be represented differently), but it seems better to separate such concerns from issues of axiomatic type correctness. A striking example of a polymorphic function is Algorithm 5.5 in =-=[AHU74]-=-. The algorithm is defined in terms of an abstract type called a closed semiring. Depending on the choice of closed semiring, the algorithm computes the reflexive, transitive closure of a graph, the s... |

759 | On Understanding Types, Data Abstraction, and Polymorphism
- Cardelli, Wegner
(Show Context)
Citation Context ...rically polymorphic. The types of ∗ , in contrast, cannot be uniformly described: they require many type formulas. For this reason, ∗ is said to be overloaded. 2 The discussion of Cardelli and Wegner =-=[CW85]-=- is typical; Prins [Pri87], in contrast, argues against the necessity of uniform implementations for polymorphic functions. 3 Throughout this dissertation, we use currying to avoid the messiness of fu... |

707 |
Data structures and algorithms
- Aho, Hopcroft, et al.
- 1983
(Show Context)
Citation Context ... and Plotkin [MP88] suggest that an abstract type that is represented by another type should be given an existentially quantified type as a way of hiding the representation. Aho, Hopcroft, and Ullman =-=[AHU83]-=- assert that two types should be regarded as different if the set of operations they support is different, because the set of operations to be supported is crucial in determining the best implementati... |

486 | A semantics of multiple inheritance - Cardelli - 1988 |

359 |
Principal type-schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ... : τ under the assumption x : σ , where σ is quantified, then when we discharge the assumption x : σ we will obtain the typing λx.e ′ : σ → τ , but the type σ → τ will not be outermost quantified. In =-=[DM82]-=-, it is shown that the Hindley/Milner/Damas type system has two especially nice properties: first, every well-typed program has a principal type, and second, principal types may be inferred using algo... |

354 |
Proofs and types
- Girard, Taylor, et al.
- 1989
(Show Context)
Citation Context ...s A ⊢ e ′ : τ → τ ′ A ⊢ e ′′ : τ A ⊢ e ′ e ′′ : τ ′ This rule is strikingly like the logical rule modus ponens: τ → τ ′ τ τ ′ This is a manifestation of the remarkable propositions as types principle =-=[GLT89]-=-, according to which types may be viewed as logical propositions and a program of a certain type may be viewed as an intuitionistic proof of the proposition corresponding to the type. As a consequence... |

238 | Interprétation fonctionnelle et elimination des coupures de l’arithmétique d’ordre supérieur. Thèse d’état, Université de Paris 7 - Girard - 1972 |

158 |
The transitive reduction of a directed graph
- Aho, Garey, et al.
- 1972
(Show Context)
Citation Context ...omponent-collapser(Ci), then the only cycles in CiV are trivial inclusions; hence nontrivial-inclusions(CiV ) is acyclic. An acyclic graph can be further simplified by taking its transitive reduction =-=[AGU72]-=-. The transitive reduction of an acyclic graph G is the unique minimal graph having the same transitive closure as G ; it may be found by deleting redundant edges from G using an algorithm that is ess... |

143 | The principal type-scheme of an object in combinatory logic - Hindley - 1969 |

113 |
Introduction to combinators and λcalculus
- Hindley, Seldin
- 1986
(Show Context)
Citation Context ...of the αi ’s or if β occurs in some τi . Defining the application of a substitution to a type scheme is rather complicated, since we must deal with the usual worries about bound variables and capture =-=[HS86]-=-. In the interest of simplicity, we adopt a definition that does more renaming of bound variables than is strictly necessary. Suppose that we are given a type scheme σ = ∀α1, . . .,αn with C . τ and a... |

97 |
A Simple Applicative Language: Mini-ML
- Clément, Despeyroux, et al.
- 1986
(Show Context)
Citation Context ... ⊢ e : σ . We will see that the converse holds as well, so ⊢ ′ derivations may be viewed as a normal form for ⊢ derivations. A similar normal-form result for Damas and Milner’s type system appears in =-=[CDDK86]-=- and is discussed in [Tof88]. 37sThe usefulness of the restricted rules is that if A ⊢ ′ e : τ , then the form of e uniquely determines the last rule used in the derivation: if e is x the derivation e... |

77 | Basic polymorphic typechecking - Cardelli - 1987 |

56 | Constable et al. Implementing Mathematics with the Nuprl Proof Development System - Robert - 1986 |

50 |
Parametric overloading in polymorphic programming languages
- Kaes
- 1988
(Show Context)
Citation Context ...bool}, then without the satisfiability condition we would have A ⊢ (true + true) : with + : bool → bool → bool .bool even though + doesn’t work on bool! Overloading has also been investigated by Kaes =-=[Kae88]-=- and by Wadler and Blott [WB89]. Their systems do not require the satisfiability of constraint sets in type schemes, with the result that certain nonsensical expressions, such as true + true , are wel... |

26 |
A.Demers: Data types are values
- Donahue
- 1985
(Show Context)
Citation Context ... a set of clothes (or a suit of armor) that protects an underlying untyped representation from arbitrary or unintended use. [CW85, p. 474] 1 SETL is an exception. 3sSimilarly, in the language Russell =-=[DD85]-=-, the notion of strong typing is defined so that the meaning of a well-typed program is independent of the representations of the types it uses. In a similar way, Mitchell and Plotkin [MP88] suggest t... |

23 |
Constrained quantification in polymorphic type analysis
- Curtis
- 1990
(Show Context)
Citation Context ...6.4 Monotonicity-based Instantiations The final simplifications performed in close(A, B, τ) are the monotonicity-based instantiations. Monotonicity-based simplification was earlier explored by Curtis =-=[Cur90]-=- and by Fuh and Mishra [FM89]. Monotonicity-based instantiations, in contrast to the instantiations made during shape unification and the collapsing of strongly connected components, are not in genera... |

13 | A new notion of encapsulation - GRIES, PRINS |

11 | The transform — a new language construct - Gries, Volpano - 1990 |

4 |
Inheritance and explicit coercion (preliminary report
- Breazu-Tannen, Coquand, et al.
- 1989
(Show Context)
Citation Context ...he semantics of an expression e of type τ should be independent of the choice of derivation of e : τ . This property has been explored by Reynolds [Rey80], and, more recently, by Breazu-Tannen et al. =-=[BTCGS89]-=-, who call the property coherence. 4.3.4 Imperative Languages Finally, we would like to extend our results to an imperative language. Unfortunately, extending polymorphic type inference to imperative ... |

2 |
de Snepscheut, and Jan Tijmen Udding. An algorithm for transitive reduction of an acyclic graph
- Gries, Martin, et al.
- 1989
(Show Context)
Citation Context ...inimal graph having the same transitive closure as G ; it may be found by deleting redundant edges from G using an algorithm that is essentially the inverse of Warshall’s transitive closure algorithm =-=[GMvdSU89]-=-. It will be seen in the discussion of monotonicity-based instantiation that the use of the transitive reduction has significance beyond mere simplification. We can now state precisely the next part o... |