Results 1 - 10
of
14
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.
Making Type Inference Practical
, 1992
"... We present the implementation of a type inference algorithm for untyped objectoriented programs with inheritance, assignments, and late binding. The algorithm significantly improves our previous one, presented at OOPSLA'91, since it can handle collection classes, such as List, in a useful way. Also, ..."
Abstract
-
Cited by 77 (6 self)
- Add to MetaCart
We present the implementation of a type inference algorithm for untyped objectoriented programs with inheritance, assignments, and late binding. The algorithm significantly improves our previous one, presented at OOPSLA'91, since it can handle collection classes, such as List, in a useful way. Also, the complexity has been dramatically improved, from exponential time to low polynomial time. The implementation uses the techniques of incremental graph construction and constraint template instantiation to avoid representing intermediate results, doing superfluous work, and recomputing type information. Experiments indicate that the implementation type checks as much as 100 lines pr. second. This results in a mature product, on which a number of tools can be based, for example a safety tool, an image compression tool, a code optimization tool, and an annotation tool. This may make type inference for object-oriented languages practical.
Efficient Inference of Object Types
, 1995
"... Abadi and Cardelli have recently investigated a calculus of objects [2]. The calculus supports a key feature of object-oriented languages: an object can be emulated by another object that has more refined methods. Abadi and Cardelli presented four first-order type systems for the calculus. The simpl ..."
Abstract
-
Cited by 52 (6 self)
- Add to MetaCart
Abadi and Cardelli have recently investigated a calculus of objects [2]. The calculus supports a key feature of object-oriented languages: an object can be emulated by another object that has more refined methods. Abadi and Cardelli presented four first-order type systems for the calculus. The simplest one is based on finite types and no subtyping, and the most powerful one has both recursive types and subtyping. Open until now is the question of type inference, and in the presence of subtyping "the absence of minimum typings poses practical problems for type inference" [2]. In this paper...
Propagating Class and Method Combination
- In Proceedings ECOOP ’99, volume 1628 of LNCS, 67–91
, 1999
"... This paper presents a mixin based class and method combination mechanism with block structure propagation. Traditionally, mixins can be composed to form new classes, possibly merging the implementations of methods (as in CLOS). In our approach, a class or method combination operation may cause any n ..."
Abstract
-
Cited by 33 (9 self)
- Add to MetaCart
This paper presents a mixin based class and method combination mechanism with block structure propagation. Traditionally, mixins can be composed to form new classes, possibly merging the implementations of methods (as in CLOS). In our approach, a class or method combination operation may cause any number of implicit combinations. For example, it is possible to specify separate aspects of a family of classes, and then combine several aspects into a full-fledged class family. The combination expressions would explicitly combine whole-family aspects, and by propagation implicitly combine the aspects for each member of the class family, and again by propagation implicitly compose each method from its aspects. As opposed to CLOS, this is type-checked statically; and as opposed to other systems for advanced class combination/merging/weaving, it is integrated directly in the language, ensuring a clear semantics and a seamless interaction with the type system. Moreover, the ba...
Type Substitution for Object-Oriented Programming
- In Proc. OOPSLA/ECOOP'90, ACM SIGPLAN Fifth Annual Conference on Object-Oriented Programming Systems, Languages and Applications; European Conference on Object-Oriented Programming
, 1990
"... Genericity allows the substitution of types in a class. This is usually obtained through parameterized classes, although they are inflexible since any class can be inherited but is not in itself parameterized. We suggest a new genericity mechanism, type substitution, which is a subclassing concept t ..."
Abstract
-
Cited by 29 (5 self)
- Add to MetaCart
Genericity allows the substitution of types in a class. This is usually obtained through parameterized classes, although they are inflexible since any class can be inherited but is not in itself parameterized. We suggest a new genericity mechanism, type substitution, which is a subclassing concept that complements inheritance: any class is generic, can be "instantiated" gradually without planning, and has all of its generic instances as subclasses. 1 Introduction This paper proposes type substitution as a new genericity mechanism for statically typed object-oriented languages. With this concept we avoid type variables and second-order entities and obtain the natural complement of inheritance; both are subclassing mechanisms and they differ as follows. ffl Inheritance. Construction of subclasses by adding variables and procedures, and by replacing procedure bodies. ffl Type substitution. Construction of subclasses by substituting types. Type substitution is supportive of the real-li...
Static Typing for Object-Oriented Programming
- SCIENCE OF COMPUTER PROGRAMMING
, 1994
"... We develop a theory of statically typed object-oriented languages. It represents classes as labeled, regular trees, types as finite sets of classes, and subclassing as a partial order on trees. We show that our subclassing order strictly generalizes inheritance, and that a novel genericity mechan ..."
Abstract
-
Cited by 18 (6 self)
- Add to MetaCart
We develop a theory of statically typed object-oriented languages. It represents classes as labeled, regular trees, types as finite sets of classes, and subclassing as a partial order on trees. We show that our subclassing order strictly generalizes inheritance, and that a novel genericity mechanism arises as an order-theoretic complement. This mechanism, called class substitution, is pragmatically useful and can be implemented efficiently.
What is Type-Safe Code Reuse?
, 1991
"... Subclassing is reuse of class definitions. It is usually tied to the use of class names, thus relying on the order in which the particular classes in a program are created. This is a burden, however, both when programming and in theoretical studies. This paper presents a structural notion of subclas ..."
Abstract
-
Cited by 11 (5 self)
- Add to MetaCart
Subclassing is reuse of class definitions. It is usually tied to the use of class names, thus relying on the order in which the particular classes in a program are created. This is a burden, however, both when programming and in theoretical studies. This paper presents a structural notion of subclassing for typed languages. It is a direct abstraction of the Smalltalk interpreter and the separate compilation technique of Modula. We argue that it is the most general mechanism which can be supported by the implementation while relying on the type-correctness of superclasses. In short, it captures type-safe code reuse. 1 Introduction An important goal of object-oriented programming is to obtain reusable classes without introducing significant compiling or linking overhead. A statically typed language should thus offer general mechanisms for reusing classes without ever requiring a compiler to re-type-check an already compiled class. Such mechanisms allow type-safe code reuse. Instead of s...
Type Inference with Simple Selftypes is NP-complete
, 1997
"... . The metavariable self is fundamental in object-oriented languages. Typing self in the presence of inheritance has been studied by Abadi and Cardelli, Bruce, and others. A key concept in these developments is the notion of selftype, which enables flexible type annotations that are impossible with ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
. The metavariable self is fundamental in object-oriented languages. Typing self in the presence of inheritance has been studied by Abadi and Cardelli, Bruce, and others. A key concept in these developments is the notion of selftype, which enables flexible type annotations that are impossible with recursive types and subtyping. Bruce et al. demonstrated that, for the language TOOPLE, type checking is decidable. Open until now is the problem of type inference with selftype. In this paper we present a simple type system with selftype, recursive types, and subtyping, and we prove that type inference is NP-complete. With recursive types and subtyping alone, type inference is known to be P-complete. Our example language is the object calculus of Abadi and Cardelli. Both our type inference algorithm and our lower bound are the first such results for a type system with selftype. CR Classification: Categories and Subject Descriptors: D.3.2 [Programming Languages]: Language Classifications---...
Type Inference With Selftype
"... The metavariable self is fundamental in object-oriented languages. ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
The metavariable self is fundamental in object-oriented languages.
Fine-Grained Parallelism in Ellie
, 1991
"... This paper briefly presents the object-oriented programming language Ellie which supports fine-grained objects and parallelism. The paper concentrates on the parallel and fine-grained programming aspects of the language. A prototype version of the language has been implemented on a parallel transput ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
This paper briefly presents the object-oriented programming language Ellie which supports fine-grained objects and parallelism. The paper concentrates on the parallel and fine-grained programming aspects of the language. A prototype version of the language has been implemented on a parallel transputer network. 2 The main goal of Ellie has been to achieve machine independent parallel programming, which is a major concept to reduce the cost of parallel software development. Ellie tries to meet this goal by allowing the programmer to have a large number of small processes and then having the compiler adapt the actual number of processes used to suit the actual underlying hardware. Keywords Object-oriented languages, Concurrency, Process synchronization, Fine-grained programming Acknowledgements I would like to express my thanks to Jens Clausen, Eric Jul, and Niels Christian Juul, all three of the Department of Computer Science in Copenhagen. Their comments on the Ellie language design...

