Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Problem assigning in a target the source element of an emftvm rule
Problem assigning in a target the source element of an emftvm rule [message #1109005] Sat, 14 September 2013 19:26 Go to next message
EtienneB Mising name is currently offline EtienneB Mising nameFriend
Messages: 35
Registered: June 2011
Member
Hi guys,

I have implemented a HOT in order to trace which rules can be executed on each element of a source model.

This HOT produces rules like this:

rule featureInstance {
from
fi : AADLI!FeatureInstance
to
t : MM_ATL2PM!ElementTransformationTuple (
key <- Sequence {fi},
value <- 'featureInstance'
)
}

The key field of ElementTransformationTuple is a list of NamedElement, which is a super class of FeatureInstance. When executing this rule, the emftvm runtime tries to put in the 'key' list an object of type ElementTransformationTuple. Of course this throws a class cast exception.

Is this a wrong usage of ATL, or a bug in the emftvm runtime?

Thanks a lot for your comments on this,
Etienne.

[Updated on: Sat, 14 September 2013 19:53]

Report message to a moderator

Re: Problem assigning in a target the source element of an emftvm rule [message #1110140 is a reply to message #1109005] Mon, 16 September 2013 12:31 Go to previous messageGo to next message
EtienneB Mising name is currently offline EtienneB Mising nameFriend
Messages: 35
Registered: June 2011
Member
OK, just found out the solution when reading this discussion on the forum:

http://www.eclipse.org/forums/index.php/t/489830/

So the solution here is to use <:= instead of <- in order to pass-by the resolve step.

Now, I just hav to figure out how to implement this in my HOT. If someone can give me some hints about this, it would be great!
Etienne.

[Updated on: Mon, 16 September 2013 12:51]

Report message to a moderator

Re: Problem assigning in a target the source element of an emftvm rule [message #1110637 is a reply to message #1110140] Tue, 17 September 2013 06:09 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

That would be:

rule featureInstance {
from
fi : AADLI!FeatureInstance
to
t : MM_ATL2PM!ElementTransformationTuple (
key <:= Sequence {fi},
value <- 'featureInstance'
)
}


Cheers,
Dennis
Re: Problem assigning in a target the source element of an emftvm rule [message #1112499 is a reply to message #1110637] Thu, 19 September 2013 20:07 Go to previous message
EtienneB Mising name is currently offline EtienneB Mising nameFriend
Messages: 35
Registered: June 2011
Member
Yes, this is exactly what I meant;

for the HOT, my question was about the way to change <- to <:= in a HOT; in other words, where this is encoded in the ATL metamodel.

I found out rapidly that the attribute Assignment of the meta class Binding is done for this. <:= corresponds to the case when Assignment is set to true.

Hope it helps,
Etienne.
Previous Topic:Parse ATL transformation with Java
Next Topic:Output model tagged values from the stereotype point to the input model
Goto Forum:
  


Current Time: Thu Apr 25 23:08:02 GMT 2024

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

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

Back to the top