Design patterns have been categorized as creational, structural, and behavioral . Creational patterns abstract the instantiation process, structural patterns abstract object composition, and behavioral patterns abstract object communication and responsibilities. The structural and behavioral patterns that benefit from the context relation can be categorized into two groups:
Table 3: C++ extensions
In the remainder of this paper, we present design and implementation techniques for achieving the two forms of behavior evolution. To enable the direct expression of the context relation in C++, we introduce the constructs depicted in Table 3. We show implementations of the patterns both in C++ and in our extended version of C++. We present a formal semantics for an example object-oriented data and behavioral model to demonstrate the context pattern. Our claim is that by adding context relations to the design and implementation vocabulary, design patterns are more easily modeled and implemented.