Combining contracts and exemplar-based programming for class hiding and customization

  • Authors:
  • Victor B. Lortz;Kang G. Shin

  • Affiliations:
  • Real- Time Computing Laboratory, Department of Electrical Engineering and Computer Science, The University of Michigan, Ann Arbor, Michigan;Real-Time Computing Laboratory, Department of Electrical Engineering and Computer Science, The University of Michigan, Ann Arbor, Michigan

  • Venue:
  • OOPSLA '94 Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

For performance reasons, client applications often need to influence the implementation strategies of libraries whose services they use. If an object-oriented library contains multiple service classes customized for different usage patterns, applications can influence service implementations by instantiating the customized classes that match their needs. However, with many similar service classes, it can be difficult for applications to determine which classes to instantiate. Choosing the wrong class can result in very subtle errors since a customized class might use optimizations that work only over a restricted domain. In this paper, we show how client-side software contracts and exemplar-based class factories can be used to construct customized server objects. By expressing priorities and requirements in contracts, clients can delegate service class selection to the library and thereby avoid implicit dependencies on the library implementation. We have used this approach in the implementation of a real-time database system.