viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Transitive closure returns selfloop always #319

Closed abelhegedus closed 11 years ago

abelhegedus commented 11 years ago

It seems that the transitive closure results always returns the selfloop even if it is an incorrect match.

Example:

package ecore.queries

import "http://www.eclipse.org/emf/2002/Ecore"

pattern subClass(C : EClass, Sub : EClass) {
    EClass.eSuperTypes(Sub, C);
}

pattern allSubs(C : EClass, Sub : EClass){
    find subClass+(C, Sub);
}

Try it on Ecore.ecore, and filter for ENamedElement or EClass. In the second case, the subClass pattern doesn't even have a match, while the allSubs returns (EClass, EClass) as a match.

istvanrath commented 11 years ago

This is why I think #271 is an absolutely top priority issue

ujhelyiz commented 11 years ago

The difference between self-loops and single nodes are not handled correctly, so removed resolved label.

istvanrath commented 11 years ago

@abelhegedus has verified that this works.

istvanrath commented 11 years ago

@ujhelyiz please cherry pick this into 0.6.6

szabta89 commented 11 years ago

@istvanrath I can cherry pick the commits too, but I wanted to repair the notification handling first. We just had a short discussion about it with @bergmanngabor.

istvanrath commented 11 years ago

OK - so @szabta89 repairs notifications, creates corresponding test case, and cherry picks the code into 0.6.6. We would like to get 0.6.6 get out of the door by the end of the week, so this is an ASAP task.

szabta89 commented 11 years ago

Commit comment accidentally closed the issue in the meantime ...

ujhelyiz commented 11 years ago

Cherry-pick done - for that the commit 16548043fbcb7f804e7591672fd913bee66c28f8 was additionally included to avoid unnecessary conflicts.

Some testing is needed, but automated tests seem working.