Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Refactoring transformation by seprating into modules
Refactoring transformation by seprating into modules [message #1096347] Wed, 28 August 2013 09:03 Go to next message
Cuauhtemoc Castellanos
Messages: 8
Registered: September 2012
Location: paris
Junior Member
Hi,

I am refactoring some transformations of mine, and I am trying to separate some inherited rules into 2 distinct modules.

example:

the initial module

module M

abstract rule absA

rule A1 extends absA

rule A2 extends absA


The separation into 2 distinct modules

module M1

abstract rule absA

rule A1 extends absA


and

module M2

abstract rule absA

rule A2 extends absA


Finally I superimpose module M1 and M2 at runtime.

My questions are the followings:

In this superimposition order, does A1 extends absA of module M1 or module M2?

Is this separation in to module the same as the one module transformation?



Thank you for your help in advance.












Re: Refactoring transformation by seprating into modules [message #1096353 is a reply to message #1096347] Wed, 28 August 2013 09:13 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Hello,

Generally, the result depends on whether you superimpose M1 on M2 or M2 on M1.
In your specific case, both situations should work similarly: considering that both absA rules are similar in the two ATL modules, erasing one by another should not change the final behavior of your composed transformation.
If you need more insights on this superimposition mechanism, you can refer to the dedicated section of the ATL guide.

Best regards,


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Refactoring transformation by seprating into modules [message #1096700 is a reply to message #1096353] Wed, 28 August 2013 18:54 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis Wagelaar
Messages: 166
Registered: September 2012
Senior Member

Unfortunately, rule inheritance does not combine well with module
superimposition. The following paper explains why:

http://soft.vub.ac.be/Publications/2011/vub-soft-tr-11-04.pdf

What will happen in your example, is that only the rule hierarchy of the
module that was superimposed last is being executed.

If you want to combine rule inheritance with module superimposition, I
recommend that you use EMFTVM (http://wiki.eclipse.org/ATL/EMFTVM). It was
invented for this reason, and adds a number of other features too.

Cheers,
Dennis


Cheers,
Dennis
Re: Refactoring transformation by seprating into modules [message #1100824 is a reply to message #1096353] Tue, 03 September 2013 16:48 Go to previous message
Cuauhtemoc Castellanos
Messages: 8
Registered: September 2012
Location: paris
Junior Member
Hello,

Thanks for your quick answers.
I understand why it does not work now, thanks Dennis.

I am going to read about EMFTVM then.

Regards,

[Updated on: Wed, 04 September 2013 08:35]

Report message to a moderator

Previous Topic:Multiple inputs with references
Next Topic:Using a integer iterator
Goto Forum:
  


Current Time: Fri Oct 24 07:22:19 GMT 2014

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

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