A formal model for verifying compound design patterns

  • Authors:
  • Gabriela Aranda;Richard Moore

  • Affiliations:
  • Comahue University, Buenos Aires 1400 (8300), Neuquen - Argentina;International Institute for Software Technology - United Nations University, Macau - South China

  • Venue:
  • SEKE '02 Proceedings of the 14th international conference on Software engineering and knowledge engineering
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Object-oriented design patterns commonly "work together", and many such combinations of patterns are identified as related patterns for each given pattern in the standard GoF pattern catalogue [?] while other combinations, such as the Template Method-Factory Method Compound Pattern, are described in [?].When designers apply these compound patterns, they need to be sure they are doing so correctly, particularly where one component of the design plays different roles in different patterns. This can be achieved by using a formal language to express the set of rules the design must satisfy in order to represent a correct use of the patterns.A similar approach but for individual patterns has been used in [?], [?], [?], which use a formal model of a generic object-oriented design [?] as the basis for formal specifications of the properties of the majority of the design patterns in the GoF catalogue [?]. These specifications, written in RSL (the RAISE specification language [?]), then give a means of checking whether a given subset of a design matches one instance of one particular pattern.However, the model presented in [?] assumes that only a single instance of a single pattern is being checked at any time, whereas in practice a design may involve many different patterns and also many different occurrences of the same pattern. In addition, the patterns may be overlapping, that is they may share roles, so that, for example, a single class or method in a design may play one role in one pattern and another role in another pattern.We therefore extend this model so that it can describe the matching of a single design against an arbitrary combination of patterns all together, including multiple occurrences of the same pattern and also patterns with overlapping roles as in the compound patterns. Then we express the essential properties of the compound patterns in terms of this extended model, thus giving us a means of checking formally that a design matches a particular compound pattern.