Results 1  10
of
21
How Good is Local Type Inference?
, 1999
"... A partial type inference technique should come with a simple and precise specification, so that users predict its behavior and understand the error messages it produces. Local type inference techniques attain this simplicity by inferring missing type information only from the types of adjacent synta ..."
Abstract

Cited by 171 (4 self)
 Add to MetaCart
A partial type inference technique should come with a simple and precise specification, so that users predict its behavior and understand the error messages it produces. Local type inference techniques attain this simplicity by inferring missing type information only from the types of adjacent syntax nodes, without using global mechanisms such as unification variables. The paper reports on our experience with programming in a fullfeatured programming language including higherorder polymorphism, subtyping, parametric datatypes, and local type inference. On the positive side, our experiments on several nontrivial examples confirm previous hopes for the practicality of the type inference method. On the negative side, some proposed extensions mitigating known expressiveness problems turn out to be unsatisfactory on close examination. 1 Introduction It is widely believed that a polymorphic programming language should provide some form of type inference, to avoid discouraging programming ...
Algebraic Reconstruction of Types and Effects
, 1991
"... We present the first algorithm for reconstructing the types and effects of expressions in the presence of first class procedures in a polymorphic typed language. Effects are static descriptions of the dynamic behavior of expressions. Just as a type describes what an expression computes, an effect de ..."
Abstract

Cited by 110 (6 self)
 Add to MetaCart
We present the first algorithm for reconstructing the types and effects of expressions in the presence of first class procedures in a polymorphic typed language. Effects are static descriptions of the dynamic behavior of expressions. Just as a type describes what an expression computes, an effect describes how an expression computes. Types are more complicated to reconstruct in the presence of effects because the algebra of effects induces complex constraints on both effects and types. In this paper we show how to perform reconstruction in the presence of such constraints with a new algorithm called algebraic reconstruction, prove that it is sound and complete, and discuss its practical import. This research was supported by DARPA under ONR Contract N0001489J1988. 1
Partial polymorphic type inference and higherorder unification
 IN PROCEEDINGS OF THE 1988 ACM CONFERENCE ON LISP AND FUNCTIONAL PROGRAMMING, ACM
, 1988
"... We show that the problem of partial type inference in the nthborder polymorphic Xcalculus is equivalent to nthorder unification. On the one hand, this means that partial type inference in polymorphic Xcalculi of order 2 or higher is undecidable. On the other hand, higherorder unification is oft ..."
Abstract

Cited by 84 (8 self)
 Add to MetaCart
We show that the problem of partial type inference in the nthborder polymorphic Xcalculus is equivalent to nthorder unification. On the one hand, this means that partial type inference in polymorphic Xcalculi of order 2 or higher is undecidable. On the other hand, higherorder unification is often tractable in practice, and our translation entails a very useful algorithm for partial type inference in the worder polymorphic Xcalculus. We present an implementation in AProlog in full.
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 62 (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...
Firstclass Polymorphism with Type Inference
"... Languages like ML and Haskell encourage the view of values as firstclass entities that can be passed as arguments or results of functions, or stored as components of data structures. The same languages o#er parametric polymorphism, which allows the use of values that behave uniformly over a range ..."
Abstract

Cited by 50 (0 self)
 Add to MetaCart
Languages like ML and Haskell encourage the view of values as firstclass entities that can be passed as arguments or results of functions, or stored as components of data structures. The same languages o#er parametric polymorphism, which allows the use of values that behave uniformly over a range of di#erent types. But the combination of these features is not supported polymorphic values are not firstclass. This restriction is sometimes attributed to the dependence of such languages on type inference, in contrast to more expressive, explicitly typed languages, like System F, that do support firstclass polymorphism. This paper uses relationships between types and logic to develop a type system, FCP, that supports firstclass polymorphism, type inference, and also firstclass abstract datatypes. The immediate result is a more expressive language, but there are also long term implications for language design. 1
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 28 (7 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
On the undecidability of partial polymorphic type reconstruction
 FUNDAMENTA INFORMATICAE
, 1992
"... We prove that partial type reconstruction for the pure polymorphic *calculus is undecidable by a reduction from the secondorder unification problem, extending a previous result by H.J. Boehm. We show further that partial type reconstruction remains undecidable even in a very small predicative f ..."
Abstract

Cited by 27 (0 self)
 Add to MetaCart
We prove that partial type reconstruction for the pure polymorphic *calculus is undecidable by a reduction from the secondorder unification problem, extending a previous result by H.J. Boehm. We show further that partial type reconstruction remains undecidable even in a very small predicative fragment of the polymorphic *calculus, which implies undecidability of partial type reconstruction for * ML as introduced by Harper, Mitchell, and Moggi.
Extensions and Applications of Higherorder Unification
, 1990
"... ... unification problems. Then, in this framework, we develop a new unification algorithm for acalculus with dependent function (II) types. This algorithm is especially useful as it provides for mechanization in the very expressive Logical Framework (LF). The development (objectlanguages). The ric ..."
Abstract

Cited by 25 (1 self)
 Add to MetaCart
... unification problems. Then, in this framework, we develop a new unification algorithm for acalculus with dependent function (II) types. This algorithm is especially useful as it provides for mechanization in the very expressive Logical Framework (LF). The development (objectlanguages). The rich structure of a typedcalculus,asopposedtotraditional,rst generalideaistouseacalculusasametalanguageforrepresentingvariousotherlanguages thelattercase,thealgorithmisincomplete,thoughstillquiteusefulinpractice. Thelastpartofthedissertationprovidesexamplesoftheusefulnessofthealgorithms.The algorithmrstfordependentproduct()types,andsecondforimplicitpolymorphism.In involvessignicantcomplicationsnotarisingHuet'scorrespondingalgorithmforthesimply orderabstractsyntaxtrees,allowsustoexpressrules,e.g.,programtransformationand typedcalculus,primarilybecauseitmustdealwithilltypedterms.Wethenextendthis Wecanthenuseunicationinthemetalanguagetomechanizeapplicationoftheserules.
Secondorder unification and type inference for Churchstyle polymorphism
 In Conference Record of POPL 98: The 25TH ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 1998
"... We present a proof of the undecidability of type inference for the Churchstyle system F  an abstraction of polymorphism. A natural reduction from the secondorder unification problem to type inference leads to strong restriction on instances  arguments of variables cannot contain variables. T ..."
Abstract

Cited by 14 (0 self)
 Add to MetaCart
We present a proof of the undecidability of type inference for the Churchstyle system F  an abstraction of polymorphism. A natural reduction from the secondorder unification problem to type inference leads to strong restriction on instances  arguments of variables cannot contain variables. This requires another proof of the undecidability of the secondorder unification since known results use variables in arguments of other variables. Moreover, our proof uses elementary techniques, which is important from the methodological point of view, because Goldfarb's proof [Gol81] highly relies on the undecidability of the tenth Hilbert's problem. 1 1 Introduction The Churchstyle system F was independently introduced by Girard [Gir72] and Reynolds [Rey74] as an extension of the simplytyped calculus a type system introduced of H. B. Curry [Cur69]. As usual for type systems, the decidability of so called sequent decision problems was considered. A sequent decision problem in some ty...
ML^F  Raising ML to the Power of System F
 In ICFP ’03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
, 2003
"... We propose a type system ML F that generalizes ML with firstclass polymorphism as in System F. We perform partial type reconstruction. As in ML and in opposition to System F, each typable expression admits a principal type, which can be inferred. Furthermore, all expressions of ML are welltyped, ..."
Abstract

Cited by 14 (0 self)
 Add to MetaCart
We propose a type system ML F that generalizes ML with firstclass polymorphism as in System F. We perform partial type reconstruction. As in ML and in opposition to System F, each typable expression admits a principal type, which can be inferred. Furthermore, all expressions of ML are welltyped, with a possibly more general type than in ML, without any need for type annotation. Only arguments of functions that are used polymorphically must be annotated, which allows to type all expressions of System F as well.