2.5 Advanced: UML Metamodel of Structural Elements (for the Advanced Modeler)


Note: Here be dragons....[7]

[7] These particular dragons are the most likely thing in this book to be wrong as the internals of the metamodel are reworked during the finalization process of the UML 2.0. However, their semantic meaning will be stable even if the details of the metarelations change, so for the average UML modeler, such changes will be largely irrelevant.

We've talked about the UML concepts quite a bit in this chapter. In this section, we discuss the UML internals in just a bit more detail. Models done in UML are done in what is called a four-layer metamodel architecture, as shown in Table 2-1.

Table 2-1. Metamodel Language Architecture

Layer

Description

Examples

M3

Meta-metamodel

Provides a language for specifying metamodels, such as UML

Metaclass, meta-attribute, meta-association, meta-operation

M2

Metamodel

An instance of a modeling language, such as UML

Class, interface, attribute, association, operation, state, component

M1

User Model

Model of the user application or system done in the metamodel language

Sensor, DC motor, Gaussian filter, window, direction, speed, inertia, waveform, text display

M0

User Objects

Instances of the specification elements of the user model

Sensor [1], myMotor:Motor, MAF:Filter, mainWindow:Window

The idea is that each layer is built using the elements specified in the layer above. The UML at the M2 level is constructed from a basis defined by the meta-metamodel at level M3, while user model elements (M1) are constructed using UML elements, such as classes, associations, and so on. The runtime model (M0) executes instances of the classes defined in the user model.

That having been said, we've thrown around some UML metamodel elements such as classifier, class, component, subsystem, interface, and so on. The UML 2.0 specification is the ultimate arbitrator of what is or is not UML, and is a maintained (i.e., managed, updated, and revised) standard, so the particulars at any point in time might differ slightly from what is presented here. Nevertheless, it is useful to understand the metarelations between the meta-elements in the UML. Figure 2-19 shows the relation of the primary structural elements in the UML that we have discussed in this chapter.

Figure 2-19. Subset of UML Metamodel for Structural Elements

graphics/02fig19.gif

The UML metamodel is, of course, (far) more complex than this. I have not shown all the relations among the elements, nor all the more abstract metasuperclasses, the most central metaclass being Classifier. Common Classifiers include Class, DataType, Association, StructuredClassifier, Component, Subsystem, Node, and Use Case. The fact that they have a common ancestry allows the common aspects to be captured in a single place. Classifers associate with Features, which may be either BehavioralFeatures (such as operations) or StructuralFeatures. In addition, BehavioredClassifiers may have Behaviors, such as Statemachines or Activities.



Real Time UML. Advances in The UML for Real-Time Systems
Real Time UML: Advances in the UML for Real-Time Systems (3rd Edition)
ISBN: 0321160762
EAN: 2147483647
Year: 2003
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net