Skip to main content



      Home
Home » Modeling » Compare » Compare models structurally equal(Comparing models with the same structure fails)
icon5.gif  Compare models structurally equal [message #1753374] Sun, 05 February 2017 04:47 Go to next message
Eclipse UserFriend
Hello,

I am trying to compare to models that conform to a simple PetriNet like structure: A Path has states and transitions. A Transition has a source and target State. I have attached the models and metamodel.

Visually inspecting the xmi I can tell that the structure of the models is the same, i.e. for each Transitions in model A, there is a matching Transition in model B, that is structurally equivalent. By structurally equivalent I mean that it has the same position if one follows the Path from transition to transition.

However, EMF Compare reports that the models have differences. I use a custom DefaultDiffEngine that disables ordering changes. The reason is that 1) both states and transitions are unordered collections, and 2) the order does not affect the structure.

I am missing Rolling Eyes some flag/override method to make this comparison work?
Re: Compare models structurally equal [message #1753435 is a reply to message #1753374] Mon, 06 February 2017 07:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Horacio,

I just briefly looked at the example models you attached and I think you'll need to implement a custom matcher that knows when two states should be considered a match (i.e., they correspond to each other). I guess the transitions should be matched by name, right?

Best wishes,

Philip

--
Philip Langer

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Compare models structurally equal [message #1753624 is a reply to message #1753435] Wed, 08 February 2017 04:23 Go to previous message
Eclipse UserFriend
Hi Philip,

Thanks for the reply. I was hoping for a more generalized approach... but going over the EMF Compare code I think is not as easy as one might think...

Cheers,
Previous Topic:Problems using the UI compare with dynamic Ecore models
Next Topic:EMF Compare hide matched stereotype applications
Goto Forum:
  


Current Time: Thu Jul 17 14:43:18 EDT 2025

Powered by FUDForum. Page generated in 0.07504 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top