Class Refinement as Semantics of Correct Subclassing

  • Authors:
  • Ralph Back;Anna Mikhajlova;Joakim Wright von

  • Affiliations:
  • -;-;-

  • Venue:
  • Class Refinement as Semantics of Correct Subclassing
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

Constructing new classes from existing ones by inheritance or subclassing is a characteristic feature of object-oriented development. Imposing semantic constraints on subclassing allows us to ensure that subclass instances may be substituted for the corresponding superclass instances without invalidating the clients. We define the class refinement relation which captures these semantic constraints. Clients of class instances are modeled as programs making an iterative choice over invocation of class methods, and we prove that when a subclass refines its superclass, substituting subclass instances for superclass instances is refinement for the clients.