Home » Modeling » Papyrus » Epsilon EVL & UML Profiles(Validating design models with Epsilon EVL which are applying a UML Profile)
| | |
Re: Epsilon EVL & UML Profiles [message #1716520 is a reply to message #1716487] |
Fri, 04 December 2015 09:03   |
Eclipse User |
|
|
|
Hi
I'm not aware of anyone doing this. Papyrus has support for OCL and, I
think, ALF constraints.
A number of users are successfully using the OCL support, but the number
of bugs raised demonstrates that this is not a trivial integration.
Unless you find that EVL is inherently supported, I recommend that you
use OCL.
Regards
Ed Willink
On 04/12/2015 13:55, Alireza Rouhi wrote:
> Hi,
>
> I have a serious problem on the usage of the Epsilon EVL language. I would like to validate my UML design model. I'm using the Papyrus Modeler together with the recent release of the Eclipse Mars to model a Pattern Language profile (currently, it is a sample model which I attached to this post).
> I want to use the EVL to validate the applied patterns of the mentioned pattern language profile on my design model. But, the problem occurs on the applied stereotypes like Broker in the model.uml. The metamodel of the Pattern Language UML Profile is unknown for the Epsilon. Please, if it is possible for you, give me directions on resolving this problem.
>
> Thank you very much,
> Alireza
|
|
| |
Re: Epsilon EVL & UML Profiles [message #1716657 is a reply to message #1716529] |
Mon, 07 December 2015 05:17   |
Eclipse User |
|
|
|
Dear Dimitris,
Thanks a lot for your helping comment and solution for my first problem.
Now, I like to check the existence of some operations like <<find_server>> stereotyped operation in my Broker stereotyped class definition. However, the stereotype property is not known for the EVL parser. Of course, I have defined the <<find_server>> stereotype in my patterns' profile which includes the Broker stereotype too. My used source code is as follows:
context Broker {
constraint DefinesFindServer {
check : self.base_Class.ownedOperation.stereotype.exists(s: Stereotype | s = "find_server")
message : "In Pattern " + self + ", Broker class, here " +
self.base_Class.name + ", must define a <<find_server>> stereotyped operation."
fix {
title : "Add a Find Server operation, stereotyped with <<find_server>>, to " + self.name
do {
var newOp : new Operation;
newOp.name = "find_server";
newOp.stereotype.add("find_server");
newOp.class = self.base_Class;
}
}
}
}
Kind regards,
Alireza
|
|
| | |
Re: Epsilon EVL & UML Profiles [message #1716847 is a reply to message #1716667] |
Tue, 08 December 2015 09:34   |
Eclipse User |
|
|
|
Dear Dimitris,
I applied your suggestion as the following code:
context Broker {
constraint DefinesFindServer {
check : self.base_Class.ownedOperation.stereotype.exists(s: Stereotype | s = "find_server")
message : "In Pattern " + self + ", Broker class, here " +
self.base_Class.name + ", must define a <<find_server>> stereotyped operation."
fix {
title : "Add a Find Server operation, stereotyped with <<find_server>>, to " + self.base_Class.name
do {
var newOp : new Operation;
newOp.name = "find_server";
var stereotype = new Stereotype(PatternLanguage::BrokerPL::BrokerPattern::find_server);
newOp.applyStereotype(stereotype);
newOp.class = self.base_Class;
}
}
}
}
But, as I said before, there is a problem on my profile metamodel registration (We removed it on the UML model configure wizard).
So, I switched to the UML Designer 5.0 to develop and register my pattern language profile as a plug-in.
Now, the following error message is displayed when I run the above EVL script:
Line: 1, Reason: mismatched input: '<'
Kind regards,
Alireza
[Updated on: Tue, 08 December 2015 09:52] by Moderator
|
|
| |
Re: Epsilon EVL & UML Profiles [message #1716973 is a reply to message #1716904] |
Wed, 09 December 2015 06:18   |
Eclipse User |
|
|
|
Hi Dimitris,
Thanks a lot for your invaluable comments.
Please, see the attached plug-in. I want to verify a Broker stereotyped class which must have operations like find_server stereotyped operations along with other operations (if any).
To specify the must-have operations, I have defined the stereotyped operations like find_server here. Also, the applyStereotype() method has problem with the operation newOp in the following code too (error message: Method 'applyStereotype' not found for: Operation ...):
context Broker {
constraint DefinesFindServer {
check : self.base_Class.ownedOperation.exists(o: Operation | o.getAppliedStereotypes().includes(find_server))
message : "In Pattern " + self + ", Broker class, here " +
self.base_Class.name + ", must define a <<find_server>> stereotyped operation."
fix {
title : "Add a Find Server operation, stereotyped with <<find_server>>, to " + self.base_Class.name
do {
var newOp : new Operation;
newOp.name = "find_server";
var stereotype = new find_server;
newOp.class = self.base_Class;
newOp.applyStereotype(stereotype);
}
}
}
}
Kind regards,
Alireza
[Updated on: Wed, 09 December 2015 06:42] by Moderator
|
|
| | | | |
Goto Forum:
Current Time: Mon Jul 28 09:33:31 EDT 2025
Powered by FUDForum. Page generated in 0.05927 seconds
|