Database Reference
In-Depth Information
Figure 1: Model dependency chains
Cool Car
instance of the Engine (V6) and a subtype of the ABS type. This is the expected behavior,
as a subtype without any modifi cation should look exactly like its base type. Notice the ar-
row that points from V6 in Cool Car to V6 in Car. Both of these are instances, but there is
dependency between the two objects. If we modify V6 in Car, V6 in Cool Car should also be
modifi ed automatically for the same reason: If we do not modify Cool Car it should always
look like Car itself. The same logic applies if we create an instance of Cool Car - My Car
in Figure 1. It introduces a dependency between V6 in My Car and V6 in Cool Car. As the
fi gure shows, this forms a dependency chain from V6 in My Car through V6 in Cool Car
and V6 in Car all the way to the Engine type model.
An interesting situation arises if we modify V6 in Cool Car by changing an attribute.
The question is whether an attribute change in V6 in Car should propagate down to V6
in Cool Car and below. Since the attribute has been overridden, the dependency chain is
broken up with respect to that attribute. However, if the same attribute is changed in V6 in
Cool Car, that should propagate down to V6 in My Car unless it has already been overrid-
den there. Figure 2 shows the same set of models, but only from the pure type inheritance
perspective.
The real strength of types and instances can be exploited with the use of model librar-
ies. Based on predefi ned and verifi ed models residing in these libraries, the modeler is able
to create new instances in his or her project without losing the connection to the prototype
model; thus further enhancements and corrections in the original model can be easily propa-
gated to all of its subtypes and instances automatically.
The type and instance feature of GME is sometimes confused with the inheritance
relation in the meta-modeling environment. While the meta-inheritance implements the
When a subtype of the Car is created, e.g., Cool Car above, we indirectly create another
Search WWH ::




Custom Search