Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ECL matches operation for Sets(Wrong matches operation behavior for Sets / Bags)
ECL matches operation for Sets [message #1269886] Wed, 12 March 2014 09:34 Go to next message
Tanja Mayerhofer is currently offline Tanja Mayerhofer
Messages: 2
Registered: March 2014
Junior Member
Hello,

From the Epsilon book (Section 8.3.4) I understood that in case I call in ECL the matches operation on a Set with a Set as parameter, it is determined if for each item in the source collection (context) a matching item in the target collection (parameter) exists. However, the org.eclipse.epsilon.ecl.execute.operations.MatchesOperation class does not distinguishes between collection types and applies the same behavior for Sets as for OrderedSets and Sequences (the two collections have to have the same amount of items and items of the same index have to match).

I expected the following behavior (expressed in EOL):

operation Set matches(targetSet : Set) : Boolean {
for (source : Any in self) {
var sourceTargetMatchFound : Boolean = false;
for (target : Any in targetSet) {
if (source.matches(target))
sourceTargetMatchFound = true;
}
if (not sourceTargetMatchFound) {
return false;
}
}
return true;
}

Do you intend to adapt the behavior for Sets / Bags?

Best,
Tanja
Re: ECL matches operation for Sets [message #1270067 is a reply to message #1269886] Wed, 12 March 2014 13:08 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi Tanja,

Thanks for reporting this. Could you please file a bug report so that we can keep track of any progress with this?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=epsilon

Cheers,
Dimitris
Re: ECL matches operation for Sets [message #1281140 is a reply to message #1270067] Mon, 31 March 2014 12:25 Go to previous messageGo to next message
Tanja Mayerhofer is currently offline Tanja Mayerhofer
Messages: 2
Registered: March 2014
Junior Member
Sorry, I did not get a notification about your answer per mail Smile I entered a bug report now: Bug 431620
Thx, Tanja

[Updated on: Mon, 31 March 2014 12:25]

Report message to a moderator

Re: ECL matches operation for Sets [message #1282081 is a reply to message #1281140] Tue, 01 April 2014 21:05 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi Tanja,

Thanks for doing this.

Cheers,
Dimitris
Previous Topic:Inconsistency with generated code { EVL not getting picked }
Next Topic:Add plugin dep to diagram generated code!
Goto Forum:
  


Current Time: Fri Sep 19 20:08:55 GMT 2014

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

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