Model and Metamodel consistency [message #427393] |
Mon, 16 February 2009 16:09 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi all,
Where in EMF - if it all - is there code for checking the consistency of
a model against its metamodel? For example, it seems reasonable that
each object (in a model) must be an instance of some non-abstract
meta-class.
I'm trying to compile a complete list of consistency constraints for EMF
models and metamodels.
Many thanks,
Louis.
----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
|
|
|
Re: Model and Metamodel consistency [message #427399 is a reply to message #427393] |
Mon, 16 February 2009 16:57 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Louis,
Comments below.
Louis Rose wrote:
> Hi all,
>
> Where in EMF - if it all - is there code for checking the consistency
> of a model against its metamodel? For example, it seems reasonable
> that each object (in a model) must be an instance of some non-abstract
> meta-class.
EMF objects are strongly typed. EObject.eClass() returns an object's
type. It must conform to this type and it's effectively impossible for
it not to. Diagnostician.INSTANCE can be used to validate that all the
other constraints that aren't enforced simply by type safety are respected.
>
> I'm trying to compile a complete list of consistency constraints for
> EMF models and metamodels.
Have a look at EObjectValidator for the basic consistency constraints.
>
>
> Many thanks,
> Louis.
>
> ----
> Louis Rose
> Research Student
> Department of Computer Science,
> University of York,
> Heslington, York, YO10 5DD, United Kingdom.
> +44 1904 434762
> Twitter: @louisrose
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Model and Metamodel consistency [message #427411 is a reply to message #427399] |
Tue, 17 February 2009 11:00 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Ed,
Ed Merks wrote:
> Louis,
>
> Comments below.
>
> Louis Rose wrote:
>> Hi all,
>>
>> Where in EMF - if it all - is there code for checking the consistency
>> of a model against its metamodel? For example, it seems reasonable
>> that each object (in a model) must be an instance of some non-abstract
>> meta-class.
> EMF objects are strongly typed. EObject.eClass() returns an object's
> type. It must conform to this type and it's effectively impossible for
> it not to. Diagnostician.INSTANCE can be used to validate that all the
> other constraints that aren't enforced simply by type safety are respected.
Of course! I hadn't fully understood that consistency is enforced due to
the strong typing of EMF objects.
>>
>> I'm trying to compile a complete list of consistency constraints for
>> EMF models and metamodels.
> Have a look at EObjectValidator for the basic consistency constraints.
Perfect, thanks. Just what I was after.
Cheers,
Louis.
----
Louis Rose
Research Student
Department of Computer Science,
University of York,
Heslington, York, YO10 5DD, United Kingdom.
+44 1904 434762
Twitter: @louisrose
|
|
|
Powered by
FUDForum. Page generated in 0.02502 seconds