Domain-Speciffc Model Differencing for Graphical Domain-Speciffic Languages
Explore the docs »
·
Report Bug
·
Request Feature
Table of Contents
During the development of a software project, different developers collaborate on creating and changing models. These models evolve and need to be versioned. Over the past several years, progress has been made in offering dedicated support for model versioning that improves on what is being supported by text-based version control systems. However, there is still a need to understand model differences in terms of the semantics of the modeling language, and to visualize the changes using its concrete syntax. To address these issues, we propose a comprehensive approach -called DSMCompare- that considers both the abstract and the concrete syntax of a domain-specific language (DSL) when expressing model differences, and which supports defining domain-specific semantics for specific difference patterns. The approach is based on the automatic extension of the DSL to enable the representation of changes and on the automatic adaptation of its graphical concrete syntax to visualize the differences. Besides, we allow for the definition of semantic differencing rules to capture recurrent domain-specific difference patterns. Since these rules can be conflicting with each other, we introduce algorithms for conflict resolution and rule scheduling. To demonstrate the applicability and effectiveness of our approach, we report on evaluations based on synthetic models and on version histories of models developed by third parties. This wiki page will help you run the experiments discussed in the paper listed in the Publication section below.
- Eclipse Modeling Framework (version 2020-09)
- EMF-Compare model comparison tool (version 3.3.9)
- Henshin (version 1.7)
- Sirius editor (version 6.3.0)
DSMCompare consists of three main modules. The Comparison module takes as input two model versions and produces the corresponding fine granular Diff model. This module relies on the EMF-Compare model comparison tool. The Ordering module computes the priority order of the Semantic Differencing Rules (SDRule) to be applied. It first transforms the SDRules into Henshin rules. Then, it invokes Henshin's MultiCDA tool to retrieve the potential conflicts among the rules. The ordering module takes the conflicts and the SDRules to produce the scheduling units of the Henshin transformation. Finally, the Lifting module applies this transformation on the Diff model to obtain the semantically lifted Diff model. The difference model is then fed to generated Sirius editor (version 6.3.0) to present the semantic Diff model in concrete syntax.
To get a local copy up and running follow these simple example steps.
Here is a list of things you need to install.
- Eclipse (version 2020-09), Modeling
In the Help/Install new software menu make sure that the following features with the versions specified in the (Built with section) installed . EMF . Henshin . EMF-Compare . Sirius . Xtend
- Install Python (for the ordering algorithm)
-
Clone the repo (Codes are in the SourceCode folder)
git clone https://github.com/geodes-sms/DSMCompare.git
-
Comparison
Path for the DSLs (dsls folder)
SourceCode/DSMCompare/com.Zadahmad.DSEMFCompare.editor/dsls
Path for the Driver files (defined as JUnits)
SourceCode/DSMCompare/com.Zadahmad.DSEMFCompare.editor/src/com/zadahmad/dsemfcompare/editor/client
2.1 Open the driver files like "CaseStudyDsmcPacman.java" in the Pac-Man case
2.2 To calculate the fine-granular diffs: Run the following method.
emfCompareResultToFineGranularDsmdiff()
Results will be stored in the DSLs folder. For the Pac-Man case for example the result will be stored in the ".../dsls/pacman/dsdiffafterruningatest" path
-
Ordering
3.1 To transform the DSRules to its equivalent in the Henshin: Run the following method
dsmDiffRulesToHenshinTextRulesRun()
The result will be stored in a file with ".hensin_text" extension. You need to transform it to Henshin by right-clicking on it and selecting the transform command. For example, for the Pac-Man case study, the result will be stored in the ".../dsls/pacman/dsdiffrulesinhenshin/" path
3.2 to calculate the conflicts among the DSRules: Run the following method.
dsmcConflictManagement()
The results will be shown in the console and need to be copied and formatted to the python code that calculates the ordering.
3.3. Calculate the ordering using the python code located in the following path:
SourceCode/VertexSortingPython/VertexSorting/vertex_sort.py
3.4 Copy the conflict matrix retrieved from step 3.2 to the "adjacency_matrix" field. In the Pac-Man case study, the matrix is called "pacman.set_adjacency_matrix". Then run the code. The results (the ordering) will be shown in the console.
-
Lifting
4.1 Specify the rule units representing the orders generated inside the ".henshin_text" file that is created in step 3.1. You also need to use the results generated in step 3.4 showing the preferred order of execution of the rules. The result will be stored in the path specified by the user. The pre-executed example results are stored in the "dsdiffrulesinhenshin" folder for each case study.
4.2 Graphical concrete syntax project is storedin the following path
SourceCode\runtime-Sirius
4.3 Inside the Eclipse, select "com.Zadahmad.DSEMFCompare.editor" project and select RUN 4.4 Select menu command "File/Open Projects from file system" and select "runtime-Sirius" project. There you can find examples from different case studies
For supplementary data, please refer to the supplements.md
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU LESSER GENERAL PUBLIC LICENSE. See LICENSE for more information.
Manouchehr-Zadahmad - LinkedIn - zadahmad@gmail.com
Project Link: https://github.com/geodes-sms/DSMCompare