A better/cleaner way to determine ProfileApplication.isStrict within the context of a stereotype con [message #619904] |
Thu, 07 June 2007 18:35 |
Nicolas Rouquette Messages: 157 Registered: July 2009 |
Senior Member |
|
|
Suppose a fictitious UML profile called 'Shaddock' defines a stereotype
that extends uml:Class.
The following OCL snippet seems to determine whether the application of
the 'Shaddock' profile was strict or not.
self.base_Class.getModel().getAllProfileApplications()->exists
(pa:ProfileApplication
| pa.appliedProfile.getLabel() = 'Shaddock' and pa.isStrict)
If I have N stereotypes that need to know ProfileApplication.isStrict
and they are instantiated on average M times, then I'll have N*M
expensive queries whenever I do full-scale validation.
Since I am using RSA 7.0.0.2, I'm bound to the limitations of the
UML/OCL implementation in Eclipse 3.2 which doesn't have support for
derived values. With derived values, I know -- at least in principle --
how to solve this problem better. Without derived values, I don't know
how to solve this problem without paying the O(N*M) complexity tax.
-- Nicolas.
|
|
|
Powered by
FUDForum. Page generated in 0.02410 seconds