Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] ATL power for transformations
[ATL] ATL power for transformations [message #555928] Mon, 30 August 2010 05:24 Go to next message
katja  is currently offline katja
Messages: 18
Registered: March 2010
Junior Member
Hello everybody,

I have two question for people who have expirience with ATL.

1) Is it possible to implement complex search algorithms using ATL? Have anybody had a successful example? For my transformations I need to implement a difficult algorithm which searches for one element of the source model a special another element and depending on whether such element exists or not transform it into one or another element of target model. Really, I have no clue how to do it with ATL and whether it is possible at all.

2) I need to transform one element of source model into a set of the elements of target model. The problem ist that I have a tree structure, i.e. I can only use lazy rules for my transformations. The second problem is that in this set of elements some elements should occur many times and some be unique. Moreover, the elements are connected with each other through references and should belong to different parts of my tree. I am trying to do such transformation, but every time anything goes wrong.

Have anyone expirience with cases like these? Can anyone give me a hint where I can read about such problems, look at some example or simply say whether it is possible and with how many effort.

If you need more detailed information from me, please, write, I will answer all the questions.

Thank you in advance!
Re: [ATL] ATL power for transformations [message #555957 is a reply to message #555928] Mon, 30 August 2010 07:38 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
The things you describe are possible with ATL but I think you'll have to ask more precise questions to get useful answers.
Re: [ATL] ATL power for transformations [message #555977 is a reply to message #555957] Mon, 30 August 2010 08:59 Go to previous messageGo to next message
katja  is currently offline katja
Messages: 18
Registered: March 2010
Junior Member
My first question relates the following problem:

I need to implement the Transformation EPC-to-BPMN. For every EPC-connector which startet the branching I need to find the corresponding EPC-connector which join these branches if such one exists. For example, I have a function and a following XOR-connector. After XOR-connector some branches follow, every of them can also have own "under"-branches, arbitrary number of elements etc. At some point these branches can be joined mit connector again. I need to find all such pairs.
I have sketched small picture for you because I am not very good in textual explanations:

The situation:

-----------------Function0----------------------
----------------------|----------------------------
-------------------XOR1--------------------------
---------|------------|---------------|-----------
---Event1----------E2--------------E3---------
---------|------------|---------------|-----------
---Funtion1--------F2-----------XOR2------
--------|-------------|--------|------------|---
-------E4-----------E5--------F3----------E6--
--------|------------|---------|------------|---
-------F5-----------F6-------------XOR3------
--------|------------|---------------|-----------
-------E7-----------E8--------------E9---------
--------|------------|---------------|-----------
-------------------XOR4--------------------------

I need to find: XOR4 for the given XOR1 as well as XOR3 for the given XOR2.
Is there some implemented helper library providing similar algorithms? Or how would you try to implement this?
Re: [ATL] ATL power for transformations [message #555996 is a reply to message #555928] Mon, 30 August 2010 09:57 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
This is more an OCL question than an ATL one but recursion and polymorphism should do the trick there.

helper context XOR def : getNextXOR : XOR =
{some logic on the branches to call getXOR}
;

helper context XOR def : getXOR : XOR =
self
;

helper context Connector def : getXOR : XOR =
{some logic to get XORs}
;

helper context Function def : getXOR : XOR =
{some logic to get XORs}
;
Re: [ATL] ATL power for transformations [message #556094 is a reply to message #555996] Mon, 30 August 2010 14:38 Go to previous messageGo to next message
katja  is currently offline katja
Messages: 18
Registered: March 2010
Junior Member
It is a very interesting idea. Thank you, Sylvain! I will try to do anything in this direction, but I don't have a clear plan yet.

There are algorithm (made at the University Paderborn, Germany) for the checking EPC models, I thought about the adjustment of them for my searching problem, however, I am not a very big expirience with ATL. Also one of the problems is that my metamodel defines only elements without methods. So, I have only functions, events, connectors and flows between them which store the information about the source and target. The logic should be written only using this information. If you as an expert say, it is possible in ATL, I will try to implement this. EarIier I was not sure if the ATL has the required power.

On the other hand, I don't want to put so much effort in this problem. Do you think, is it easier to implement the search with ATL as you proposed or to extend the metamodell elements with necessary methods?
Re: [ATL] ATL power for transformations [message #556175 is a reply to message #555928] Tue, 31 August 2010 04:20 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
You still have the possibility to mix both things : code the methods in the meta-model in Java and use those methods in the ATL transformation.
Re: [ATL] ATL power for transformations [message #556313 is a reply to message #556175] Tue, 31 August 2010 13:47 Go to previous messageGo to next message
katja  is currently offline katja
Messages: 18
Registered: March 2010
Junior Member
I want to ask you one more question, If I am allowed.
It is my second problem with EPC-BPMN transformation.

The basic mapping is:
EPC organisational unit -> BPMN Lane
EPC function -> BPMN Task

EPC organisational unit can be connected only with EPC Function. So, I assign such function and its adjacent elements (always from the, for example, left side), which are correspondingly transformed, to the BPMN Lane. The output looks like this:
<Lane>
-----<Task/>
-----<Task/>
-----<other elements/>
<Lane/>


It is works perfectly. Besides one exceptional case: if there are 2 EPC organisational units assigned to the function. In this case I transform the EPC function into BPMN task and want to duplicate this task in all Lanes, which are created from corresponding organisational units. Then, I need additionaly one connector and many sequence flows: between tasks and connector and between connector and next element.

I am trying something like this(it is only a part of whole solution, but even it doesn't work):

rule o2l {
from
a : EPC!Organisation
to
b : BPMN!Lane (
......some other elements......
laneElements <- thisModule.findComplexFunctions()-> collect(e | thisModule. function2task(e)),
laneElements <- thisModule.findComplexFunctions()-> collect(e | thisModule. function2connector(e)),
laneElements <- thisModule.findComplexFunctions()-> collect(e | thisModule. function2flow(e))
)
}


lazy rule function2task {
from
a : EPC!Function
to
b : BPMN!Task ( ) }

unique lazy rule function2connector {
from
a : EPC!Function
to
b : BPMN!Connector( ) }

unique lazy rule function2flow {
from
a : EPC!Function
to
b : BPMN!Flow(
Source <- Set{a}-> collect(e | thisModule. function2task(e)) ,
Target <- Set{a}-> collect(e | thisModule. function2connector(e))
)
}

As Output I get:

<Lane>
-----<Task id='111'/>
<Lane/>
<Lane>
-----<Task id='222'/>
<Lane/>
<Lane>
----- <Task id='333'/>
----- <Connector/>
-----<Flow source='123'/>(it is a reference to the task below)
-----<Flow source='123'/>
----- <Flow source='123'/>
<Lane/>
<Task id='123'/>

What I want to get is:

<Lane>
-----<Task id='111'/>
-----<Flow source='111'/>
<Lane/>
<Lane>
-----<Task id='222'/>
----- <Flow source='222'/>
<Lane/>
<Lane>
-----<Task id='333'/>
-----<Connector/>
-----<Flow source='333'/>
<Lane/>

What I do wrong?

Thank you for your help!

[Updated on: Tue, 31 August 2010 13:49]

Report message to a moderator

Re: [ATL] ATL power for transformations [message #556405 is a reply to message #555928] Wed, 01 September 2010 04:14 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 522
Registered: July 2009
Senior Member
I don't understand how you can call thisModule.findComplexFunctions() without it depending from the context that is a : EPC!Organisation.
Re: [ATL] ATL power for transformations [message #556421 is a reply to message #556405] Wed, 01 September 2010 05:23 Go to previous message
katja  is currently offline katja
Messages: 18
Registered: March 2010
Junior Member
I call this function, of course, depending on EPC!Organisation, sorry for the uncertainty, this function works perfectly. I also can create multiple tasks from one function and a connector within my solution. The problem is with flows between these tasks and connector. They belong to the wrong lanes and have the references on wrong objects...
Previous Topic:[ATL] BPMN2BPEL-sample, helper-functions not clear
Next Topic:[QVTo] Custom Templates possible?
Goto Forum:
  


Current Time: Wed Aug 27 19:15:11 EDT 2014

Powered by FUDForum. Page generated in 0.03037 seconds