Previous | Table of Contents | Next |
In its first capacity, the Core package is a complete metamodel particularly designed for high reusability, where other
metamodels at the same metalevel (see Section 7.6, “Superstructure Architecture,? on page 14) either import or specialize
its specified metaclasses. This is illustrated in
Figure 7.2, where it is shown how UML, CWM, and MOF each depends on
a common core. Since these metamodels are at the very heart of the Model Driven Architecture (MDA), the common core may also
be considered the architectural kernel of MDA. The intent is for UML and other MDA metamodels to reuse all or parts of the
Core package, which allows other metamodels to benefit from the abstract syntax and semantics that have already been defined.
In order to facilitate reuse, the Core package is subdivided into a number of packages: PrimitiveTypes, Abstractions, Basic,
and Constructs, as shown in
Figure 7.3
. As we will see in subsequent chapters, some of these are then further divided into even more fine-grained packages to make
it possible to pick and choose the relevant parts when defining a new metamodel. Note, however, that choosing a specific package
also implies choosing the dependent packages. The package PrimitiveTypes simply contains a few predefined types that are commonly
used when metamodeling, and is designed specifically with the needs of UML and MOF in mind. Other metamodels may need other
or overlapping sets of primitive types. There are minor differences in the design rationale for the other two packages. The
package Abstractions mostly contains abstract metaclasses that are intended to be further specialized or that are expected
to be commonly reused by many metamodels. Very few assumptions are made about the metamodels that may want to reuse this package;
for this reason, the package Abstractions is also subdivided into several smaller packages. The package Constructs, on the
other hand, mostly contains concrete metaclasses that lend themselves primarily to object-oriented modeling; this package
in particular is reused by both MOF and UML, and represents a significant part of the work that has gone into aligning the
two metamodels. The package Basic represents a few constructs that are used as the basis for the produced XMI for UML, MOF,
and other metamodels based on the InfrastructureLibrary.
In its second capacity, the Core package is used to define the modeling constructs used to create metamodels. This is done
through instantiation of metaclasses in the InfrastructureLibrary
(see Section 7.9, “Metamodel Layering,? on page 16).
While instantiation of metaclasses is carried out through MOF, the InfrastructureLibrary defines the actual metaclasses that
are used to instantiate the elements of UML, MOF, CWM, and indeed the elements of the InfrastructureLibrary itself. In this
respect, the InfrastructureLibrary is said to be self-describing, or reflective.