Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » inter-models validation
inter-models validation [message #1449074] Mon, 20 October 2014 22:06 Go to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Hi,

I have a UML profile and I create some models and apply the created profile on them.
when I write an OCL for a profile, these OCLs are per model. suppose that the profile has a steretype called "A" with a tag value (attribute) "a". if I write an OCL that the summation of value "a" for all instances of A should be greater than 10, then it is checked per each model; while I want to have an OCL that checks the summation of attribute "a" for all instances in all models should be greater than 10.
Is it possible to write such OCLs? If not, which tool is used for these purposes? Can you provide the tutorial as well?

Thank you very much,
Mahin
Re: inter-models validation [message #1449741 is a reply to message #1449074] Tue, 21 October 2014 19:43 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1206
Registered: July 2009
Location: Canada
Senior Member

Hi, Mahin,

Have you tried using allInstances() to find all instances of the
stereotype and compute the summation of the a property over all of
them? I don't know for sure, but it's possible that the scope of
allInstances() is the entire ResourceSet, so as long as you have loaded
all of the models that you need to check in your resource set, this may
work.

HTH,

Christian


On 2014-10-20 22:06:53 +0000, Mahin Abbasipour said:

> Hi,
>
> I have a UML profile and I create some models and apply the created
> profile on them.
> when I write an OCL for a profile, these OCLs are per model. suppose
> that the profile has a steretype called "A" with a tag value
> (attribute) "a". if I write an OCL that the summation of value "a" for
> all instances of A should be greater than 10, then it is checked per
> each model; while I want to have an OCL that checks the summation of
> attribute "a" for all instances in all models should be greater than 10.
> Is it possible to write such OCLs? If not, which tool is used for these
> purposes? Can you provide the tutorial as well?
>
> Thank you very much,
> Mahin
Previous Topic:Custom primitive types
Next Topic:Creating a plugin for Papyrus to Generate Code for StateMachines
Goto Forum:
  


Current Time: Mon Jul 06 03:20:10 GMT 2020

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

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

Back to the top