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.
- G. Aranda and R. Moore. Formally modelling compound design patterns. Technical Report 225, UNU/IIST, P.O. Box 3058, Macau, December, 2000.]]Google Scholar
- G. Aranda and R. Moore. Gof creational patterns: A formal specification. Technical Report 224, UNU/IIST, P.O. Box 3058, Macau, December, 2000.]]Google Scholar
- A. Flores and R. Moore. Analysis and Specification of GoF Structural Patterns. In Proceedings of the IASTED International Symposia: Applied Informatics, pages 625-630, Innsbruck, Austria, February 2001.]]Google Scholar
- A. Flores, R. Moore, and L. Reynoso. A Formal Model of Object-Oriented Design and GoF Design Patterns. In J. N. Oliveira and P. Zave, editors, FME2001: Formal Methods for Increasing Software Productivity, volume 2021 of Lecture Notes in Computer Science, pages 223-241. Springer Verlag, 2001.]] Google ScholarDigital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, 1995.]] Google ScholarDigital Library
- T. R. L. Group. The RAISE Specification Language. BCS Practicioner Series, Prentice Hall, 1992.]] Google ScholarDigital Library
- R. Moore and L. Reynoso. A Precise Specification of GoF Behavioural Patterns. In Proceedings of the ACIS 2nd International Conference on Software Engineering, Artificial Intelligence, Networking & Parallel/Distributed Computing: SNPD'01, pages 262-270, Nagoya, Japan, August 2001.]]Google Scholar
- J. Vlissides. Pattern Hatching: Design Patterns Applied. Software Patterns Series. Addison-Wesley, 1998.]] Google ScholarDigital Library
- J. Vlissides. Composite Design Patterns(They Aren't What You Think). C++ Report, June 1998. http://research.ibm.com/people/v/vlis/pubs.html.]]Google Scholar
Recommendations
Formal specification of design patterns' relationships
ACST'06: Proceedings of the 2nd IASTED international conference on Advances in computer science and technologyPatterns are effective means of disseminating solutions to problems repeatedly encountered during object-oriented design. Patterns are mostly described using informal means (text and graphical notations), which lack well-defined semantics. As many new ...
Formal specification of the variants and behavioural features of design patterns
The formal specification of design patterns is widely recognized as being vital to their effective and correct use in software development. It can clarify the concepts underlying patterns, eliminate ambiguity and thereby lay a solid foundation for tool ...
A formal model of design-patterns based design
ISEC '09: Proceedings of the 2nd India software engineering conferenceIn this paper we present a formal model to represents pattern-based design of an application. We represent Design-patterns in form of their Structural, Behavioral and Contractual aspect. We have modeled design in terms of Design-patterns, their ...
Comments