Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Feasibility of having a megamodel in Epsilon
Feasibility of having a megamodel in Epsilon [message #1067816] Wed, 10 July 2013 16:55 Go to next message
Eclipse UserFriend
In the last years I developed a couple of tools heavily based on the
concept of megamodel proposed within the AMMA platform. Now I am
evaluating the possibility to migrate those tools to the Epsilon platform.

Basically, my need can be resumed as this: "I need to have a single
generic metamodel which acts as a registry containing typed references
to any other model within the projects workspace".

My question is about the feasibility of having a generic metamodel in
the Epsilon platform which may have typed references to both models and
model elements. More specifically, by referring to http://goo.gl/CfKmt,
I would like to store all the arrows (both dashed and solid ones) as
typed references in a single model, is it possible in Epsilon?

Thanks in advance for your help,

Ivano

__________________________________________

Ivano Malavolta, PhD
Research Fellow @ Dipartimento di Ingegneria e Scienze
dell'Informazione e Matematica, University of L'Aquila
phone: +393807021600 skype: iivanoo
Academic: http://www.di.univaq.it/malavolta
Professional: http://www.ivanomalavolta.com
Re: Feasibility of having a megamodel in Epsilon [message #1067843 is a reply to message #1067816] Wed, 10 July 2013 20:01 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Ivano,

I'm not sure I completely understand your requirements. In particular it'd be great if you could elaborate a bit more on what you mean by "typed references to models". In case this helps, roughly speaking, the counterparts of the AMMA tools in Epsilon are:

KM3 -> Emfatic (Emfatic is in fact a standalone project but it's often used by Epsilon users)
ATL -> ETL
ModelWeaver -> Modelink

Cheers,
Dimitris
Re: Feasibility of having a megamodel in Epsilon [message #1067893 is a reply to message #1067843] Thu, 11 July 2013 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dimitris,
first of all thank you for the quick reply.

In the following you can find an excerpt of metamodel that I am thinking
to realize:

package registry;

class Registry extends NamedElement { // NamedElement metaclass omitted
val View[*] views;
}

class View extends NamedElement {
val ModelReference[*] models;
}

class ModelReference {
ref T[1] model; // PROBLEM
}

....

By looking at the excerpt of metamodel, I do not know what T may be.
Basically, I would like to know if its feasible to have a ModelType type
in EOL, which can be considered as the equivalent of the
ModelElementType in EOL, but at the model level (not at the model
element level). Also, it could be interesting to have some method to
access the model elements of each instance of ModelType for digging into
the elements of a specific model.

By doing this, I will be able to populate my registry model with a set
of references to each model within the platform. This allows me to
"easily" check, for example, if there are inconsistencies among views
(instances of the View metaclass) by means of some EVL module.

I hope I clarified now my issue, cheers,

Ivano

Il 10/07/2013 22.01, Dimitris Kolovos ha scritto:
> Hi Ivano,
>
> I'm not sure I completely understand your requirements. In particular
> it'd be great if you could elaborate a bit more on what you mean by
> "typed references to models". In case this helps, roughly speaking, the
> counterparts of the AMMA tools in Epsilon are:
>
> KM3 -> Emfatic (Emfatic is in fact a standalone project but it's often
> used by Epsilon users)
> ATL -> ETL
> ModelWeaver -> Modelink
>
> Cheers,
> Dimitris
Re: Feasibility of having a megamodel in Epsilon [message #1067898 is a reply to message #1067843] Thu, 11 July 2013 07:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dimitris,
first of all thank you for the quick reply.

In the following you can find an excerpt of metamodel that I am thinking
to realize:

package registry;

class Registry extends NamedElement { // NamedElement metaclass omitted
val View[*] views;
}

class View extends NamedElement {
val ModelReference[*] models;
}

class ModelReference {
ref T[1] model; // PROBLEM
}

....

By looking at the excerpt of metamodel, I do not know what T may be.
Basically, I would like to know if its feasible to have a ModelType type
in EOL, which can be considered as the equivalent of the
ModelElementType in EOL, but at the model level (not at the model
element level). Also, it could be interesting to have some method to
access the model elements of each instance of ModelType for digging into
the elements of a specific model.

By doing this, I will be able to populate my registry model with a set
of references to each model within the platform. This allows me to
"easily" check, for example, if there are inconsistencies among views
(instances of the View metaclass) by means of some EVL module.

I hope I clarified now my issue, cheers,

Ivano

Il 10/07/2013 22.01, Dimitris Kolovos ha scritto:
> Hi Ivano,
>
> I'm not sure I completely understand your requirements. In particular
> it'd be great if you could elaborate a bit more on what you mean by
> "typed references to models". In case this helps, roughly speaking, the
> counterparts of the AMMA tools in Epsilon are:
>
> KM3 -> Emfatic (Emfatic is in fact a standalone project but it's often
> used by Epsilon users)
> ATL -> ETL
> ModelWeaver -> Modelink
>
> Cheers,
> Dimitris
Re: Feasibility of having a megamodel in Epsilon [message #1067907 is a reply to message #1067898] Thu, 11 July 2013 08:14 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Ivano,

T needs to be the name of an EClass from the same or another Ecore metamodel (or EObject if you want to be able to link any EMF object). Assuming that you use the T model EReference to reference the root model elements of other models, you can then traverse their contents using the EMF API (e.g. EObject.eContents()). If I'm way off-topic perhaps we could have a chat over Skype early next week.

Cheers,
Dimitris
Re: Feasibility of having a megamodel in Epsilon [message #1067937 is a reply to message #1067907] Thu, 11 July 2013 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Dimitris,
I think that in this case could have been more useful to have the
concept of Model, rather than that of Model Element.

Indeed, I do not think it is possible to assume that a model has a
single root element, and also it makes my checks with EVL less readable
when dealing with model-to-model relationships.

Do you think it is hard to extend the EOL language with a new data type
for models?

Il 11/07/2013 10.14, Dimitris Kolovos ha scritto:
> Hi Ivano,
>
> T needs to be the name of an EClass from the same or another Ecore
> metamodel (or EObject if you want to be able to link any EMF object).
> Assuming that you use the T model EReference to reference the root model
> elements of other models, you can then traverse their contents using the
> EMF API (e.g. EObject.eContents()). If I'm way off-topic perhaps we
> could have a chat over Skype early next week.
>
> Cheers,
> Dimitris
Re: Feasibility of having a megamodel in Epsilon [message #1067940 is a reply to message #1067937] Thu, 11 July 2013 11:18 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Ivano,

I think I now understand a bit better. To instantiate a model in Epsilon, you need a model type identifier (e.g. EMF/PlainXML etc) and a set of parameters - the names/number of which can vary between different types of models. I suspect your Model type should look something like this:

class Model {
attr String modelType;
val ModelParameter[*] parameters;
}

class ModelParameter {
attr String key;
attr String value;
}

To instantiate a runtime model from an instance of Model so that you can then pass it to your Epsilon programs, you'll need to write a bit of code similar to [1]. Does this help?

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.workflow/ant/org/eclipse/epsilon/workflow/tasks/LoadModelTask.java
Re: Feasibility of having a megamodel in Epsilon [message #1067942 is a reply to message #1067940] Thu, 11 July 2013 11:20 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Ivano,

On a related note, MTCFlow [1] seems to be related to what you're doing and already provides support for Epsilon languages so it might be of interest.

Cheers,
Dimitris

[1] http://mtcflow.com/
Re: Feasibility of having a megamodel in Epsilon [message #1067963 is a reply to message #1067942] Thu, 11 July 2013 12:55 Go to previous message
Eclipse UserFriend
Perfect Dimitris,
I'll read the references you provided and I will come back with
(hopefully good) news.

Cheers,

Ivano

Il 11/07/2013 13.20, Dimitris Kolovos ha scritto:
> Hi Ivano,
>
> On a related note, MTCFlow [1] seems to be related to what you're doing
> and already provides support for Epsilon languages so it might be of
> interest.
>
> Cheers,
> Dimitris
>
> [1] http://mtcflow.com/
Previous Topic:Generate Emfatic Source Does Nothing
Next Topic:[concordance] org.h2.jdbc.JdbcSQLException on values containing single quotes
Goto Forum:
  


Current Time: Tue Mar 19 09:05:03 GMT 2024

Powered by FUDForum. Page generated in 0.03147 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top