Hello Maxime ! This problem is well-known: see https://gforge.enseeiht.fr/tracker/?func=detail&aid=3219&group_id=52&atid=133 and its comments. In brief, we need to add meta-data describing the scope of the OCL rules to solve it. To achieve that, some changes are required in the OCL checker.
If you want to work on it, your help is welcome :-) Pierre -----Message d'origine----- De : [email protected] [mailto:[email protected]]de la part de Topcased user list where issues are discussed Envoyé : lundi 20 septembre 2010 20:43 À : [email protected] Objet : [Topcased-users] Issue with UML OCL check using a model with profile Hello, I'm having some issues using OCL checking with a UML model that has a profile applied. Here's what I have done: I defined a Profile in order to add some stereotypes to UML models. In my case, I've added stereotypes to the Package and the Class elements from UML. Using the Topcased tutorials, I've been able to load my profile in a different model (using load resource) in order to be able to apply my stereotypes on different classes and packages (using apply profile). This works correctly. I also need to apply some OCL constraints that take into account those new stereotypes I've added. In order to do that, I've written an OCL file. This file works correctly: I can use the OCL check on my models in order to see if my models respect my constraints. If the profile is not applied, OCL check works correctly and only inspects that elements I've added to my model. However, if I apply my profile of UML to this model, the OCL check inspects not only the elements from my model, but also every element in my profile. Since my profile includes elements from the UML metamodel (in this case Package and Class), this leads the OCL check to evaluate my constraints on the entire UML metamodel, which is obviously not what I want to do. Is there any solution to that problem? It seems like I can't remove the references to UML in my profile (since it's a profile of UML), but since this profile is referenced in my model, it is evaluated by OCL. Maybe there is a way that I'm not aware of to tell OCL to ignore some elements from a profile? Thanks for your help! I can provide more information if needed. Maxime Ouellet Master's student, École Polytechnique de Montréal This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. _______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users
