Results 1 - 10
of
47
Subtyping recursive types
- ACM Transactions on Programming Languages and Systems
, 1993
"... We investigate the interactions of subtyping and recursive types, in a simply typed λ-calculus. The two fundamental questions here are whether two (recursive) types are in the subtype relation, and whether a term has a type. To address the first question, we relate various definitions of type equiva ..."
Abstract
-
Cited by 288 (8 self)
- Add to MetaCart
We investigate the interactions of subtyping and recursive types, in a simply typed λ-calculus. The two fundamental questions here are whether two (recursive) types are in the subtype relation, and whether a term has a type. To address the first question, we relate various definitions of type equivalence and subtyping that are induced by a model, an ordering on infinite trees, an algorithm, and a set of type rules. We show soundness and completeness between the rules, the algorithm, and the tree semantics. We also prove soundness and a restricted form of completeness for the model. To address the second question, we show that to every pair of types in the subtype relation we can associate a term whose denotation is the uniquely determined coercion map between the two types. Moreover, we derive an algorithm that, when given a term with implicit coercions, can infer its least
Type systems
- The Computer Science and Engineering Handbook
, 1997
"... This paper presents an overview of the programming language Modula-3, and a more detailed description of its type system. 1 ..."
Abstract
-
Cited by 188 (1 self)
- Add to MetaCart
This paper presents an overview of the programming language Modula-3, and a more detailed description of its type system. 1
Operations on records
- Mathematical Structures in Computer Science
, 1991
"... We define a simple collection of operations for creating and manipulating record structures, where records are intended as finite associations of values to labels. A second-order type system over these operations supports both subtyping and polymorphism. We provide typechecking algorithms and limite ..."
Abstract
-
Cited by 136 (12 self)
- Add to MetaCart
We define a simple collection of operations for creating and manipulating record structures, where records are intended as finite associations of values to labels. A second-order type system over these operations supports both subtyping and polymorphism. We provide typechecking algorithms and limited semantic models. Our approach unifies and extends previous notions of records, bounded quantification, record extension, and parametrization by row-variables. The general aim is to provide foundations for concepts found in object-oriented languages, within a framework based on typed lambda-calculus.
A Calculus for Overload Functions with Subtyping
-
, 1992
"... We present a simple extension of typed -calculus where functions can be overloaded by putting different "branches of code" together. When the function is applied, the branch to execute is chosen according to a particular selection rule which depends on the type of the argument. The crucial featu ..."
Abstract
-
Cited by 131 (28 self)
- Add to MetaCart
We present a simple extension of typed -calculus where functions can be overloaded by putting different "branches of code" together. When the function is applied, the branch to execute is chosen according to a particular selection rule which depends on the type of the argument. The crucial feature of the present approach is that the branch selection depends on the "run-time type" of the argument, which may differ from its compile-time type, because of the existence of a subtyping relation among types. Hence overloading cannot be eliminated by a static analysis of code, but is an essential feature to be dealt with during computation. We obtain in this way a type-dependent calculus, which differs from the various -calculi where types do not play any role during computation. We prove Confluence and a generalized Subject-Reduction theorem for this calculus. We prove Strong Normalization for a "stratified" subcalculus. The definition of this calculus is guided by the understand...
A Paradigmatic Object-Oriented Programming Language: Design, Static Typing and Semantics
- Journal of Functional Programming
, 1993
"... In order to illuminate the fundamental concepts involved in object-oriented programming languages, we describe the design of TOOPL, a paradigmatic, statically-typed, functional, object-oriented programming language which supports classes, objects, methods, hidden instance variables, subtypes, and in ..."
Abstract
-
Cited by 110 (9 self)
- Add to MetaCart
In order to illuminate the fundamental concepts involved in object-oriented programming languages, we describe the design of TOOPL, a paradigmatic, statically-typed, functional, object-oriented programming language which supports classes, objects, methods, hidden instance variables, subtypes, and inheritance. It has proven to be quite difficult to design such a language which has a secure type system. A particular problem with statically type checking object-oriented languages is designing type-checking rules which ensure that methods provided in a superclass will continue to be type correct when inherited in a subclass. The type-checking rules for TOOPL have this feature, enabling library suppliers to provide only the interfaces of classes with actual executable code, while still allowing users to safely create subclasses. In order to achieve greater expressibility while retaining type-safety, we choose to separate the inheritance and subtyping hierarchy in the language. The design of...
A theory of primitive objects: second-order systems
- Proc. ESOP’94 - European Symposium on Programming
"... We describe a second-order calculus of objects. The calculus supports object subsumption, method override, and the type Self. It is constructed as an extension of System F with subtyping, recursion, and first-order object types. 1. ..."
Abstract
-
Cited by 53 (7 self)
- Add to MetaCart
We describe a second-order calculus of objects. The calculus supports object subsumption, method override, and the type Self. It is constructed as an extension of System F with subtyping, recursion, and first-order object types. 1.
Type Checking Higher-Order Polymorphic Multi-Methods
, 1997
"... We present a new predicative and decidable type system, called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and class-based objectoriented programming and higher-order multi-methods in the tradition of CLOS [12]. Inste ..."
Abstract
-
Cited by 49 (0 self)
- Add to MetaCart
We present a new predicative and decidable type system, called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and class-based objectoriented programming and higher-order multi-methods in the tradition of CLOS [12]. Instead of using extensible records as a foundation for object-oriented extensions of functional languages, we propose to reinterpret ML datatype declarations as abstract and concrete class declarations, and to replace pattern matching on run-time values by dynamic dispatch on run-time types. ML is based on universally quantified polymorphic constrained types. Constraints are conjunctions of inequalities between monotypes built from type constructors organized into extensible and partially ordered classes. We give type checking rules for a small, explicitly typed functional language `a la XML [20] with multi-methods, show that the resulting system has decidable minimal types, and discuss subject ...
On subtyping and matching
- In Proceedings ECOOP '95
, 1995
"... Abstract. A relation between recursive object types, called matching, has been proposed as a generalization of subtyping. Unlike subtyping, matching does not support subsumption, but it does support inheritance of binary methods. We argue that matching is a good idea, but that it should not be regar ..."
Abstract
-
Cited by 45 (3 self)
- Add to MetaCart
Abstract. A relation between recursive object types, called matching, has been proposed as a generalization of subtyping. Unlike subtyping, matching does not support subsumption, but it does support inheritance of binary methods. We argue that matching is a good idea, but that it should not be regarded as a form of F-bounded subtyping (as was originally intended). We show that a new interpretation of matching as higher-order subtyping has better properties. Matching turns out to be a third-order construction, possibly the only one to have been proposed for general use in programming.
Decidability of Higher-Order Subtyping with Intersection Types
- University of Edinburgh, LFCS
, 1994
"... The combination of higher-order subtyping with intersection types yields a typed model of object-oriented programming with multiple inheritance [11]. The target calculus, F ! , a natural generalization of Girard's system F ! with intersection types and bounded polymorphism, is of independent i ..."
Abstract
-
Cited by 40 (11 self)
- Add to MetaCart
The combination of higher-order subtyping with intersection types yields a typed model of object-oriented programming with multiple inheritance [11]. The target calculus, F ! , a natural generalization of Girard's system F ! with intersection types and bounded polymorphism, is of independent interest, and is our subject of study. Our main contribution is the proof that subtyping in F ! is decidable. This yields as a corollary the decidability of subtyping in F ! , its intersection free fragment, because the F ! subtyping system is a conservative extension of that of F ! . The calculus presented in [8] has no reductions on types. In the F ! subtyping system the presence of fi-conversion -- an extension of fi-conversion with distributivity laws -- drastically increases the complexity of proving the decidability of the subtyping relation. Our proof consists of, firstly, defining an algorithmic presentation of the subtyping system of F ! , secondly, proving that th...
Extensible records in a pure calculus of subtyping
- In Theoretical Aspects of Object-Oriented Programming
, 1994
"... Extensible records were introduced by Mitchell Wand while studying type inference in a polymorphic λ-calculus with record types. This paper describes a calculus with extensible records, F <:ρ, that can be translated into a simpler calculus, F <: , lacking any record primitives. Given independent axi ..."
Abstract
-
Cited by 35 (8 self)
- Add to MetaCart
Extensible records were introduced by Mitchell Wand while studying type inference in a polymorphic λ-calculus with record types. This paper describes a calculus with extensible records, F <:ρ, that can be translated into a simpler calculus, F <: , lacking any record primitives. Given independent axiomatizations of F <:ρ and F <: (the former being an extension of the latter) we show that the translation preserves typing, subtyping, and equality. F <:ρ can then be used as an expressive calculus of extensible records, either directly or to give meaning to yet other languages. We show that F <:ρ can express many of the standard benchmark examples that appear in the literature. Like other record calculi that have been proposed, F <:ρ has a rather complex set of rules but, unlike those other calculi, its rules are justified by a translation to a very simple calculus. We argue that thinking in terms of translations may help in simplifying and organizing the various record calculi that have been proposed, as well as in generating new ones.

