Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EWL/ETL] Model matching
[EWL/ETL] Model matching [message #557259] Mon, 06 September 2010 10:41 Go to next message
Rui Carlos  Gonçalves is currently offline Rui Carlos Gonçalves
Messages: 28
Registered: July 2009
Junior Member

I'm trying to build a tool that looks for parts of a model that have a "specific form", and replaces them.
I specify this "specific form" using a model too, so what I need is to verify if any part of model match another model. We can see the models as graphs, so I want to check if a graph contains other graph.

Does EWL/ETL provide this kind of matching functionalities?
I think I should be able to implement this functions, but it will be a waste of time if Epsilon has this.

Thanks.


Re: [EWL/ETL] Model matching [message #557268 is a reply to message #557259] Mon, 06 September 2010 11:25 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi,

Model matching is supported by ECL
(http://eclipse.org/gmt/epsilon/doc/ecl/) which however only supports
1-1 matches between elements. A general-purpose pattern matcher for EMF
sounds like a very good idea and it could probably find applications in
many model management tasks. If you decide to move forward with this,
it'd be great to keep in touch and explore the potentials for
collaboration and integration with Epsilon!

Cheers,
Dimitris

Rui Carlos Gonçalves wrote:
> I'm trying to build a tool that looks for parts of a model that have a
> "specific form", and replaces them.
> I specify this "specific form" using a model too, so what I need is to
> verify if any part of model match another model. We can see the models
> as graphs, so I want to check if a graph contains other graph.
>
> Does EWL/ETL provide this kind of matching functionalities?
> I think I should be able to implement this functions, but it will be a
> waste of time if Epsilon has this.
>
> Thanks.
Re: [EWL/ETL] Model matching [message #558586 is a reply to message #557268] Mon, 13 September 2010 15:25 Go to previous messageGo to next message
Rui Carlos  Gonçalves is currently offline Rui Carlos Gonçalves
Messages: 28
Registered: July 2009
Junior Member

Dimitrios Kolovos wrote on Mon, 06 September 2010 06:25
A general-purpose pattern matcher for EMF
sounds like a very good idea and it could probably find applications in
many model management tasks. If you decide to move forward with this,
it'd be great to keep in touch and explore the potentials for
collaboration and integration with Epsilon!



I have the match function almost implemented. However, my function only works with some models (in my case, each element can only have an input connection, so I was able to create a more efficient algorithm).

I could create a general algorithm, but, using EWL, the algorithm will depend on the meta-model. If you think there is some way to overcome this "problem" (maybe using Java?), let me know, and I try to implement this feature.


Re: [EWL/ETL] Model matching [message #558594 is a reply to message #558586] Mon, 13 September 2010 15:44 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Yes. You'd probably need to use Java for a generic pattern matching
algorithm. You could even create a small task-specific language for this
using the infrastructure provided by Epsilon i.e.:

pattern Inheritance
find: c1:Class, c2:Class
where: c2.superTypes.includes(c1) and not c1.isAbstract

Does this sound sensible?

Cheers,
Dimitris

Rui Carlos Gonçalves wrote:
> Dimitrios Kolovos wrote on Mon, 06 September 2010 06:25
>> A general-purpose pattern matcher for EMF sounds like a very good idea
>> and it could probably find applications in many model management
>> tasks. If you decide to move forward with this, it'd be great to keep
>> in touch and explore the potentials for collaboration and integration
>> with Epsilon!
>
>
> I have the match function almost implemented. However, my function only
> works with some models (in my case, each element can only have an input
> connection, so I was able to create a more efficient algorithm).
>
> I could create a general algorithm, but, using EWL, the algorithm will
> depend on the meta-model. If you think there is some way to overcome
> this "problem" (maybe using Java?), let me know, and I try to implement
> this feature.
Re: [EWL/ETL] Model matching [message #593818 is a reply to message #557268] Mon, 13 September 2010 15:25 Go to previous message
Rui Carlos  Gonçalves is currently offline Rui Carlos Gonçalves
Messages: 28
Registered: July 2009
Junior Member

Dimitrios Kolovos wrote on Mon, 06 September 2010 06:25
> A general-purpose pattern matcher for EMF
> sounds like a very good idea and it could probably find applications in
> many model management tasks. If you decide to move forward with this,
> it'd be great to keep in touch and explore the potentials for
> collaboration and integration with Epsilon!


I have the match function almost implemented. However, my function only works with some models (in my case, each element can only have an input connection, so I was able to create a more efficient algorithm).

I could create a general algorithm, but, using EWL, the algorithm will depend on the meta-model. If you think there is some way to overcome this "problem" (maybe using Java?), let me know, and I try to implement this feature.
--
http://cs.utexas.edu/~rcg


Re: [EWL/ETL] Model matching [message #593846 is a reply to message #593818] Mon, 13 September 2010 15:44 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Yes. You'd probably need to use Java for a generic pattern matching
algorithm. You could even create a small task-specific language for this
using the infrastructure provided by Epsilon i.e.:

pattern Inheritance
find: c1:Class, c2:Class
where: c2.superTypes.includes(c1) and not c1.isAbstract

Does this sound sensible?

Cheers,
Dimitris

Rui Carlos Gonçalves wrote:
> Dimitrios Kolovos wrote on Mon, 06 September 2010 06:25
>> A general-purpose pattern matcher for EMF sounds like a very good idea
>> and it could probably find applications in many model management
>> tasks. If you decide to move forward with this, it'd be great to keep
>> in touch and explore the potentials for collaboration and integration
>> with Epsilon!
>
>
> I have the match function almost implemented. However, my function only
> works with some models (in my case, each element can only have an input
> connection, so I was able to create a more efficient algorithm).
>
> I could create a general algorithm, but, using EWL, the algorithm will
> depend on the meta-model. If you think there is some way to overcome
> this "problem" (maybe using Java?), let me know, and I try to implement
> this feature.
Previous Topic:Using the EmfModel class
Next Topic:[EWL] Specify the position of an element
Goto Forum:
  


Current Time: Mon Sep 22 12:22:51 GMT 2014

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

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