Results 1  10
of
37
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.
What Are Principal Typings and What Are They Good For?
, 1995
"... We demonstrate the pragmatic value of the principal typing property, a property more general than ML's principal type property, by studying a type system with principal typings. The type system is based on rank 2 intersection types and is closely related to ML. Its principal typing property prov ..."
Abstract

Cited by 94 (0 self)
 Add to MetaCart
We demonstrate the pragmatic value of the principal typing property, a property more general than ML's principal type property, by studying a type system with principal typings. The type system is based on rank 2 intersection types and is closely related to ML. Its principal typing property provides elegant support for separate compilation, including "smartest recompilation" and incremental type inference, and for accurate type error messages. Moreover, it motivates a novel rule for typing recursive definitions that can type many examples of polymorphic recursion.
Putting Type Annotations to Work
, 1996
"... We study an extension of the HindleyMilner system with explicit type scheme annotations and type declarations. The system can express polymorphic function arguments, userdefined data types with abstract components, and structure types with polymorphic fields. More generally, all programs of the po ..."
Abstract

Cited by 94 (1 self)
 Add to MetaCart
We study an extension of the HindleyMilner system with explicit type scheme annotations and type declarations. The system can express polymorphic function arguments, userdefined data types with abstract components, and structure types with polymorphic fields. More generally, all programs of the polymorphic lambda calculus can be encoded by a translation between typing derivations. We show that type reconstruction in this system can be reduced to the decidable problem of firstorder unification under a mixed prefix.
TypeBased Analysis of Uncaught Exceptions
, 1998
"... This paper presents a program analysis to estimate uncaught exceptions in ML programs. This analysis relies on unificationbased type inference in a nonstandard type system, using rows to approximate both the flow of escaping exceptions (a la effect systems) and the flow of result values (a la cont ..."
Abstract

Cited by 62 (2 self)
 Add to MetaCart
This paper presents a program analysis to estimate uncaught exceptions in ML programs. This analysis relies on unificationbased type inference in a nonstandard type system, using rows to approximate both the flow of escaping exceptions (a la effect systems) and the flow of result values (a la controlflow analyses). The resulting analysis is efficient and precise; in particular, arguments carried by exceptions are accurately handled.
Implementation of the typed callbyvalue λcalculus using a stack of regions
 In ACM Symposium on Principles of Programming Languages
, 1994
"... We present a translation scheme for the polymorphically typed callbyvalue λcalculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and dealloc ..."
Abstract

Cited by 57 (0 self)
 Add to MetaCart
We present a translation scheme for the polymorphically typed callbyvalue λcalculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and deallocated. Recursive functions are handled using a limited form of polymorphic recursion. The translation is proved correct with respect to a store semantics, which models a regionbased runtime system. Experimental results suggest that regions tend to be small, that region allocation is frequent and that overall memory demands are usually modest, even without garbage collection. 1
The implementation of the Gofer functional programming system
, 1994
"... The Gofer system is a functional programming environment for a small, Haskelllike language. Supporting a wide range of different machines, including home computers, the system is widely used, both for teaching and research. This report describes the main ideas and techniques used in the implementat ..."
Abstract

Cited by 55 (4 self)
 Add to MetaCart
The Gofer system is a functional programming environment for a small, Haskelllike language. Supporting a wide range of different machines, including home computers, the system is widely used, both for teaching and research. This report describes the main ideas and techniques used in the implementation of Gofer. This information will be particularly useful for work using Gofer as a platform to explore the use of new language features or primitives. It should also be of interest to those curious to see how the general techniques of functional programming language compilation are adapted to a simple, but practical, implementation.
Typing Haskell in Haskell
 Haskell Workshop
, 1999
"... Haskell benefits from a sophisticated type system, but implementors, programmers, and researchers suffer because it has no formal description. To remedy this shortcoming, we present a Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a n ..."
Abstract

Cited by 51 (2 self)
 Add to MetaCart
Haskell benefits from a sophisticated type system, but implementors, programmers, and researchers suffer because it has no formal description. To remedy this shortcoming, we present a Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a notation that is familiar to Haskell users. We expect this program to fill a serious gap in current descriptions of Haskell, both as a starting point for discussions about existing features of the type system, and as a platform from which to explore new proposals.
Dimension Types
 In 5th European Symp. on Programming, LNCS 788
, 1994
"... . Scientists and engineers must ensure that physical equations are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This paper extends a stronglytyped programming language with a notion of dimension type. Our approach improves on previous propo ..."
Abstract

Cited by 30 (3 self)
 Add to MetaCart
. Scientists and engineers must ensure that physical equations are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This paper extends a stronglytyped programming language with a notion of dimension type. Our approach improves on previous proposals in that dimension types may be polymorphic. Furthermore, any expression which is typable in the system has a most general type, and we describe an algorithm which infers this type automatically. The algorithm exploits equational unification over Abelian groups in addition to ordinary term unification. An implementation of the type system is described, extending the ML Kit compiler. Finally, we discuss the problem of obtaining a canonical form for principal types and sketch some more powerful systems which use dependent and higherorder polymorphic types. 1 Introduction One aim behind stronglytyped languages is the detection of common programming errors before runtime. Types act as a ...
Rank 2 Type Systems and Recursive Definitions
, 1995
"... We demonstrate an equivalence between the rank 2 fragments of the polymorphic lambda calculus (System F) and the intersection type discipline: exactly the same terms are typable in each system. An immediate consequence is that typability in the rank 2 intersection system is DEXPTIMEcomplete. We int ..."
Abstract

Cited by 26 (1 self)
 Add to MetaCart
We demonstrate an equivalence between the rank 2 fragments of the polymorphic lambda calculus (System F) and the intersection type discipline: exactly the same terms are typable in each system. An immediate consequence is that typability in the rank 2 intersection system is DEXPTIMEcomplete. We introduce a rank 2 system combining intersections and polymorphism, and prove that it types exactly the same terms as the other rank 2 systems. The combined system suggests a new rule for typing recursive definitions. The result is a rank 2 type system with decidable type inference that can type some interesting examples of polymorphic recursion. Finally,we discuss some applications of the type system in data representation optimizations such as unboxing and overloading.
A Theory of Stack Allocation in Polymorphically Typed Languages
, 1993
"... We present a stackallocation scheme for the callbyvalue lambda calculus typed according to Milner's polymorphic type discipline. All the values a program produces, including function closures, are put into regions at runtime. Regions are allocated and deallocated in a stacklike manner. Region in ..."
Abstract

Cited by 24 (6 self)
 Add to MetaCart
We present a stackallocation scheme for the callbyvalue lambda calculus typed according to Milner's polymorphic type discipline. All the values a program produces, including function closures, are put into regions at runtime. Regions are allocated and deallocated in a stacklike manner. Region inference and effect inference is used to infer where regions can be allocated and deallocated. By allowing a limited form of polymorphic recursion in region types, the region inference is able to distinguish between the lifetimes of different invocations of a function, even when the function is recursive. The region analysis is eager in its attempt to reclaim memory as quickly as possible. The main result of this report is that region inference is safe, a result which entails that regions really can be deallocated, when region inference says they can. We give detailed proofs of this claim, which (in various forms) has been advanced several times in the literature. An algorithm for implementi...