Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » specifying multiple source pattern in ATL
specifying multiple source pattern in ATL [message #1413134] Wed, 27 August 2014 22:08 Go to next message
Hamid Qartal is currently offline Hamid QartalFriend
Messages: 33
Registered: December 2013
Member
When I am looking to the ATL ecore diagram (i.e., its metamodel), the "InPattern" Element in the diagram can have more than one "InPatternElement" elements (i.e., inPattern -> 1..* InPatternElement). If I am not wrong, this means that the "from" part of each rule in ATL can contain more than one element!
(I accessed the Ecore metamodel of ATL from ATL plugin jar file)

for example in the following code:
from
	p : MMPerson!Person (p.name = 'Smith')


all the from part is considered as inPattern and p : MMPerson!Person part is considered InPatternElement. So, my first Question: Am I right?

if answer to the first question is YES, it implies that I can have more than one InPatternElement in a source pattern :

from
	p1 : MMPerson!Person (p.name = 'Smith'),
        p2 : MMPerson!Student


But neither the ATL manual in the following address (ATL Manual) mention this, nor I am able to write such thing and successfully compile.


So my second Question: Is it possible to write a source pattern similar to what I wrote above in ATL? if so, how can I compile the code?


Any suggestion?
Thx
Re: specifying multiple source pattern in ATL [message #1413315 is a reply to message #1413134] Thu, 28 August 2014 09:04 Go to previous message
Zheng Cheng is currently offline Zheng ChengFriend
Messages: 15
Registered: February 2012
Junior Member
Hello,

Try this:
from
	p1 : MM1!M1,
        p2 : MM2!M2 (filter)


The source pattern filter(or guard) should place at the end of source patterns, although you intend to constrain only the first pattern.


Regards,

[Updated on: Thu, 28 August 2014 09:15]

Report message to a moderator

Previous Topic:Can ATL support the input from user during transformation?
Next Topic:helper
Goto Forum:
  


Current Time: Thu Apr 25 06:54:45 GMT 2024

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

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

Back to the top