Skip to main content



      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
Eclipse UserFriend
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] by 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
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 07:55 Go to previous message
Eclipse UserFriend
As far as I know, there was no syntax support for what you want in ATL.

[Updated on: Thu, 24 July 2014 07:59] by Moderator

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


Current Time: Wed Jul 23 11:23:05 EDT 2025

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

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

Back to the top