Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Problem with for
Problem with for [message #72089] Wed, 16 January 2008 13:28 Go to next message
Eclipse UserFriend
Originally posted by: luciananegri81.yahoo.it

Hi all,
I've following problem: when I run atl file
the FOR instruction is not performed.
Have anyone an idea for this problem?

Thanks
Luciana
[ATL]Re: Problem with for [message #72148 is a reply to message #72089] Wed, 16 January 2008 15:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------080306010106080705020809
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

First, please prefix the subject of you ATL related post with [ATL] as I
did for the answer. Thanks.

Can you give an excerpt of the transformation you are trying to launch
please ?


Quentin

Luciana a
Re: [ATL]Re: Problem with for [message #72897 is a reply to message #72148] Mon, 21 January 2008 08:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luciananegri81.yahoo.it

Hi Quentin,

excuse me for the prefix ATL, I have forgotten him.
Here an excerpt of transformation:

helper def : allClassesUC : Set (UML!PAstep) = UML!PAstep.allInstances()
->select(e | e.subject.size() <> 0);


lazy rule actor2root {
from
a : UML!Actor(
(a.oclIsTypeOf(UML!Actor) and not a.useCase.isEmpty())
)
to
r : FT!Root (
name <- a.name,
description <- 'Reliability del sistema',
SystemReliability <- ' ',
port <- createPort
),
createPort : FT!Port (
name <- 'Port of ' + a.name,
type <- #OR,
outdegree <- 1
)
do {
for (e in thisModule.allClassesUC) {
createPort.event <-thisModule.uc2intermediate;
}
}
}

lazy rule uc2intermediate {
from
uc : UML!PAstep
(not uc.subject.isEmpty)
to
intermediate : FT!Intermediate (
name <- 'Reliability '+ uc.name,
composedProbability <- ' '
)
}

Thank you very much.

Luciana
Re: [ATL]Re: Problem with for [message #72932 is a reply to message #72897] Mon, 21 January 2008 09:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------050207030903010206020206
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Luciana,

I am not sure but I can see you call a lazy rule without giving its
paramameter in the for statement. Therefore it could be why, having no
input, it cannot perform the item creation. Then it appears as if the
"for" loop does not do anything.

Please try the following:
for (e in thisModule.allClassesUC) {
createPort.event <-thisModule.uc2intermediate(e);
}

Regards,

Quentin

Luciana a
Re: [ATL]Re: Problem with for [message #72982 is a reply to message #72932] Mon, 21 January 2008 09:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luciananegri81.yahoo.it

Hi Quentin,

I've tried with your solution, but the output file is the same.
I think (but I not sure) that the part 'from' of the rule uc2intermediate
is not read. It is possible?
It this happens, what I can do?

Thank you very much.
Luciana
Re: [ATL]Re: Problem with for [message #72994 is a reply to message #72982] Mon, 21 January 2008 10:16 Go to previous message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------050801050104050905010208
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi again,

Luciana a
Previous Topic:[ATL] Converting XML to EMF/Ecore-based Language
Next Topic:remove duplications in sequence
Goto Forum:
  


Current Time: Thu Apr 25 10:51:37 GMT 2024

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

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

Back to the top