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 10:35 Go to next message
Mahsa P is currently offline Mahsa P
Messages: 86
Registered: July 2013
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 16:58]

Report message to a moderator

Re: Several rules with one sources [message #1386930 is a reply to message #1386887] Mon, 23 June 2014 03:44 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
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 03:54 Go to previous message
Mahsa P is currently offline Mahsa P
Messages: 86
Registered: July 2013
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...
Previous Topic:[ATL] Tool support for generating the xmi source model
Next Topic:[EMFTVM] Calling static methods
Goto Forum:
  


Current Time: Wed Jul 23 05:53:43 EDT 2014

Powered by FUDForum. Page generated in 0.01720 seconds