Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » A weird result
A weird result [message #93110] Thu, 23 October 2008 06:56 Go to next message
Eclipse UserFriend
Originally posted by: behnaz.cwi.nl

Hi everyone,
I have an strang problem with ATL. Can't figure out why two completely
similar rules (well just different in from part) end up with different
result task2FIFO and sequenceEdge2primitive:

module bpmn2reo;
create OUT : reo from IN : bpmn;

helper context bpmn!Activity def : TaskWithInOutEdges(inEdgeNo :
Integer, outEdgeNo : Integer) : Boolean =
self.incomingEdges->asSequence()->size() = inEdgeNo and
self.outgoingEdges->asSequence()->size() = outEdgeNo;

helper context bpmn!SequenceEdge def : ConnectedToFIFO : Boolean =
self.source.TaskWithInOutEdges(1, 1) or
self.target.TaskWithInOutEdges(1, 1);

rule diagram2module
{
from
bd : bpmn!BpmnDiagram
to
m : reo!Module(name <- bd.name, connectors <- bd.pools)
}

rule pool2connetor
{
from
p :bpmn!Pool-------------(p.refImmediateComposite().pools->includes(p))
to
c : reo!Connector(name<-p.name, nodes<-p.vertices, primitives <-
p.sequenceEdges)
}

rule task2FIFO
{
from
a : bpmn!Activity(a.TaskWithInOutEdges(1, 1))
to
n : reo!FIFO(sourceEnds <- c, sinkEnds <- k),
c : reo!SourceEnd(node <- a.incomingEdges.at(1).source),
k : reo!SinkEnd(node <- a.outgoingEdges.at(1).target)
}

rule sequenceEdge2primitive
{
from
q : bpmn!SequenceEdge(not q.ConnectedToFIFO)
to
y : reo!Sync(sourceEnds <- c, sinkEnds <- k),
c : reo!SourceEnd(node <- q.source),
k : reo!SinkEnd(node <- q.target)
}

rule task2node
{
from
a : bpmn!Activity(not a.TaskWithInOutEdges(1, 1))
to
n : reo!Node(name <- a.name + ' rule: task2node')
}
Re: A weird result [message #93145 is a reply to message #93110] Thu, 23 October 2008 09:14 Go to previous messageGo to next message
Freddy Allilaire is currently offline Freddy AllilaireFriend
Messages: 130
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030700030201030908010207
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Benhnaz,

Could you give more details concerning your problem?

Regards,
Freddy.

Behnaz a
Re: A weird result [message #93307 is a reply to message #93145] Mon, 27 October 2008 08:03 Go to previous message
Eclipse UserFriend
Originally posted by: behnaz.cwi.nl

Dear Freddy,
Thanks for your help. It is resolved now.
Cheers,
Behnaz

Freddy Allilaire wrote:
> Hi Benhnaz,
>
> Could you give more details concerning your problem?
>
> Regards,
> Freddy.
>
> Behnaz a écrit :
>> Hi everyone,
>> I have an strang problem with ATL. Can't figure out why two completely
>> similar rules (well just different in from part) end up with different
>> result task2FIFO and sequenceEdge2primitive:
>>
>> module bpmn2reo;
>> create OUT : reo from IN : bpmn;
>>
>> helper context bpmn!Activity def : TaskWithInOutEdges(inEdgeNo :
>> Integer, outEdgeNo : Integer) : Boolean =
>> self.incomingEdges->asSequence()->size() = inEdgeNo and
>> self.outgoingEdges->asSequence()->size() = outEdgeNo;
>> helper context bpmn!SequenceEdge def : ConnectedToFIFO : Boolean =
>> self.source.TaskWithInOutEdges(1, 1) or
>> self.target.TaskWithInOutEdges(1, 1);
>>
>> rule diagram2module
>> {
>> from
>> bd : bpmn!BpmnDiagram
>> to
>> m : reo!Module(name <- bd.name, connectors <- bd.pools)
>> }
>>
>> rule pool2connetor
>> {
>> from
>> p
>> :bpmn!Pool-------------(p.refImmediateComposite().pools->includes(p))
>> to
>> c : reo!Connector(name<-p.name, nodes<-p.vertices, primitives <-
>> p.sequenceEdges)
>> }
>>
>> rule task2FIFO
>> {
>> from
>> a : bpmn!Activity(a.TaskWithInOutEdges(1, 1))
>> to
>> n : reo!FIFO(sourceEnds <- c, sinkEnds <- k),
>> c : reo!SourceEnd(node <- a.incomingEdges.at(1).source),
>> k : reo!SinkEnd(node <- a.outgoingEdges.at(1).target)
>> }
>>
>> rule sequenceEdge2primitive
>> {
>> from
>> q : bpmn!SequenceEdge(not q.ConnectedToFIFO)
>> to
>> y : reo!Sync(sourceEnds <- c, sinkEnds <- k),
>> c : reo!SourceEnd(node <- q.source),
>> k : reo!SinkEnd(node <- q.target) }
>>
>> rule task2node
>> {
>> from
>> a : bpmn!Activity(not a.TaskWithInOutEdges(1, 1))
>> to
>> n : reo!Node(name <- a.name + ' rule: task2node')
>> }
>
Previous Topic:[QVTO] Debugger
Next Topic:[ATL] Mixed types collection operations
Goto Forum:
  


Current Time: Fri Apr 26 10:02:24 GMT 2024

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

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

Back to the top