inter-models validation [message #1449074] |
Mon, 20 October 2014 18:06  |
Eclipse User |
|
|
|
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 15:43  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04913 seconds