Results 1 
9 of
9
Type Inference with Polymorphic Recursion
 Transactions on Programming Languages and Systems
, 1991
"... The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. H ..."
Abstract

Cited by 137 (0 self)
 Add to MetaCart
The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. He proved the resulting type system, which we call the MilnerMycroft Calculus, sound with respect to Milner’s semantics, and showed that it preserves the principal typing property of the DamasMilner Calculus. The extension is of practical significance in typed logic programming languages and, more generally, in any language with (mutually) recursive definitions. In this paper we show that the type inference problem for the MilnerMycroft Calculus is logspace equivalent to semiunification, the problem of solving subsumption inequations between firstorder terms. This result has been proved independently by Kfoury et al. In connection with the recently established undecidability of semiunification this implies that typability in the MilnerMycroft Calculus is undecidable. We present some reasons why type inference with polymorphic recursion appears to be practical despite its undecidability. This also sheds some light on the observed practicality of ML
Type inference and semiunification
 In Proceedings of the ACM Conference on LISP and Functional Programming (LFP ) (Snowbird
, 1988
"... In the last ten years declarationfree programming languages with a polymorphic typing discipline (ML, B) have been developed to approximate the flexibility and conciseness of dynamically typed languages (LISP, SETL) while retaining the safety and execution efficiency of conventional statically type ..."
Abstract

Cited by 25 (6 self)
 Add to MetaCart
In the last ten years declarationfree programming languages with a polymorphic typing discipline (ML, B) have been developed to approximate the flexibility and conciseness of dynamically typed languages (LISP, SETL) while retaining the safety and execution efficiency of conventional statically typed languages (Algol68, Pascal). These polymorphic languages can be type checked at compile time, yet allow functions whose arguments range over a variety of types. We investigate several polymorphic type systems, the most powerful of which, termed MilnerMycroft Calculus, extends the socalled letpolymorphism found in, e.g., ML with a polymorphic typing rule for recursive definitions. We show that semiunification, the problem of solving inequalities over firstorder terms, characterizes type checking in the MilnerMycroft Calculus to polynomial time, even in the restricted case where nested definitions are disallowed. This permits us to extend some infeasibility results for related combinatorial problems to type inference and to correct several claims and statements in the literature. We prove the existence of unique most general solutions of term inequalities, called most general semiunifiers, and present an algorithm for computing them that terminates for all known inputs due to a novel “extended occurs check”. We conjecture this algorithm to be
Fast leftlinear semiunification
 In Proc. Int’l. Conf. on Computing and Information
, 1990
"... Semiunification is a generalization of both unification and matching with applications in proof theory, term rewriting systems, polymorphic type inference, and natural language processing. It is the problem of solving a set of term inequalities M1 ≤ N1,..., Mk ≤ Nk, where ≤ is interpreted as the su ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
Semiunification is a generalization of both unification and matching with applications in proof theory, term rewriting systems, polymorphic type inference, and natural language processing. It is the problem of solving a set of term inequalities M1 ≤ N1,..., Mk ≤ Nk, where ≤ is interpreted as the subsumption preordering on (firstorder) terms. Whereas the general problem has recently been shown to be undecidable, several special cases are decidable. Kfoury, Tiuryn, and Urzyczyn proved that leftlinear semiunification (LLSU) is decidable by giving an exponential time decision procedure. We improve their result as follows. 1. We present a generic polynomialtime algorithm L1 for LLSU, which shows that LLSU is in P. 2. We show that L1 can be implemented in time O(n 3) by using a fast dynamic transitive closure algorithm. 3. We prove that LLSU is Pcomplete under logspace reductions, thus giving evidence that there are no fast (NCclass) parallel algorithms for LLSU.
Abstract PER moclels of subtyping, recursive types and higherorder polymorphism
"... We relate standard techniques for solving recursive domain equations to previous models with types interpreted as partial equivalence relations (per’s) over a Dm lambda model. This motivates a particular choice of type functions, which leads to an extension of, such models to higherorder polymorp ..."
Abstract
 Add to MetaCart
We relate standard techniques for solving recursive domain equations to previous models with types interpreted as partial equivalence relations (per’s) over a Dm lambda model. This motivates a particular choice of type functions, which leads to an extension of, such models to higherorder polymorphism. The resulting models provide natural interpretations for function spaces, records, recursively defined types, higherorder type functions, and bounded polymorphic types YX <: Y. A where the bound may be of a higher kind. In particular, we may combine recursion and polymorphism in a way that allows the bound Y in VX <: Y. A to be recursive y defined. The model may also be used to interpret socalled “Fbounded polymorphism. ” Together, these features allolv us to represent several forms of type and type functions that seem to arise naturally in typed objectoriented programming. 1
A Decidable Case of the SemiUnification Problem (Draft Version)
, 1991
"... Semiunification is a common generalization of unification and matching. The semiunification problem is to decide solvability of finite sets of equations s = t and inequations ˜s ≤i ˜t between firstorder terms, with different inequality relations ≤i, i ∈ I. A solution consists of a substitution T0 ..."
Abstract
 Add to MetaCart
Semiunification is a common generalization of unification and matching. The semiunification problem is to decide solvability of finite sets of equations s = t and inequations ˜s ≤i ˜t between firstorder terms, with different inequality relations ≤i, i ∈ I. A solution consists of a substitution T0 and residual substitutions Ti, i ∈ I, such that, respectively, T0(s) = T0(t) and Ti(T0(˜s)) = T0(˜t). The semiunification problem has recently been shown to be undecidable [9]. We present a new subclass of decidable semiunification problems, properly containing those over monadic languages. In our ‘quasimonadic ’ problems, function symbols may be of arity> 1, but only terms with at most one free variable are admitted. 1
A Larger Decidable Semiunification Problem
"... We present a graphtheoretic framework in which to study instances of the semiunification problem (SUP), which is known to be undecidable, but has several known and important decidable subsets. One such subset, the acyclic semiunification problem (ASUP), has proved useful in the study of polymorphic ..."
Abstract
 Add to MetaCart
We present a graphtheoretic framework in which to study instances of the semiunification problem (SUP), which is known to be undecidable, but has several known and important decidable subsets. One such subset, the acyclic semiunification problem (ASUP), has proved useful in the study of polymorphic type inference. We present graphtheoretic criteria in our framework that exactly characterize the ASUP acyclicity constraint. We then use our framework to find a decidable subset of SUP (which we call RASUP), which has a more natural description than ASUP, and strictly contains it. 1.
A General Theory of SemiUnification
, 1993
"... Various restrictions on the terms allowed for substitution give rise to different cases of semiunification. Semiunification on finite and regular terms has already been considered in the literature. We introduce a general case of semiunification where substitutions are allowed on nonregular term ..."
Abstract
 Add to MetaCart
Various restrictions on the terms allowed for substitution give rise to different cases of semiunification. Semiunification on finite and regular terms has already been considered in the literature. We introduce a general case of semiunification where substitutions are allowed on nonregular terms, and we prove the equivalence of this general case to a wellknown undecidable data base dependency problem , thus establishing the undecidability of general semiunification. We present a unified way of looking at the various problems of semiunification. We give some properties that are common to all the cases of semiunification. We also the principality property and the solution set for those problems. We prove that semiunification on general terms has the principality property. Finally, we present a recursive inseparability result between semiunification on regular terms and semiunification on general terms. Partly supported by NSF grant CCR9113196. Address: Department of Compu...
Simultaneous Rigid EUnification is not so Simple
, 1995
"... Simultaneous rigid Eunification has been introduced in the area of theorem proving with equality. It is used in extension procedures, like the tableau method or the connection method. Many articles in this area tacitly assume the existence of an algorithm for simultaneous rigid Eunification. There ..."
Abstract
 Add to MetaCart
Simultaneous rigid Eunification has been introduced in the area of theorem proving with equality. It is used in extension procedures, like the tableau method or the connection method. Many articles in this area tacitly assume the existence of an algorithm for simultaneous rigid Eunification. There were several faulty proofs of the decidability of this problem. In this article we prove several results about the simultaneous rigid Eunification. Two results are reductions of known problems to simultaneous rigid Eunification. Both these problems are very hard. The word equation solving (unification under associativity) is reduced to the monadic case of simultaneous rigid Eunification. The variablebounded semiunification problem is reduced to the general simultaneous rigid Eunification. The word equation problem used in the first reduction is known to be decidable, but the decidability result is extremely nontrivial. As for the variablebounded semiunification, its decidability is ...
Fundamentals of type inference systems
, 1991
"... These notes give a compact overview of established core type systems and of their fundamental properties. We emphasize the use and application of type systems in programming languages, but also mention their role in logic. Proofs are omitted, but references to relevant sources in the literature are ..."
Abstract
 Add to MetaCart
These notes give a compact overview of established core type systems and of their fundamental properties. We emphasize the use and application of type systems in programming languages, but also mention their role in logic. Proofs are omitted, but references to relevant sources in the literature are