-
Notifications
You must be signed in to change notification settings - Fork 2
Difference Visualization and its DSL
One of the generated models and visualization projects is the difference visualization. The initial implementation for this difference visualization was implemented explicitly for an OSGi architecture visualization tool generated by SPViz in a bachelor's thesis.
Continuing with the OSGi architecture and view context metamodels, an example configuration for a difference visualization could look like this:
compare "KLighD-master.osgi" to "KLighD-refactor.osgidsl"
This is just a configuration that states that the two files called KLighD-master.osgi and KLighD-refactor.osgidsl should be loaded and compared against each other in a difference visualization.
The file suffixes are based on the architecture name from the architecture metamodel description.
This example should compare a current revision of current architecture of the KLighD software project on its master branch, extracted by the OSGi model extractor, against a refactoring effort written manually in the project model DSL.
The difference visualization puts both versions of the model next to each other and highlights the differences between the models similar to a split view in other tools showing textual differences such as GitHub in its pull requests. The first model is shown on the left, with elements highlighted in red that are not part of the second model (like removals), and the second model is shown on the right, with elements highlighted in green that are not part of the first model (like additions). Changed elements are highlighted in blue in both models. For better readability in this documentation, the left and right models are put beneath each other instead.
The first image shows the incremental bundle highlighted in red, because it is not part of the second image.
The two outgoing edges of it are also removed in the second image and therefore highlighted in red in the first image.
Furthermore, the two bundles krendering and kgraph have been moved into a new feature labeled ...kgraph.feature in the second image, so the new feature is highlighted with a green border.
Blue highlights are used for changed artifacts, but only those that have changed themselves.
The large feature labeled ...feature has a blue border in both versions, because its contents have changed (one removal, two moved bundles).
The moved bundles krendering and kgraph are not in blue, because they have not changed themselves, they still have the same bundle dependencies, only their containing feature has changed.
In general, an element is considered as changed
- if its metadata (e.g., its identifier) changed, but it can still be mapped to the same element in the other model based on other metadata,
- if elements contained in this element are added or removed (e.g., a bundle in a feature), or
- if outgoing connections of this element are added or removed (e.g., a dependency of a bundle or the service requirement of a service component).