|Re: Check invariants without instantiation [message #788449 is a reply to message #788435]
||Wed, 01 February 2012 20:42
| Ed Willink
Registered: July 2009
OCL can be applied at any level to which you have access.
As from Juno M5 there are about 30 OCL constraints that are directly
code generated from OCL into Java (see the pivot.bodies package) and
executed on your meta-model when you invoke Validate within the
OCLinEcore editor. This implements some of the missing Well-Formedness
Rules. Hopefully all the rules in the OCL specification will be debugged
and implemented for the Juno release.
In principle, (https://bugs.eclipse.org/bugs/show_bug.cgi?id=368612#c1),
using Load Resource within the OCLinEcore editor could allow you to load
a Complete OCL document with additional constraints. e.g. the iterator
name of an exists iteration must be named 'e'. Something like (not
inv ExistsIteratorNamedE: referredIteration.name = 'exists' implies
ownedIterator->first().name = 'e'
But here the OCL meta-model is used. You seem to be trying to use the
Ecore meta-model, so I'm not convinced that you are using your
meta-meta-model at all.
On 01/02/2012 20:14, sohrab Mising name wrote:
> Thanks, I'm understanding your response, But it's true for "name". I
> could be able to check name or type of eReferenceses for one class
> without instantiation.
> for example I want to check this constraint for my ecore files:
> indeed meta-models are instances of meta-meta-models.
> 1-Can I check above constraint for my ecore files without OCLinEcore
> consol and any instantiation?
> 2-when B extends A, A is a eSuperClass for B , and I sholud refer to
> it's eAttributes, eReferences,... . Can I write constraint in A that
> checks about types of B's eReferences?
Powered by FUDForum
. Page generated in 0.02444 seconds