Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EVL: How to restrict a context evaluation
EVL: How to restrict a context evaluation [message #1722006] Tue, 02 February 2016 08:49 Go to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi,

I have an EVL module structure like the following:
pre {
	...
}

context Model {
	...
}

context Stereotype_1 {
	...
}
.
.
.
context Stereotype_N {
	...
}


On evaluating a given UML model, the constraint list is applied to the PrimitiveTypes too. My question is: How to restrict the constraint evaluation only to the Model context?

Best regards,
Alireza
Re: EVL: How to restrict a context evaluation [message #1722188 is a reply to message #1722006] Wed, 03 February 2016 09:57 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Have you tried using EVL guards on the contexts and/or the constraints?
Re: EVL: How to restrict a context evaluation [message #1722191 is a reply to message #1722188] Wed, 03 February 2016 10:19 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Dear Antonio,

Hi,

Thanks a lot for your reply.
No, I have no guard condition settings in the model context.

Is there any trick (in the form of a condition) to put on the guard section of the model context to restrict the context evaluation to a single UML design model only and not for the library PrimitiveTypes?

Best regards,
Alireza
Re: EVL: How to restrict a context evaluation [message #1722193 is a reply to message #1722191] Wed, 03 February 2016 10:31 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

For the Model context, I guess it would be enough with:

self.name <> 'PrimitiveType'


I'm not sure about the stereotypes, however. One simple option is to make the stereotype conditions lazy and then use satisfies to trigger them from the Model instances that meet the above guard. Another option is finding a path from the stereotype to the model and then checking its name.
Re: EVL: How to restrict a context evaluation [message #1722194 is a reply to message #1722193] Wed, 03 February 2016 10:36 Go to previous message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Dear Antonio,

Thank you very much.
Your suggested trick solved the problem.

Best regards,
Alireza
Previous Topic:[ETL] There is an ETL Metamodel?
Next Topic:Traceability
Goto Forum:
  


Current Time: Fri Apr 26 01:29:33 GMT 2024

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

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

Back to the top