Results 11 - 20
of
56
Simplifying Subtyping Constraints: A Theory
, 2000
"... This paper offers a theoretical study of constraint simplification, a fundamental issue for the designer of a practical type inference system with subtyping. In the simpler case where constraints are equations, a simple isomorphism between constrained type schemes and finite state automata yields a ..."
Abstract
-
Cited by 44 (5 self)
- Add to MetaCart
This paper offers a theoretical study of constraint simplification, a fundamental issue for the designer of a practical type inference system with subtyping. In the simpler case where constraints are equations, a simple isomorphism between constrained type schemes and finite state automata yields a complete constraint simplification method. Using it as a guide for the intuition, we move on to the case of subtyping, and describe several simplification algorithms. Although no longer complete, they are conceptually simple, efficient, and very effective in practice. Overall, this paper gives a concise theoretical account of the techniques found at the core of our type inference system. Our study is restricted to the case where constraints are interpreted in a non-structural lattice of regular terms. Nevertheless, we highlight a small number of general ideas, which explain our algorithms at a high level and may be applicable to a variety of other systems.
A Unifying Type-Theoretic Framework for Objects
, 1993
"... We give a direct type-theoretic characterization of the basic mechanisms of object-oriented programming, including objects, methods, message passing, and subtyping, by introducing an explicit constructor for object types and suitable introduction, elimination, and equality rules. The resulting abst ..."
Abstract
-
Cited by 43 (9 self)
- Add to MetaCart
We give a direct type-theoretic characterization of the basic mechanisms of object-oriented programming, including objects, methods, message passing, and subtyping, by introducing an explicit constructor for object types and suitable introduction, elimination, and equality rules. The resulting abstract framework provides a basis for justifying and comparing previous encodings of objects based on recursive record types (Cardelli, 1984; Cardelli, 1992; Bruce, 1994; Cook et al., 1990; Mitchell, 1990a) and encodings based on existential types (Pierce & Turner, 1994).
Polarized Higher-Order Subtyping
, 1997
"... The calculus of higher order subtyping, known as F ω ≤ , a higher-order polymorphic λ-calculus with subtyping, is expressive enough to serve as core calculus for typed object-oriented languages. The versions considered in the literature usually support only pointwise subtyping of type operators, whe ..."
Abstract
-
Cited by 37 (1 self)
- Add to MetaCart
The calculus of higher order subtyping, known as F ω ≤ , a higher-order polymorphic λ-calculus with subtyping, is expressive enough to serve as core calculus for typed object-oriented languages. The versions considered in the literature usually support only pointwise subtyping of type operators, where two types S U and T U are in subtype relation, if S and T are. In the widely cited, unpublished note [Car90], Cardelli presents F ω ≤ in a more general form going beyond pointwise subtyping of type applications in distinguishing between monotone and antimonotone operators. Thus, for instance, T U1 is a subtype of T U2, if U1 ≤ U2 and T is a monotone operator. My thesis extends F ω ≤ by polarized application, it explores its proof theory, establishing decidability of polarized F ω ≤. The inclusion of polarized application rules leads to an interdependence of the subtyping and the kinding system. This contrasts with pure F ω ≤ , where subtyping depends on kinding but not vice versa. To retain decidability of the system, the equal-bounds subtyping rule for all-types is rephrased in the polarized setting as a mutual-subtype requirement of the upper bounds.
A semantics of object types
, 1995
"... We give a semantics for a typed object calculus, an extension of System F with object subsumption and method override. We interpret the calculus in a per model, proving the soundness of both typing and equational rules. This semantics suggests a syntactic translation from our calculus into a simpl ..."
Abstract
-
Cited by 36 (7 self)
- Add to MetaCart
We give a semantics for a typed object calculus, an extension of System F with object subsumption and method override. We interpret the calculus in a per model, proving the soundness of both typing and equational rules. This semantics suggests a syntactic translation from our calculus into a simpler calculus with neither subtyping nor objects.
Type Systems For Object-Oriented Programming Languages
, 1996
"... Object-oriented programming languages (oopl's) provide important support for today's large-scale software development projects. Unfortunately, the typing issues arising from the object-oriented features that provide this support are substantially different from those that arise in typing p ..."
Abstract
-
Cited by 32 (7 self)
- Add to MetaCart
Object-oriented programming languages (oopl's) provide important support for today's large-scale software development projects. Unfortunately, the typing issues arising from the object-oriented features that provide this support are substantially different from those that arise in typing procedural languages. Attempts to adapt procedural type systems to object-oriented languages have resulted in languages like Simula, C++ , and Object Pascal, which have overly restrictive type systems. Among other things, the rigidity of these systems frequently force programmers to use type casts, which are a notorious source of hard-to-find bugs. These restrictive type systems also mean that many programming idioms common to untyped oopl's such as Smalltalk are not typeable. One source of this lack of flexibility is the conflation of subtyping and inheritance. Briefly, inheritance is an implementation technique in which new object definitions may be given as incremental modifications to existing defi...
An imperative object calculus
- PROC. TAPSOFT'95
, 1995
"... We develop an imperative calculus of objects. Its main type constructor is the one for object types, which incorporate variance annotations and Self types. A subtyping relation between object types supports object subsumption. The type system for objects relies on unusual but beneficial assumptions ..."
Abstract
-
Cited by 29 (5 self)
- Add to MetaCart
We develop an imperative calculus of objects. Its main type constructor is the one for object types, which incorporate variance annotations and Self types. A subtyping relation between object types supports object subsumption. The type system for objects relies on unusual but beneficial assumptions about the possible subtypes of an object type. With the addition of polymorphism, the calculus can express classes and inheritance.
Programming Languages for Reusable Software Components
, 1999
"... Programming languages offer a variety of constructs to support code reuse. For example, functional languages provide function constructs for encapsulating expressions to be used in multiple contexts. Similarly, object-oriented languages provide class (or class-like) constructs for encapsulating sets ..."
Abstract
-
Cited by 26 (0 self)
- Add to MetaCart
Programming languages offer a variety of constructs to support code reuse. For example, functional languages provide function constructs for encapsulating expressions to be used in multiple contexts. Similarly, object-oriented languages provide class (or class-like) constructs for encapsulating sets of definitions that are easily adapted for new programs. Despite the variety and abundance of such programming constructs, however, existing languages are ill-equipped to support component programming with reusable software components. Component programming differs from other forms of reuse in its emphasis on the independent development and deployment of software components. In its ideal form, component programming means building programs from off-the-shelf components that are supplied by a software-components industry. This model suggests a strict separation between the producer and consumer of a component. The separation, in turn, implies separate compilation for components, allowing a pr...
Generics of a Higher Kind
"... Abstract. With Java 5 and C # 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type ..."
Abstract
-
Cited by 21 (4 self)
- Add to MetaCart
(Show Context)
Abstract. With Java 5 and C # 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type, but the resulting type constructor cannot be abstracted over. This can lead to code duplication. We removed this restriction in Scala, by allowing type constructors as type parameters and abstract types. This paper presents the design and implementation of the resulting type constructor polymorphism. It combines type constructor polymorphism with implicit parameters to yield constructs similar to, and at times more expressive than, Haskell’s constructor type classes. The paper also studies interactions with other object-oriented language constructs, and discusses the gains in expressiveness. 1
Higher-Order Intersection Types and Multiple Inheritance
, 1995
"... this paper was completed, the metatheory of this system has been studied in much greater detail by Compagnoni [ Compagnoni, 1994, Compagnoni, 1995 ] . A type system combining intersection types with a powerful form of polymorphism is of independent interest. Reynolds [ 1988 ] has argued that interse ..."
Abstract
-
Cited by 19 (7 self)
- Add to MetaCart
this paper was completed, the metatheory of this system has been studied in much greater detail by Compagnoni [ Compagnoni, 1994, Compagnoni, 1995 ] . A type system combining intersection types with a powerful form of polymorphism is of independent interest. Reynolds [ 1988 ] has argued that intersection types can form the basis of elegant language designs. But his Forsythe language has only a first-order type system, and thus lacks some of the expressive possibilities of polymorphic languages like ML. Our work represents a step toward a synthesis of these styles of language design. The following section shows some examples of multiple inheritance using a simple highlevel syntax. Section 3, the core of the paper, defines the -calculus F