Skip to main content



      Home
Home » Modeling » ATL » Refactoring transformation by seprating into modules
Refactoring transformation by seprating into modules [message #1096347] Wed, 28 August 2013 05:03 Go to next message
Eclipse UserFriend
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 05:13 Go to previous messageGo to next message
Eclipse UserFriend
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,
Re: Refactoring transformation by seprating into modules [message #1096700 is a reply to message #1096353] Wed, 28 August 2013 14:54 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Refactoring transformation by seprating into modules [message #1100824 is a reply to message #1096353] Tue, 03 September 2013 12:48 Go to previous message
Eclipse UserFriend
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 04:35] by Moderator

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


Current Time: Tue Jul 22 19:36:44 EDT 2025

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

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

Back to the top