Home » Newcomers » Newcomers » Model to Model Transformation
Model to Model Transformation [message #724830] |
Tue, 13 September 2011 10:07 |
Phoenix Messages: 10 Registered: September 2011 |
Junior Member |
|
|
Hello,
I have been given a project to apply certain transformation rules (of a domain specific language) on a model (generated as an instance of a given meta-model) and hence generate another model (instance of the same meta-model) as a result. Basically, I have to show the behavior of the language with respect to its rules.
For example, if we were to consider a math diagram, where the meta-model has been defined in terms of operators, numbers etc and we have a problem like (5-2)*8 then the instance model is as follows:
Math
....... 5
......sub
........2
..... mul
.........8
so, if I apply the subtraction rule then the result after one step will be:
Math
.... 3
......mul
.....8
Also, In case I try to apply Divide rule on this, I should get a message saying something like, Invalid Action.
Could anyone please tell me about this ? I have read certain things about graph transformation rules, but can't really figure out, what and how to use them. I would be glad if someone could help an let me know if it is possible to attain this kind of thing with EMF.
Thanks in advance.
Regards
Ph.
|
|
|
Re: Model to Model Transformation [message #724966 is a reply to message #724830] |
Tue, 13 September 2011 15:37 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
I suppose you might use ATL for this. But otherwise you'd have to use
the generated API for your model and write it all in Java. It sounds
similar to writing an interpreter.
On 13/09/2011 3:07 AM, Phoenix wrote:
> Hello,
>
> I have been given a project to apply certain transformation
> rules (of a domain specific language) on a model (generated as an
> instance of a given meta-model) and hence generate another model
> (instance of the same meta-model) as a result. Basically, I have to
> show the behavior of the language with respect to its rules.
>
> For example, if we were to consider a math diagram, where the
> meta-model has been defined in terms of operators, numbers etc and we
> have a problem like (5-2)*8 then the instance model is as follows:
> Math
> ....... 5
> ......sub
> ........2
> ..... mul
> .........8 so, if I apply the subtraction rule then the result after
> one step will be:
>
> Math
> .... 3
> ......mul
> .....8
>
> Also, In case I try to apply Divide rule on this, I should get a
> message saying something like, Invalid Action.
>
> Could anyone please tell me about this ? I have read certain
> things about graph transformation rules, but can't really figure out,
> what and how to use them. I would be glad if someone could help an let
> me know if it is possible to attain this kind of thing with EMF.
>
> Thanks in advance.
> Regards Ph.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | |
Re: Model to Model Transformation [message #725052 is a reply to message #725033] |
Tue, 13 September 2011 19:53 |
Phoenix Messages: 10 Registered: September 2011 |
Junior Member |
|
|
Thanks, basically I want to show that I can apply certain rules of the language on an instance model and generate another model, based on the same meta-model, so at both ends I will have a model (through which I can later initialize a gmf editor diagram, which will indicate the difference in diagrams of the two models) . So to say, I do not want to make any exogenous transformations, my source and target meta-models are going to be same.
I read about EMF Tiger project and found it interesting, thought it could solve the problem, however I am facing problems in downloading the updates from the site, I get an error something like Unable to Read from repository YYY.
Also, it gives an example of an exogenous transformation which makes it a bit difficult to understand for my domain.
Sorry for the trivial doubts, but I would really appreciate it if you could let me know how I would proceed with any language I decide upon ?
Regards
Ph.
|
|
|
Re: Model to Model Transformation [message #725072 is a reply to message #725052] |
Tue, 13 September 2011 20:11 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
I don't think EMF Tiger ever really got off the ground, so if you want
to do model transformation, I'd suggest ATL or writing it in Java using
the generated APIs.
On 13/09/2011 12:53 PM, Phoenix wrote:
> Thanks, basically I want to show that I can apply certain rules of the
> language on an instance model and generate another model, based on the
> same meta-model, so at both ends I will have a model (through which I
> can later initialize a gmf editor diagram, which will indicate the
> difference in diagrams of the two models) . So to say, I do not want
> to make any exogenous transformations, my source and target
> meta-models are going to be same.
> I read about EMF Tiger project and found it interesting, thought it
> could solve the problem, however I am facing problems in downloading
> the updates from the site, I get an error something like Unable to
> Read from repository YYY.
> Also, it gives an example of an exogenous transformation which makes
> it a bit difficult to understand for my domain.
>
> Sorry for the trivial doubts, but I would really appreciate it if you
> could let me know how I would proceed with any language I decide upon ?
>
> Regards
> Ph.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | |
Goto Forum:
Current Time: Fri Apr 19 23:31:49 GMT 2024
Powered by FUDForum. Page generated in 0.08721 seconds
|