|
Re: EVL: How to define a Generic Constraint [message #1726180 is a reply to message #1726179] |
Thu, 10 March 2016 11:21 |
|
Off the top of my head, would it be enough to define an EVL rule on a superclass of all UML objects and use as guard that it has one of those annotations?
Your constraints would probably need to be implemented using EMF's reflection capabilities (going through x.eClass.eAllAttributes or x.eClass.eAllReferences).
|
|
|
|
Re: EVL: How to define a Generic Constraint [message #1726250 is a reply to message #1726246] |
Thu, 10 March 2016 17:44 |
|
Sorry, I thought you were annotating UML models with another model and then running EVL scripts on the combination.
EVL doesn't have any "meta" facilities for generating constraints on the fly, but you could write an EGL script that generates an EVL script, for instance.
How do you define the values of Y in that formula? Do they come from another model, or are they fixed in some way?
|
|
|
Re: EVL: How to define a Generic Constraint [message #1726254 is a reply to message #1726250] |
Thu, 10 March 2016 18:26 |
Alireza Rouhi Messages: 148 Registered: December 2015 |
Senior Member |
|
|
Dear Antonio,
Thanks a lot for your reply.
Here, in the mentioned example, the Handler is a given class's stereotype and X is one of its operation.
In other words, each model which has a <<Handler>> stereotyped class with an operation stereotyped with <<Get>> can be a candidate to satisfy my quantifier formula. The model can have multiple classes of Handler stereotyped but this number is fixed for any given model. In fact, the bounded values of the variables like X and Y are fixed in the given model. Depending on the kind of the quantifier formulas (FORALL/EXISTS), these variables are bounded to the model elements and may satisfy the predicates in the form of constraints.
Best regards,
Alireza
[Updated on: Fri, 11 March 2016 06:39] Report message to a moderator
|
|
|
Re: EVL: How to define a Generic Constraint [message #1726306 is a reply to message #1726254] |
Fri, 11 March 2016 09:36 |
|
Do you only have one fixed Handler stereotype, or multiple Handler stereotypes?
If you have a fixed Handler stereotype, you could use it as context for the EVL rule and it would be like the "forall" you're looking for, and then within the rule you could do the "exists".
If you have multiple Handler stereotypes, can you group them into a common superstereotype and define the EVL rule on that?
You could also use superstereotypes for the operation stereotypes (like <<Get>>).
[Updated on: Fri, 11 March 2016 09:37] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02810 seconds