Tracing Correct Usage of Design Patterns

N. Soundarajan (USA), J. Dovland (Norway), and J.O. Hallstrom (USA)

Keywords

Design patterns, Contract formalism, Design integrity

Abstract

We previously described a contract formalism for specify ing design patterns precisely, and showed how the formal ism amplifies the benefits of pattern usage. In this paper, we present an extension to the formalism that addresses prob lems which arise in systems involving complex intercon nections among objects, including cyclic reference struc tures. We develop an approach that accounts for these prob lems by formalizing pattern behaviors in terms of pattern instance traces, ghost variables that record method invo cations and completions on the objects participating in a pattern instance. We illustrate the approach by considering the Observer pattern.

Important Links:



Go Back