Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] ATL transform performance problems
[ATL] ATL transform performance problems [message #33656] Tue, 24 April 2007 09:29 Go to next message
Eclipse UserFriend
Originally posted by: paul.gribben.gmail.com

Hi,

I've written an ATL transform that creates a weave model (AMW) from 2
input UML2 model files. For small UML files it all works well, however for
large files (15MB+) the transform runs very, very slowly. I've added trace
output so I know it is processing the transform, however it got less than
half way after about 1 hour. I wrote the same transform in Java and it
took less than 2 minutes to complete.

There are 2 questions:
1. Is ATL expected to scale to files of this size without this sort of
performance degradation?
2. Has anyone written an ATL to Java conversion tool (perhaps this is
heracy for MDA!)

Thanks
Paul
Re: [ATL] ATL transform performance problems [message #33758 is a reply to message #33656] Tue, 24 April 2007 10:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi Paul,

Find my answers below:

Paul Gribben wrote:
> Hi,
>
> I've written an ATL transform that creates a weave model (AMW) from 2
> input UML2 model files. For small UML files it all works well, however
> for large files (15MB+) the transform runs very, very slowly. I've added
> trace output so I know it is processing the transform, however it got
> less than half way after about 1 hour. I wrote the same transform in
> Java and it took less than 2 minutes to complete.
>
> There are 2 questions:
> 1. Is ATL expected to scale to files of this size without this sort of
> performance degradation?

We do not have so much large files for testing, so we can not say much
about it. However, ATL's global algorithm deals quite good with big
models ONLY if it is fully declarative. So my question is: does your
transformation contain a lot of called rules? Does it make a lot of
allInstances() calls (this is not a imperative feature, but a real
bottleneck for large transformation)?

> 2. Has anyone written an ATL to Java conversion tool (perhaps this is
> heracy for MDA!)

Yes, it is heracy :) Moreover, I don't know anyone who tried to play
such a burning soul game !

> Thanks
> Paul
>

Best regards,
Mikael



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: [ATL] ATL transform performance problems [message #33792 is a reply to message #33758] Tue, 24 April 2007 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paul.gribben.gmail.com

Hi Mikael,

Thanks for your answers. I started by defining a fully declarative
transformation. Given that I'm trying to construct a match weave I
followed the approach shown in the AMW 'cartesian product' transformation.
However this causes the transform to create an CP explosion of
combinations (as you might expect), and dispite applying all possible OCL
filters on the 'from' elements the transform takes even longer that my
more recent attempt (which uses more imperative approach).

So my imperative approach creates collections of specific types that I
want to match from each input model. This at least does allow the
transform to process, but very slowly.

Is there a better declarative approach I should be using?
Thanks
Paul
Re: [ATL] ATL transform performance problems [message #33826 is a reply to message #33792] Tue, 24 April 2007 12:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marcos.didonet-del-fabro.univ-nantes.fr

Hi Paul,

I have been testing some variants of the Cartesian product matching transformation, also
because of the high number of combinations for large models.

What I have been doing is to restrict as early as possible the number of combinations, by
matching only elements of a given type (e.g., an EClass x EClass, EAttribute x EAttribute,
etc.). Usually I have fairly good results for EClasses.

I don't think there is a 'best' approach. This depends a lot on the application scenario
of the weaving model created by your match.
For instance, if you want to compare two versions of metamodels with a lot of similar
elements, you can use lazy (or called) rules to match EAttributes and EReference. However,
this is a trade-off between the accuracy of the result and the performance of the
transformation.


Regards,

Marcos.


Paul Gribben wrote:
> Hi Mikael,
>
> Thanks for your answers. I started by defining a fully declarative
> transformation. Given that I'm trying to construct a match weave I
> followed the approach shown in the AMW 'cartesian product'
> transformation. However this causes the transform to create an CP
> explosion of combinations (as you might expect), and dispite applying
> all possible OCL filters on the 'from' elements the transform takes even
> longer that my more recent attempt (which uses more imperative approach).
>
> So my imperative approach creates collections of specific types that I
> want to match from each input model. This at least does allow the
> transform to process, but very slowly.
>
> Is there a better declarative approach I should be using?
> Thanks
> Paul
Re: [ATL] ATL transform performance problems [message #33860 is a reply to message #33826] Tue, 24 April 2007 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paul.gribben.gmail.com

Hi Marcos,

I did restrict my matches so that they only consider UML classes that have
particular stereotypes. In the model this still results in about 2000
elements for each of the 2 input UML models. In the declarative approach
did something like this:

from
a : UML!Class, b : UML!Class (
a.hasStereotype('sometype') and b.hasStereotype('sometype')
and a.name = b.name )


where hasStereotype is a helper returning true if
self.getAppliedStereotypes()->exists(s | s.name = name)


With the imperative approach, I defined collections using helpers like
this:
Sequence(UML!Class) = UML!Class.allInstancesFrom('left')->select(s |
s.hasStereotype('sometype'))

then iterated through the left model collection looking for matches in the
corresponding right collection.

Thanks for taking a look anyway.
Paul
Re: [ATL] ATL transform performance problems [message #33945 is a reply to message #33860] Wed, 25 April 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marcos.didonet-del-fabro.univ-nantes.fr

Hello,

Considering you have a left and a right UML models, you match all the elements of the left
model with all the elements of the right model, but it also matches between the left
elements. The transformation rule does not make the distinction that "a : UML!Class" is
from the left model or that "b : UML!Class" is from the right model.

You may add in the guard some condition that tests if "a" is from the left and "b" is
from the right.

Regards,

Marcos.


Paul Gribben wrote:
> Hi Marcos,
>
> I did restrict my matches so that they only consider UML classes that
> have particular stereotypes. In the model this still results in about
> 2000 elements for each of the 2 input UML models. In the declarative
> approach did something like this:
>
> from
> a : UML!Class, b : UML!Class (
> a.hasStereotype('sometype') and b.hasStereotype('sometype')
> and a.name = b.name )
>
>
> where hasStereotype is a helper returning true if
> self.getAppliedStereotypes()->exists(s | s.name = name)
>
>
> With the imperative approach, I defined collections using helpers like
> this:
> Sequence(UML!Class) = UML!Class.allInstancesFrom('left')->select(s |
> s.hasStereotype('sometype'))
>
> then iterated through the left model collection looking for matches in
> the corresponding right collection.
>
> Thanks for taking a look anyway.
> Paul
>
Re: [ATL] ATL transform performance problems [message #34980 is a reply to message #33945] Sat, 28 April 2007 17:52 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

An additional optimization would be to name your two source metamodels
differently (e.g., UMLLeft and UMLRight). This way, ATL will not even
try to match two elements from the same model, which will save some
testings.

For instance:

-- [...]

create OUT : AMWExt from left : UMLLeft, INRight : UMLRight;

-- [...]

from
a : UMLLeft!Class, b : UMLRight!Class (
a.hasStereotype('sometype') and b.hasStereotype('sometype')
and a.name = b.name )

-- [...]


Regards,

Frédéric Jouault


Marcos Didonet Del Fabro wrote:
> Hello,
>
> Considering you have a left and a right UML models, you match all the
> elements of the left
> model with all the elements of the right model, but it also matches
> between the left
> elements. The transformation rule does not make the distinction that "a
> : UML!Class" is from the left model or that "b : UML!Class" is from the
> right model.
>
> You may add in the guard some condition that tests if "a" is from the
> left and "b" is
> from the right.
>
> Regards,
>
> Marcos.
>
>
> Paul Gribben wrote:
>> Hi Marcos,
>>
>> I did restrict my matches so that they only consider UML classes that
>> have particular stereotypes. In the model this still results in about
>> 2000 elements for each of the 2 input UML models. In the declarative
>> approach did something like this:
>>
>> from
>> a : UML!Class, b : UML!Class (
>> a.hasStereotype('sometype') and b.hasStereotype('sometype')
>> and a.name = b.name )
>>
>>
>> where hasStereotype is a helper returning true if
>> self.getAppliedStereotypes()->exists(s | s.name = name)
>>
>>
>> With the imperative approach, I defined collections using helpers like
>> this:
>> Sequence(UML!Class) = UML!Class.allInstancesFrom('left')->select(s |
>> s.hasStereotype('sometype'))
>>
>> then iterated through the left model collection looking for matches in
>> the corresponding right collection.
>>
>> Thanks for taking a look anyway.
>> Paul
>>
Previous Topic:[ATL] OCL Transformation
Next Topic:[atl] use of if...then in helpers
Goto Forum:
  


Current Time: Tue Apr 16 17:01:43 GMT 2024

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

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

Back to the top