Skip to main content



      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 05:34 Go to next message
Eclipse UserFriend
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 09:08 Go to previous messageGo to next message
Eclipse UserFriend
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 08:25 Go to previous messageGo to next message
Eclipse UserFriend
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 08:25] by Moderator

Re: ECL matches operation for Sets [message #1282081 is a reply to message #1281140] Tue, 01 April 2014 17:05 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 21:19:09 EDT 2025

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

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

Back to the top