Bx Examples Repository
Title: SetsToOrderedSets
Version: 0.1
Type:
Sketch.
Overview
This scenario is designed to check how non-determinism can be handled in one direction of a bx.
In this case, source models (sets) have no ordering on their contained elements, while target models (Ordered Sets) use previous and next edges to impose a partial order on the contained elements.
Models
In the diagram below (taken from [1]), simple class diagrams are used to show one possible representation of this scenario.
Consistency
A source and target model pair is consistent if both sets contain the same (wrt. to their values) elements.
Consistency Restoration
Relatively open and up to discussion. One would (arguably!) expect a bx tool to restore consistency in an automated manner in the backwards direction, but perhaps to ask the user where new elements should be placed in the forward direction.
Other policies that could be used to make things deterministic include always appending new elements at the end of the (first/last) sequence, etc. In any case, it is relatively clear that one doesn't want existing sequences to be unnecessarily broken up or reshuffled (least change/surprise).
Properties [optional section]
Variants [optional section]
Discussion
References [optional section]
This example is taken from the following paper:
[1] Westfechtel, Bernhard. "Case-based exploration of bidirectional transformations in QVT Relations." Software & Systems Modeling (2016): 1-41.
Author(s)
Bernhard Westfechtel, Anthony Anjorin
Reviewer(s)
Comments
Artefacts [optional section]
An implementation with QVT-R can be taken from: Westfechtel, Bernhard. "Case-based exploration of bidirectional transformations in QVT Relations." Software & Systems Modeling (2016): 1-41.
An implementation with TGGs can be downloaded from here or viewed as diagrams here.
Note that both the paper and implementations focussed on "batch" forward and backward transformations and not on consistency restoration.