Results 1  10
of
10
ObjectOriented Type Inference
 OOPSLA'91
, 1991
"... We present a new approach to inferring types in untyped objectoriented programs with inheritance, assignments, and late binding. It guarantees that all messages are understood, annotates the program with type information, allows polymorphic methods, and can be used as the basis of an optimizing co ..."
Abstract

Cited by 222 (18 self)
 Add to MetaCart
We present a new approach to inferring types in untyped objectoriented programs with inheritance, assignments, and late binding. It guarantees that all messages are understood, annotates the program with type information, allows polymorphic methods, and can be used as the basis of an optimizing compiler. Types are finite sets of classes and subtyping is set inclusion. Using a trace graph, our algorithm constructs a set of conditional type constraints and computes the least solution by least fixedpoint derivation.
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 135 (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
The complexity of type inference for higherorder typed lambda calculi
 In. Proc. 18th ACM Symposium on the Principles of Programming Languages
, 1991
"... We analyse the computational complexity of type inference for untyped X,terms in the secondorder polymorphic typed Xcalculus (F2) invented by Girard and Reynolds, as well as higherorder extensions F3,F4,...,/ ^ proposed by Girard. We prove that recognising the i^typable terms requires exponential ..."
Abstract

Cited by 28 (11 self)
 Add to MetaCart
We analyse the computational complexity of type inference for untyped X,terms in the secondorder polymorphic typed Xcalculus (F2) invented by Girard and Reynolds, as well as higherorder extensions F3,F4,...,/ ^ proposed by Girard. We prove that recognising the i^typable terms requires exponential time, and for Fa the problem is nonelementary. We show as well a sequence of lower bounds on recognising the i^typable terms, where the bound for Fk+1 is exponentially larger than that for Fk. The lower bounds are based on generic simulation of Turing Machines, where computation is simulated at the expression and type level simultaneously. Nonaccepting computations are mapped to nonnormalising reduction sequences, and hence nontypable terms. The accepting computations are mapped to typable terms, where higherorder types encode reduction sequences, and firstorder types encode the entire computation as a circuit, based on a unification simulation of Boolean logic. A primary technical tool in this reduction is the composition of polymorphic functions having different domains and ranges. These results are the first nontrivial lower bounds on type inference for the Girard/Reynolds
Standard MLNJ weak polymorphism and imperative constructs
 IN PROCEEDINGS, EIGHTH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE
, 1996
"... Standard ML of New Jersey (SMLNJ) uses "weak type variables" to restrict the polymorphic use of functions that may allocate reference cells, manipulate continuations, or use exceptions. However, the ..."
Abstract

Cited by 11 (0 self)
 Add to MetaCart
Standard ML of New Jersey (SMLNJ) uses "weak type variables" to restrict the polymorphic use of functions that may allocate reference cells, manipulate continuations, or use exceptions. However, the
Efficient Type Inference Using Monads
, 1991
"... Efficient type inference algorithms are based on graphrewriting techniques. Consequently, at first sight they seem unsuitable for functional language implementation. In fact, most compilers written in functional languages use substitutionbased algorithms, at a considerable cost in performance. In ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Efficient type inference algorithms are based on graphrewriting techniques. Consequently, at first sight they seem unsuitable for functional language implementation. In fact, most compilers written in functional languages use substitutionbased algorithms, at a considerable cost in performance. In this paper, we show how monads may be used to transform a substitutionbased inference algorithm into one using a graph representation. The resulting algorithm is faster than the corresponding substitutionbased algorithm. Monads are also used to develop a parallel substitution inference algorithm. Practical considerations limit the development of a parallel graphrewriting algorithm in a functional language. 1 Introduction Type inference accounts for much of the cost of compiling a functional program. Typically around half of the total space and time requirements of a compilation in the Glasgow prototype Haskell compiler, or the Chalmers LML compiler can be attributed directly to the costs o...
Wand’s Algorithm Extended For the Polymorphic MLlet
, 2007
"... Abstract. This paper details an extension to Wand’s algorithm to handle the polymorphic let (a.k.a. MLLet) construct. We have extended Wand’s algorithm by extending the constraint language and by using a multiphase unification algorithm in the constraint solving phase. We show the correctness of o ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract. This paper details an extension to Wand’s algorithm to handle the polymorphic let (a.k.a. MLLet) construct. We have extended Wand’s algorithm by extending the constraint language and by using a multiphase unification algorithm in the constraint solving phase. We show the correctness of our approach by extending the Wand’s soundness and completeness results. We have validated our approach against other popular type reconstruction algorithms by implementing OCaml prototypes and running them on nontrivial examples. 1
Extending the Type Checker of SML by Polymorphic Recursion: A Correctness Proof
, 1997
"... . We describe an extension of the type inference of Standard ML that covers polymorphic recursion. For any term t of SML, a type scheme ø and a system L of inequations between (simple) types is computed, such that the types of t are the instances of ø by substitutions S that satisfy L. The inequat ..."
Abstract
 Add to MetaCart
. We describe an extension of the type inference of Standard ML that covers polymorphic recursion. For any term t of SML, a type scheme ø and a system L of inequations between (simple) types is computed, such that the types of t are the instances of ø by substitutions S that satisfy L. The inequation constraints L are computed bottomup in a modification of Milner's algorithm W . The correctness proof is complicated by the fact that unknowns for polytypes are needed  in contrast to type inference for SML. 1 Introduction Functional programming languages like ML[19], Miranda[23], or Haskell[?], have made statically typed polymorphic languages popular. Their success depends to a large extend on the following properties of the underlying type system of Damas/Milner[2]:  typability of an untyped term is decidable,  for typable terms, a schema representing the set of its types can be inferred automatically,  the declaration of polymorphic values by the user is supported,  welltyped...
Type Systems for Programming Languages
, 2001
"... These notes belong to the course Type Systems for Programming Languages, given to fourth year students in Computing and Joint Mathematics and Computing with some experience in reasoning and logic, and students in the Advanced Masters programme at the Department of Computing, Imperial College, London ..."
Abstract
 Add to MetaCart
These notes belong to the course Type Systems for Programming Languages, given to fourth year students in Computing and Joint Mathematics and Computing with some experience in reasoning and logic, and students in the Advanced Masters programme at the Department of Computing, Imperial College, London. The course is intended for students interested in theoretical computer science, who possess some knowledge of logic. No prior knowledge on type systems or proof techniques is assumed, other than being familiar with the principle of induction. Aims • To lay out in detail the design of type assignment systems for programming languages. • To focus on the importance of a sound theoretical framework, in order to be able to reason about properties of a typed program. • To understand the concepts of: type checking, type reconstruction, polymorphism, type derivation, typeability, typing of recursive functions, termination in the context of typeability, and undecidable systems. • To study various systems and various languages, and to compare those and to select.
Preface
, 1995
"... In this lecture we will present a tiny functional language and gradually enrich its type system. We shall cover the basic CurryHindley system and Wand's constraintbased algorithm for monomorphic type inference; brie y observe the CurryHoward isomorphism and notice that logical formalism may serve ..."
Abstract
 Add to MetaCart
In this lecture we will present a tiny functional language and gradually enrich its type system. We shall cover the basic CurryHindley system and Wand's constraintbased algorithm for monomorphic type inference; brie y observe the CurryHoward isomorphism and notice that logical formalism may serve as the inspiration for new type rules; present the polymorphic Milner system and the DamasMilner algorithm for polymorphic type inference; see the MilnerMycroft system for polymorphic recursion; and sketch the development of higher type systems. We will touch upon the relationship between types and logic and show how rules from logic may give inspiration for new type rules. En route we shall encounter the curious discovery that two algorithmic problems for type systems, which have been implemented in popular programming languages, have turned out to be respectively complete for exponential time and undecidable. 1 1