|
|
|
Re: invariant vs. constraint [message #430357 is a reply to message #430355] |
Sat, 16 May 2009 16:14 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Philipp,
Comments below.
Philipp Kutter wrote:
>
>> All validation is done on demand. Invariants are easy to check
>> individually directly on the model, but there's not much that makes
>> them stronger other than that they are in the API of the model itself.
>
> Thus adding an EAnnotation and make dynamic templates triggering
> automatic check after set for invariants is trivial, while doing it
> for constraints would be harder.
Only a little. The model specific validator has methods you can invoke...
>
> Is it a wrong picture in my mind, if the invariants are thus intended
> to be true from a class perspective, but the constraints are rather
> intended to be true for a full model, and do typically relate to a
> larger context?
It's reasonable, but nothing enforces that...
>
> May I ask how such an EAnnotation for automatic chack after set for
> invariants could be interpreted in reflective models, without
> generated code?
Right now it can't.
>
> Would we need a variant of the eInvoke() solution you designed for
> operation bodies?
Yes.
>
> Regards, Philipp
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04221 seconds