Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » 3 or 4 layers
3 or 4 layers [message #757795] Mon, 21 November 2011 12:39 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Hi,

I have an understanding problem: Sad

OMG talks about 4 layers and i could find just 3 while working with EMF, if so, what is the instance class diagram in EMF?

Thanks alot
Re: 3 or 4 layers [message #757990 is a reply to message #757795] Mon, 21 November 2011 12:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25740
Registered: July 2009
Senior Member
Which layer do you think is missing?

On 21/11/2011 6:40 PM, elhamlaoui wrote:
> Hi,
>
> I have an understanding problem: :(
> OMG talks about 4 layers and i could find just 3 while working with
> EMF, if so, what is the instance class diagram in EMF?
>
> Thanks alot
Re: 3 or 4 layers [message #758051 is a reply to message #757990] Mon, 21 November 2011 15:08 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Hi Ed,

I was hoping that i you were the one who answer to this, im lucky Smile

It deponds it could be M1 or M0(according to OMG layer), what I try to achieve is projection of the OMG layer on the EMF.IN the EMF i could got just model->MM->MMM(Ecore), if we take an example of a class diagram in UML:

Instance class diagram-> class diagram-> MMUML->MOF

What it would be the intance of a class diagram in EMF?! Rolling Eyes

Thanks




Re: 3 or 4 layers [message #758069 is a reply to message #758051] Mon, 21 November 2011 15:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 3840
Registered: July 2009
Senior Member
Hi

M0 - User objects and values (EObjects and Java primitives - User Model)
M1 - User/Model classes (defined by EClass instances - Ecore Model)
M2 - Ecore Model classes (defined by EClass instances - Ecore Model)
M3 - Ecore MetaModel (defined by EClass instances - Ecore Model)

Self-describing meta-models do not need M>=3. The same is now true for
UML which describes itself rather than needing the extra recursion to
MOF at M3.

If you regard MOF as fundamental, then you would re-engineer Ecore so
that M3 is MOF rather than Ecore.

[I find usage of the M0, M1, M2 ... terminology to be associated with
misunderstanding more often than insight.]

Regards

Ed Willink

On 21/11/2011 20:08, elhamlaoui wrote:
> Hi Ed,
>
> I was hoping that i you were the one who answer to this, im lucky :)
>
> It deponds it could be M1 or M0(according to OMG layer), what I try to
> achieve is projection of the OMG layer on the EMF.IN the EMF i could
> got just model->MM->MMM(Ecore), if we take an example of a class
> diagram in UML:
>
> Instance class diagram-> class diagram-> MMUML->MOF
>
> What it would be the intance of a class diagram in EMF?! :roll:
> Thanks
>
>
>
>
>
Re: 3 or 4 layers [message #758073 is a reply to message #758051] Mon, 21 November 2011 15:36 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard Traetteberg
Messages: 582
Registered: July 2009
Location: Trondheim, Norway
Senior Member
M0 is simply the instances of the modeled classes, e.g. Library and Book
instances. There is no Ecore diagram kind for this, usually you find
them in xmi files, e.g. the ones you get when creating a dynamic
instance by right-clicking on an EClass in the Ecore editor.

In my opinion, the levels are only meaningful relative to each other,
and usually you only need to think about two levels at a time: models
and (instance) data. When building model-based tools, I find it easier
to use these terms (model and data) rather than meta-model and model.

Hallvard

On 21.11.11 21.08, elhamlaoui wrote:
> Hi Ed,
>
> I was hoping that i you were the one who answer to this, im lucky :)
>
> It deponds it could be M1 or M0(according to OMG layer), what I try to
> achieve is projection of the OMG layer on the EMF.IN the EMF i could got
> just model->MM->MMM(Ecore), if we take an example of a class diagram in
> UML:
>
> Instance class diagram-> class diagram-> MMUML->MOF
>
> What it would be the intance of a class diagram in EMF?! :roll:
> Thanks
>
>
>
>
>
Re: 3 or 4 layers [message #758077 is a reply to message #758073] Mon, 21 November 2011 15:40 Go to previous messageGo to next message
Vlad Gheorghe is currently offline Vlad Gheorghe
Messages: 111
Registered: May 2011
Senior Member
I find this to be a pretty good overview on the subject:

http://www2.imm.dtu.dk/~pk/images/meta-levels.pdf

Regards,
Vlad
Re: 3 or 4 layers [message #758106 is a reply to message #758073] Mon, 21 November 2011 16:36 Go to previous messageGo to next message
Philipp W. Kutter is currently offline Philipp W. Kutter
Messages: 301
Registered: July 2009
Senior Member
Am 21.11.2011 21:36, schrieb Hallvard Trætteberg:
> M0 is simply the instances of the modeled classes, e.g. Library and Book
> instances. There is no Ecore diagram kind for this, usually you find
> them in xmi files, e.g. the ones you get when creating a dynamic
> instance by right-clicking on an EClass in the Ecore editor.

With GMF-Tooling you can get a specialized diagram kind for such
instances of the modeled classes.

Thus, while there is (not yet?) a generic object/instance diagram as
initially asked by elhamlaoui, there is a generic way to get one for
your model of interest.

Regards, Philipp





*
*
*
Philipp W. Kutter
*CEO, Dr. sc. ETH*
*Montages AG
Stampfenbachstr. 48
CH-8006 Zürich

tel: +41 44 260 75 57
mob: +41 79 338 06 17
web: *www.montages.com <http://www.montages.com/>*
Re: 3 or 4 layers [message #759737 is a reply to message #758106] Tue, 29 November 2011 14:26 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Hi,

the link proposed her, http://www2.imm.dtu.dk/~pk/images/meta-levels.pdf explicit my concern. According to it, if we focus on library model, we can see that library model(M1) is an instance of Ecore(M3) Where is The M2 in this case??

Any ideas?
Thanks in advance
Re: 3 or 4 layers [message #759741 is a reply to message #759737] Tue, 29 November 2011 14:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25740
Registered: July 2009
Senior Member
Given the Library instance is M0, the Library model is M1, then Ecore is
M2, and the Ecore model for Ecore is M3. These layers are always
relative and there's no reason to think they should stop at 4 levels.
For example, given a Library instance M0, who's model is an XML Schema
M1, and we have an XML Schema for Schemas M2, which has an XML Schema
Ecore model M3, then we have the Ecore model for Ecore as M4. Of course
Ecore.ecore in platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore
is itself just an instance and is M0. Your mistake is you're trying to
absolutely pin a particular thing to a given level, when the whole point
is that levels are relative. Going down are instances, going up are
models/descriptions of instances.

On 29/11/2011 8:26 PM, elhamlaoui wrote:
> Hi,
>
> the link proposed her,
> http://www2.imm.dtu.dk/~pk/images/meta-levels.pdf explicit my concern.
> According to it, if we focus on library model, we can see that library
> model(M1) is an instance of Ecore(M3) Where is The M2 in this case??
>
> Any ideas?
> Thanks in advance
Re: 3 or 4 layers [message #759758 is a reply to message #759741] Tue, 29 November 2011 15:45 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Hi Ed,
Thaks for the answer,Quote:
then Ecore is M2, and the Ecore model for Ecore is M3
, sorry but i dont see the diffrence between Ecore and Ecore model
Re: 3 or 4 layers [message #759802 is a reply to message #759758] Wed, 30 November 2011 02:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25740
Registered: July 2009
Senior Member
It's a good example where something exists at multiple levels; maybe
that means you don't want to count it twice. But you've ignored the
example where there are 5 levels or maybe you think something got
counted twice there too?

On 29/11/2011 9:45 PM, elhamlaoui wrote:
> Hi Ed, Thaks for the answer,Quote:
>> then Ecore is M2, and the Ecore model for Ecore is M3
> , sorry but i dont see the diffrence between Ecore and Ecore model
Re: 3 or 4 layers [message #1052924 is a reply to message #759802] Wed, 01 May 2013 08:42 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Hi,
I found this link http://www.eclipsezone.com/eclipse/forums/t115395.html , according to the controversy discussion about the layers dicussed above.
Ed, you said that :"PS: I personally prefer Bezivin's definitions of such terminologies to those of OMG MDA" It surely an old post but i wonder if i could have please a reference to an article to know more about the definition of Bezivin.

Thanks in advance
Re: 3 or 4 layers [message #1052929 is a reply to message #1052924] Wed, 01 May 2013 09:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25740
Registered: July 2009
Senior Member
I believe it was Huy Tran who made that statement./


/
On 01/05/2013 2:42 PM, Elhamlaoui Mahmoud wrote:
> Hi,
> I found this link
> http://www.eclipsezone.com/eclipse/forums/t115395.html , according to
> the controversy discussion about the layers dicussed above.
> Ed, you said that :"PS: I personally prefer Bezivin's definitions of
> such terminologies to those of OMG MDA" It surely an old post but i
> wonder if i could have please a reference to an article to know more
> about the definition of Bezivin.
>
> Thanks in advance
>
Re: 3 or 4 layers [message #1052938 is a reply to message #1052929] Wed, 01 May 2013 09:34 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member
Im sorry, my mistake Smile
Previous Topic:[CDO] Plugin Development problems with EMF 2.8 and CDO 4.2
Next Topic:Saving EMF Resources
Goto Forum:
  


Current Time: Wed Apr 16 12:19:01 EDT 2014

Powered by FUDForum. Page generated in 0.02554 seconds