Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:47 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

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?


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: Compare models structurally equal [message #1753435 is a reply to message #1753374] Mon, 06 February 2017 12:45 Go to previous messageGo to next message
Philip Langer is currently offline Philip LangerFriend
Messages: 99
Registered: March 2015
Location: Vienna, Austria
Member

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/


--
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 09:23 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

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,


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Previous Topic:Problems using the UI compare with dynamic Ecore models
Next Topic:EMF Compare hide matched stereotype applications
Goto Forum:
  


Current Time: Sat Dec 14 01:10:41 GMT 2024

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

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

Back to the top