[ATL] ATL power for transformations [message #555928] |
Mon, 30 August 2010 09:24 |
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 #556094 is a reply to message #555996] |
Mon, 30 August 2010 18:38 |
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 #556313 is a reply to message #556175] |
Tue, 31 August 2010 17:47 |
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 17:49] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05617 seconds