Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] Constraint wide Variables
[EVL] Constraint wide Variables [message #1000292] Mon, 14 January 2013 13:02 Go to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

is there a way to define variables that can be used by different parts of a constraint (e.g.) check and fix.

Ralph
Re: [EVL] Constraint wide Variables [message #1000711 is a reply to message #1000292] Tue, 15 January 2013 10:00 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Ralph,

Any variables that you define in the check part can be re-used in the message and fix parts. For example, the following is legal EVL:

context YourType {
	 constraint YourConstraint {
			check {
				var x = ...;
				return false;
			}
			message : "There's something wrong with " + x
			fix {
				title: "Fix it"
				do {
					// x can be used here too
				}
			}
		}
}


Hope that helps!

Cheers,
Louis.
Re: [EVL] Constraint wide Variables [message #1001238 is a reply to message #1000711] Wed, 16 January 2013 09:49 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Thank you,

that is what I have been looking for. I thought there would be something like the variable definition part of ATL rules.

Thanks,

Ralph
Previous Topic:How to obtain an Excel chart from a model?
Next Topic:How to run EVL 'fix' when using eunit?
Goto Forum:
  


Current Time: Fri Nov 21 04:48:37 GMT 2014

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

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