Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AM3 » [ATL] matched rule: imperative part without target section
[ATL] matched rule: imperative part without target section [message #495145] Tue, 03 November 2009 22:10 Go to next message
mats  is currently offline mats Friend
Messages: 2
Registered: November 2009
Junior Member
hello everyone,
I'm actually an ATL virgin, but I've found an interesting problem:
I've got a transformation with two input models which shall be merged into one new model based on some rules. It can happen, that an element x1 of input1 and an element x2 of input2 are marged to a new element xNew in the output. But based on the informations in x1 and x2 (if they eliminate each other) no element shall be created in the output. I first thought about a matched rule for x1 and x2 with no target-section. The do-section could be used to find out If they eliminate each other, if they don't, a called rule could be used to produce the element in the output.
Problem: matched rules without target-sections are forbidden Sad
any ideas, how to solve this problem?
Mats
Re: [ATL] matched rule: imperative part without target section [message #499249 is a reply to message #495145] Fri, 20 November 2009 14:57 Go to previous message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
mats a écrit :
> hello everyone,
> I'm actually an ATL virgin, but I've found an interesting problem:
> I've got a transformation with two input models which shall be merged
> into one new model based on some rules. It can happen, that an element
> x1 of input1 and an element x2 of input2 are marged to a new element
> xNew in the output. But based on the informations in x1 and x2 (if they
> eliminate each other) no element shall be created in the output. I first

I may suggest you match on input1 element and catch the corresponding
input2 element in "using" section with allInstances() + select
Re: [ATL] matched rule: imperative part without target section [message #574931 is a reply to message #495145] Fri, 20 November 2009 14:57 Go to previous message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
mats a écrit :
> hello everyone,
> I'm actually an ATL virgin, but I've found an interesting problem:
> I've got a transformation with two input models which shall be merged
> into one new model based on some rules. It can happen, that an element
> x1 of input1 and an element x2 of input2 are marged to a new element
> xNew in the output. But based on the informations in x1 and x2 (if they
> eliminate each other) no element shall be created in the output. I first

I may suggest you match on input1 element and catch the corresponding
input2 element in "using" section with allInstances() + select
Previous Topic:Need help to open the "Pet Store" usecase
Next Topic:[AM3] New AM3 version compatible with ATL 3.x is now available from the project's SVN HEAD
Goto Forum:
  


Current Time: Mon Jan 20 00:28:09 GMT 2025

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

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

Back to the top