Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Transformation Order Problem
ATL Transformation Order Problem [message #1040621] Sat, 13 April 2013 18:45 Go to next message
Basma Moukhtar is currently offline Basma Moukhtar
Messages: 27
Registered: June 2010
Junior Member
Dears,

I have a problem in an ATL program.
I need the input items to be transformed in the same order they appear in the input file. But they are transformed in the order of the firing of rules.

I used "ordered reference" in the input metamodel, but this doesn't work.

Any one have a clue?
Re: ATL Transformation Order Problem [message #1048256 is a reply to message #1040621] Wed, 24 April 2013 04:24 Go to previous messageGo to next message
Ronan B is currently offline Ronan B
Messages: 234
Registered: July 2009
Senior Member
Hi,
Take a look at http://www.eclipse.org/forums/index.php/t/197319/. You cannot rely on the order of matched rules. However, this is rarely a problem if you write your ATL as your should.
Regards,
Ronan
Re: ATL Transformation Order Problem [message #1057752 is a reply to message #1048256] Wed, 08 May 2013 10:52 Go to previous message
Basma Moukhtar is currently offline Basma Moukhtar
Messages: 27
Registered: June 2010
Junior Member
Thanks a lot.

It worked as follows:

The order is going to be determined by the reference (in another model element) that will actually "contain" these -to be ordered- elements.

For instance:

rule XXXtoYYY {
from
x: MM!XXX
to
y: NN!YYY (
Ys<- x.Xs->sortedBy(n | n.id)
)
}


then write the rules that convert each sub element X to Y.
Note: it worked with me without (->sortedBy(n | n.id))

Also check this Link:
http://www.eclipse.org/forums/index.php/mv/msg/474693/1039633/#msg_1039633
Previous Topic:Problem with multivalued field
Next Topic:EMFTVM/ATL How to assign the result of a rule matching several elements
Goto Forum:
  


Current Time: Wed Aug 20 06:50:09 EDT 2014

Powered by FUDForum. Page generated in 0.01496 seconds