Model transformation: Difference between revisions

Content deleted Content added
Educres (talk | contribs)
Educres (talk | contribs)
Line 22:
=== Unidirectional versus bidirectional ===
 
A unidirectional model transformation has only one mode of execution: that is, it always takes the same type of input and produces the same type of output. Unidirectional model transformations are useful in compilation-like situations, where theany output model is read-only. The relevant notion of consistency is then very simple: the input model is consistent with the model that the transformation would produce as output, only.
 
For a bidirectional model transformation, the same type of model can sometimes be input and other times be output. Bidirectional transformations are necessary in situations where people are working on more than one model and the models must be kept consistent. Then a change to either model might necessitate a change to the other, in order to maintain consistency between the models. Because each model can incorporate information which is not reflected in the other models, there may be many models which are consistent with a given model. Important special cases are:
 
*bijective transformations, in which there is exactly one model which is consistent with any given model; that is, the consistency relation is bijective. A pair of models is consistent if and only if it is related by the consistency bijection. Both models contain the same information, but presented differently.
 
*view transformations, in which a concrete model determines a single consistent view model, but the same view model might be produced from many different concrete models. The view model is an abstraction of the concrete model. If the view may be updated, a bidirectional transformation is needed. This situation is known in the database field as [[View_(database)|view-update]]. Any concrete model is consistent with its view.
 
It is particularly important that a bidirectional model transformation has appropriate properties to make it behave sensibly,: for example, not making changes unnecessarily, or discarding deliberately made changes<ref name="Stevens-properties"/>.
 
== Languages for model transformations ==