Tracing correct usage of design patterns

  • Authors:
  • Neelam Soundarajan;Johan Dovland;Jason O. Hallstrom

  • Affiliations:
  • Ohio State University, Columbus, OH;University of Oslo, Oslo, Norway;Clemson University, Clemson, SC

  • Venue:
  • SEA '07 Proceedings of the 11th IASTED International Conference on Software Engineering and Applications
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We previously described a contract formalism for specifying design patterns precisely, and showed how the formalism amplifies the benefits of pattern usage. In this paper, we present an extension to the formalism that addresses problems which arise in systems involving complex interconnections among objects, including cyclic reference structures. We develop an approach that accounts for these problems by formalizing pattern behaviors in terms of pattern-instance traces, ghost variables that record method invocations and completions on the objects participating in a pattern instance. We illustrate the approach by considering the Observer pattern.