Mapping Between Models


Models may have semantic relationships with other models for example, when a set of models describes a particular system at different levels of abstraction. As code-driven developers, we construct one model from others by applying a set of implicit rules.

MDA must support iterative and incremental development. This means that mappings between models must be repeatable. This makes it possible to express each aspect of a system at an appropriate level of abstraction while keeping the various models in synch.

Models may have semantic relationships with other models; for example, a set of models may describe a particular system at different levels of abstraction. It's desirable to have mappings between different but related models performed automatically.

A mapping between models is assumed to take one or more models as its input (these are the "sources") and produce one output model (this is the "target"). The rules for the mapping are described by mapping rules within a mapping function; the mapping is an application of the mapping function. These rules are described at the metamodel level in such a way that they're applicable to all sets of source models that conform to the given metamodel.

Figure 2-3 extends Figure 2-1 with illustrations of these concepts.

Figure 2-3. Mappings, mapping functions, and mapping rules

graphics/02fig03.gif

A person involved in an MDA-compatible process can automate a mapping function by providing an executable specification of it. Such an implementation allows for the automation of important steps of an MDA-driven process. However, this implementation isn't required as long as one can verify any manually conducted mapping against the specification that the mapping function provides.

For example, a mapping function that describes how to map a UML model of an application to a corresponding Java source code model may be "A UML class maps to a Java class declaration, where the name of the Java class matches the name of the UML class." The transformation can be performed, albeit expensively, by hand, and checked for correctness.

We take a closer look at mappings and mapping functions in Chapter 5.



MDA Distilled. Principles of Model-Driven Architecture
MDA Distilled. Principles of Model-Driven Architecture
ISBN: B00866PUN2
EAN: N/A
Year: 2003
Pages: 134

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