I would like to know some references and ideas in how to calculate the (set?) difference between two UML models. Basically, I have a system (represented in UML/xmi), and to this system several patterns (also represented in UML/xmi) can be applied.
For example, we can apply pattern a to the result of applying pattern b to the system – Pa(Pb(S)). I would like then to calculate dif(Pb, S) and then dif(Pa, S), since after a pattern is applyed, the merged system can be considered as a original system.
I’m looking for references (in the literature or not) and algorithms, since I dont want to reinvent the wheel. I will code in Java in the end.
Thanks in advance,
Pedro
With Eclipse EMF Compare, you can compare two different EMF model instances. Since UML is represented as an EMF Model instance in Eclipse, you can use it to compare your UML models. Just install EMF Compare, mark your UML models in the package explorer (or whatever view you use) and the choose Compare -> With each other… from the context menu. The Compare editor will let you save the differences as an .emfdiff file.