Traceability between elements of different models is used in different applications.
After executing a model transformation, it is often necessary to know the set of elements
of the source model that were used to produce a given target model element.
A weaving model is used to save this traceability information.
This use case considers traceability of ATL transformations.
Consider we have a transformation model Mt that transforms the Source model
into the Target model. MMa contains a simple
Class Book with two attributes title and subtitle.
MMb contains a simple Class Publication with one attribute title.
The transformation Mt transforms all books into publications, and concatenates the title and
the subtitle in a single attribute. The transformation rule is illustrated in the left side of the figure below.
For one target publication, it is necessary to know which source book was used to generate it.
We illustrate the traceability links using simple target and source model elements. These links are reified and
saved in a weaving model Mw. This weaving model conforms to the weaving metamodel MMw.
The weaving metamodel is an extension of the core weaving metamodel.
The TraceLink element contains an attribute ruleName. This attribute contains the name of the
transformation rule that was executed ("SourceToTarget in the simple illustration").
The reference sourceElements refers to the two input metaelements (title and subtitle).
The reference targetElements refers to the output metaelement (title).