Type-Safe Covariant Specialization with Generalized Matching

  title={Type-Safe Covariant Specialization with Generalized Matching},
  author={Ran Rinat},
  journal={Inf. Comput.},
  • Ran Rinat
  • Published 25 August 2002
  • Computer Science
  • Inf. Comput.
Matching is a relation between object types originally designed to support type-safe subclassing with binary methods. In this paper we generalize it to deal with general covariance by allowing field and method parameter types to change covariantly in matching types. In addition, object types may explicitly contain virtual types which can also change covariantly. The result is a significant increase in the flexibility of subclassing. The new definition is accompanied by appropriate machinery… 

Nested and specialized associations

It is demonstrated that other examples call for real specialization (as for classes) of associations, and together they open for rich modeling of associations similar to what the authors have for classes.

Type-safe covariance in C++

This work presents a programming technique for implementing type safe covariance in C++ that relies on existing mechanisms, specifically templates, and does not require any modification to the existing language.



Type-Safe Compilation of Covariant Specialization: A Practical Case

This work proposes a modification to the O2 compiler that adds code to correct previously ill-typed computations that arise from the use of covariant specialization, and ensures the type safety (w.r.t. covariance) of the program.

On subtyping and matching

It is argued that matching is a good idea, but that it should not be regarded as a form of F-bounded subtyping (as was originally intended), and it is shown that a new interpretation of matching as higher-order subtyped has better properties.

PolyTOIL: A type-safe polymorphic object-oriented language

The design of PolyTOIL is based on a careful formal definition of type-checking rules and semantics, and a proof of type safety is obtained with the aid of a subject reduction theorem.

F-bounded polymorphism for object-oriented programming

F-bounded quantification is introduced to provide a basis for typed polymorphic functions in object-oriented languages and is a general form of polymorphism that seems useful whenever recursive type definitions and subtyping are used.

A Proposal for Making Eiffel Type-Safe

  • W. Cook
  • Computer Science
    Comput. J.
  • 1989
Type attributes, or generic parameters with default values, are suggested as a replacement for most cases of declaration by association, and the special association type used to express type recursion cannot be explained using type attributes, and appears to be a truly novel construct for typing object-oriented programs.

A paradigmatic object-oriented programming language: Design, static typing and semantics

  • Kim B. Bruce
  • Computer Science
    Journal of Functional Programming
  • 1994
The design of TOOPL is described, a paradigmatic, statically-typed, functional, object-oriented programming language which supports classes, objects, methods, hidden instance variables, subtypes and inheritance, and the semantics of the language is rather complex, involving fixed points at both the element and type level.

Increasing Java's expressiveness with ThisType and match-bounded polymorphism

The main point of the language extensions are to support parametric polymorphism, but they also added features which provide better support for binary methods, a kind of method that is often diicult to support in a statically typed language.

Covariance and contravariance: conflict without a cause

It is argued that covariance and contravariance appropriately characterize two distinct and independent mechanisms that each have their place in object-oriented systems and can (and should) be integrated in a type-safe manner inobject-oriented languages.

A Theory of Objects

This book takes a novel approach to the understanding of object-oriented languages by introducing object calculi and developing a theory of objects around them, which covers both the semantics of objects and their typing rules.