Results 1 -
3 of
3
Object-Oriented Type Inference
- OOPSLA'91
, 1991
"... We present a new approach to inferring types in untyped object-oriented 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 op-timizing co ..."
Abstract
-
Cited by 209 (18 self)
- Add to MetaCart
We present a new approach to inferring types in untyped object-oriented 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 op-timizing 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 fixed-point derivation.
An Analysis of the Core-ML Language: Expressive Power and Type Reconstruction
- In Proc. 21st Int'l Coll. Automata, Languages, and Programming
, 1994
"... Core-ML is a basic subset of most functional programming languages. It consists of the simply typed (or monomorphic) -calculus, simply typed equality over atomic constants, and let as the only polymorphic construct. We present a synthesis of recent results which characterize this "toy" language' ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
Core-ML is a basic subset of most functional programming languages. It consists of the simply typed (or monomorphic) -calculus, simply typed equality over atomic constants, and let as the only polymorphic construct. We present a synthesis of recent results which characterize this "toy" language's expressive power as well as its type reconstruction (or type inference) problem. More specifically: (1) Core-ML can express exactly the ELEMENTARY queries, where a program input is a database encoded as a -term and a query program is a -term whose application to the input normalizes to the output database. In addition, it is possible to express all the PTIME queries so that this normalization process is polynomial in the input size. (2) The polymorphism of let can be explained using a simple algorithmic reduction to monomorphism, and provides flexibility, without affecting expressibility. Algorithms for type reconstruction offer the additional convenience of static typing without type declarations. Given polymorphism, the price of this convenience is an increase in complexity from linear-time in the size of the program typed (without let) to completeness in exponential-time (with let).
Analysis of Objects with Dynamic and Multiple Inheritance
- In ECOOP '93 Conference Proceedings
, 1995
"... . We have designed and implemented a type inference algorithm for the Self language. The algorithm can guarantee the safety and disambiguity of message sends, and provide useful information for browsers and optimizing compilers. Self features objects with dynamic inheritance. This construct has unt ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
. We have designed and implemented a type inference algorithm for the Self language. The algorithm can guarantee the safety and disambiguity of message sends, and provide useful information for browsers and optimizing compilers. Self features objects with dynamic inheritance. This construct has until now been considered incompatible with type inference because it allows the inheritance graph to change dynamically. Our algorithm handles this by deriving and solving type constraints that simultaneously define supersets of both the possible values of expressions and of the possible inheritance graphs. The apparent circularity is resolved by computing a global fixed-point, in polynomial time. The algorithm has been implemented and can successfully handle the Self benchmark programs, which exist in the "standard Self world" of more than 40,000 lines of code. Keywords: Languages and their implementation, tools and environments. 1 Introduction The choice between static and dynamic typing ...

