Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Several rules with one sources
Several rules with one sources [message #1386887] Sun, 22 June 2014 14:35 Go to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Hi My friends,
I want to have several rules with one source and this source hasn't any condition. For example:
rule one{
from s: MMs!Source
to t: MMt!Target
( name<-s.name)
}

rule two{
from s: MMs!Source
to e: MMt!Element
(name<-s.name)
}

my goal is that both of the rules are done for each 's'. How can I do this in ATL?

[Updated on: Sun, 22 June 2014 20:58]

Report message to a moderator

Re: Several rules with one sources [message #1386930 is a reply to message #1386887] Mon, 23 June 2014 07:44 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
You can't, but you can create multiple elements in a single rule.
rule oneandtwo {
from s : MMs!Source
to 
t : MMt!Target (name <- s.name),
e : MMt!Element (name <- s.name)
}
Re: Several rules with one sources [message #1386935 is a reply to message #1386930] Mon, 23 June 2014 07:54 Go to previous messageGo to next message
Mahsa P is currently offline Mahsa PFriend
Messages: 115
Registered: July 2013
Senior Member
Dear Sylvain,
Thanks for your reply.But the important point in my question is generating the one target in each rule. Now I've used Lazy rule for one of them but I would prefer to use another way if it existed.
Regards...
Re: Several rules with one sources [message #1403558 is a reply to message #1386935] Thu, 24 July 2014 11:55 Go to previous message
Zheng Cheng is currently offline Zheng ChengFriend
Messages: 15
Registered: February 2012
Junior Member
As far as I know, there was no syntax support for what you want in ATL.

[Updated on: Thu, 24 July 2014 11:59]

Report message to a moderator

Previous Topic:Generate the XML file of an ATL Transformation
Next Topic:[EMFTVM] Comparing enum types
Goto Forum:
  


Current Time: Fri Apr 19 21:51:38 GMT 2024

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

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

Back to the top