Behavioral Subtyping Using Invariants and Constraints

Abstract

We present a way of defining the subtype relation that ensures that subtype objects preserve behavioral properties of their supertypes. The subtype relation is based on the specifications of the sub and supertypes. Our approach handles mutable types and allows subtypes to have more methods than their supertypes. Dealing with mutable types and subtypes that extend their supertypes has surprising consequences on how to specify and reason about objects. In our approach, we discard the standard data type induction rule, we prohibit the use of an analogous history rule, and we make up for both losses by adding explicit predicates invariants and constraints to our type specifications. We also discuss the ramifications of our approach of subtyping the design of type families.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Jul 01, 1999
Accession Number
ADA367674

Entities

People

  • Barbara H. Liskov
  • Jeannette Wing

Organizations

  • Carnegie Mellon University

Tags

Communities of Interest

  • Ground and Sea Platforms

DTIC Thesaurus Topics

  • Abstracts
  • Computations
  • Computer Programming
  • Computer Science
  • Computers
  • Covariance
  • Databases
  • Elephants
  • Environment
  • Hierarchies
  • Language
  • Object Oriented Programming
  • Object-Oriented Programming Language
  • Programming Languages
  • Software Development
  • Specifications
  • Standards

Readers

  • Oncology (Cancer Research).
  • Systems Analysis and Design
  • Theoretical Analysis.