Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] False positives on multivalued EReferences with containment=false
[EMF Compare] False positives on multivalued EReferences with containment=false [message #619066] Thu, 29 May 2008 15:53
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Hi!

I've used EMF Compare with some models of mine, receiving some false
positives (sometime too much false positives). Those occur only in
multivalued EReferences that are apparently equal (referenced values
where equal). The only different thing from other ERefereces of the same
metamodel I've noticed is having no EOpposite and containment=false.

Take a look at these two models that generate a false positive (using
UMLX's QVT Core metamodel):


########### Model 1 #############

<?xml version="1.0" encoding="ASCII"?>
<eqvtbase:Transformation xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:eqvtbase="http://www.eclipse.org/gmt/umlx/EQVTbase" xmi:id="ast0"
name="umlRdbms" nsURI="umlRdbms" nsPrefix="umlRdbms">
<modelParameter xmi:id="ast8" name="middle">
<usedPackage
href=" platform:/resource/com.foo.org/models_ecore/TumlRdbms.ecore# / "/>
</modelParameter>
</eqvtbase:Transformation>

########### Model 2 #############

<?xml version="1.0" encoding="ASCII"?>
<eqvtbase:Transformation xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:eqvtbase="umlRdbms"
xmi:id="ast0" name="CHANGED" nsURI="test" nsPrefix="umlRdbms">
<modelParameter xmi:id="ast8" name="middle">
<usedPackage
href=" platform:/resource/com.foo.org/models_ecore/TumlRdbms.ecore# / "/>
</modelParameter>
</eqvtbase:Transformation>

####################################

- The only differences' I've introduced is the nsURI of the root node.

EMF Compare shows correctly the changes on the nsURI, but also changes
on "usedPackage" EReference, indicating that
" platform:/resource/com.foo.org/models_ecore/TumlRdbms.ecore# / " has been
added on the first model, and deleted in the second one.

I've been digging a little bit in the source code and noticed what's
going on.

- Root node is marked as not equal (similarity = 0.6....)
- Typed model node is marked as equal (similarity = 1.0)

These four nodes are properly added to
"GenericDiffEngine::eObjectToMatch" hashMap.

The problem appears in "GenericDiffEngine::computeAddedReferences" and
"GenericDiffEngine::computeDeletedReferences", while trying to retrieve
from the map the matchModel of
" platform:/resource/com.foo.org/models_ecore/TumlRdbms.ecore# / ", which
doesn't actually exist in "eObjectToMatch" (what makes sense, since that
reference wasn't matched during first matching phase).


So I guess there are two solutions:

- Add these referenced resources to "eObjectToMatch"
- Filtering what "(List<EObject>)EFactory.eGetAsList..." returns
("GenericDiffEngine::createNonConflictingReferencesUpdate" method)


I'm sorry if I haven't been clear. If necessary, I'll send you the
example models and metamodel.


Best regards,
VĂ­ctor.
Previous Topic:[CDO] reading/writting throughput performances
Next Topic:[EMF Compare] Innacuracies while comparing lists of very similar elements
Goto Forum:
  


Current Time: Sun Mar 29 22:37:26 GMT 2020

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

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

Back to the top