Wide Classes

  • Authors:
  • Manuel Serrano

  • Affiliations:
  • -

  • Venue:
  • ECOOP '99 Proceedings of the 13th European Conference on Object-Oriented Programming
  • Year:
  • 1999

Quantified Score

Hi-index 0.02

Visualization

Abstract

This paper introduces the concepts of wide classes and widening as extensions to the object model of class-based languages such as Java and Smalltalk. Widening allows an object to be temporarily widened, that is transformed into an instance of a subclass, a wide class, and, later on, to be shrunk, that is reshaped to its original class. Wide classes share the main properties of plain classes: they have a name, a superclass, they may be instantiated, they have an associated class predicate and an associated type that may be used to override function definitions. Widening is also useful to implement transient data storage for long-lasting computations. In particular, it helps reducing software data retention. This phenomenon arises when the actual data structures used in a program fail to reflect time-dependent properties of values and can cause excessive memory consumption during the execution. Wide classes may be implemented for any dynamically-typed class-based programming language with very few modifications to the existing run-time system. We describe the simple and efficient implementation strategy used in the Bigloo runtime system.