Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] Method "satisfiesAll" not found for...
[EVL] Method "satisfiesAll" not found for... [message #1729580] Fri, 15 April 2016 15:43 Go to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 16
Registered: March 2016
Junior Member
Hello,

I need to evaluate that several EVL constraints are valid, so I wanted to use the satisfiesAll functionalty but the method isn't found.

Method 'satisfiesAll' not found for: CAEX.impl.CAEXFileImpl@27216cd [changeMode: <unset>] [fileName: Testcase.aml, schemaVersion: 2.15]


self.satisfiesAll is not found, self.satisfies works perfect - is there anything special to consider when using satisfiesAll?


Thanks in advance,

Best regards,
Martin


[Updated on: Fri, 15 April 2016 15:55]

Report message to a moderator

Re: [EVL] Method "satisfiesAll" not found for... [message #1729633 is a reply to message #1729580] Sat, 16 April 2016 11:23 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 470
Registered: January 2010
Senior Member
Hello Martin,

How are you invoking self.satisfiesAll? It's not "self.satisfiesAll('x', 'y')", but rather "self.satisfiesAll(Sequence {'a', 'b'})", I think.

Kind regards,
Antonio
Re: [EVL] Method "satisfiesAll" not found for... [message #1729661 is a reply to message #1729633] Sun, 17 April 2016 09:51 Go to previous messageGo to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 16
Registered: March 2016
Junior Member
Hello Antonio,

thanks for your reply.

I've tried both - even long version:

guard
{
var a : Sequence;

a.add("HasElementWriterHeader");
a.add("HasWriterName");

return self.satisfiesAll(a);
}

Still same result - basically I can just write
"self.satiesfies ("HasElementWriterHeader") and self.satisfies("...")" - I was just curious what's the problem here.

Kind regards,
Martin
Re: [EVL] Method "satisfiesAll" not found for... [message #1729675 is a reply to message #1729661] Sun, 17 April 2016 20:35 Go to previous messageGo to next message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 16
Registered: March 2016
Junior Member
If anyone else has same issue - workaround:

operation CAEXFile satisfiesAll(invariants : Sequence): Boolean
{
var ret : Boolean = true;

for(invariant : String in invariants)
{
ret = ret and self.satisfies(invariant);
}

return ret;
}


usage:

guard: self.satisfiesAll(Sequence{"HasElementWriterHeader", "HasWriterName"})

Kind Regards,
Martin
Re: [EVL] Method "satisfiesAll" not found for... [message #1729707 is a reply to message #1729675] Mon, 18 April 2016 10:08 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1498
Registered: July 2009
Location: York, UK
Senior Member

Hi Martin,

It appears that at some point we retired "satisfiesAll" in favour of a generic multi-parameter "satisfies". The following should work with recent versions of Epsilon:

context t_tree {

	constraint c1 {
		check : true
	}
	
	constraint c2 {
		check : true
	}
	
	constraint c3 {
		
		guard : self.satisfies("c1", "c2")
		
		check : true.println()
		
	}

}


against the following plain-XML model

<tree label="t1"/>


Cheers,
Dimitris
Re: [EVL] Method "satisfiesAll" not found for... [message #1729709 is a reply to message #1729707] Mon, 18 April 2016 10:30 Go to previous message
Glatz Martin is currently offline Glatz MartinFriend
Messages: 16
Registered: March 2016
Junior Member
Hi Dimitries,

thanks a lot - that's perfect.

Cheers,
Martin
Previous Topic:Call Lazy Rule in ETL
Next Topic:Type of operation charAt(index : Integer) is not String
Goto Forum:
  


Current Time: Wed Jan 17 18:27:04 GMT 2018

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

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