Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Problems using UML2 models
[ATL] Problems using UML2 models [message #73499] Sun, 27 January 2008 19:23 Go to next message
Juancho  is currently offline Juancho Friend
Messages: 17
Registered: July 2009
Junior Member
Hi all,

We have found some problems when using UML2 models. This question may be
better posed in the EMF newsgroup, but I hope someone here has already
found the same problems and the solutions could help him also.

1) ATL engine raise an exception when it finds a multivalued
UML2!Property (upper = *). The solution is to set the upper value to
‘-1’. However, any time you change and save the model, the UML2 plug-in
translates every ‘-1’ to an ‘*’. So, you have to edit textually the UML2
model and change back every ‘*’ to ‘-1’. Is there any way to avoid this
behaviour??

2)The UML2 metamodel says every Property owns a ‘class’ attribute
pointing to the UML2!Class that contains the Property. Nevertheless,
when we try to navigate it in any binding (i.e. p.class), it returns
oclUndefined. We can solve the problem using OCL
refImmediateComposite(). Again, is there any way to avoid this??

Thanks on advance ...
Juancho
Re: [ATL] Problems using UML2 models [message #74277 is a reply to message #73499] Tue, 05 February 2008 10:52 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Juan M. Vara wrote:
> Hi all,

Hi Juan,

>
> We have found some problems when using UML2 models. This question may be
> better posed in the EMF newsgroup, but I hope someone here has already
> found the same problems and the solutions could help him also.
>
> 1) ATL engine raise an exception when it finds a multivalued
> UML2!Property (upper = *). The solution is to set the upper value to
> ‘-1’. However, any time you change and save the model, the UML2 plug-in
> translates every ‘-1’ to an ‘*’. So, you have to edit textually the UML2
> model and change back every ‘*’ to ‘-1’. Is there any way to avoid this
> behaviour??

I've seen this behaviour of the UML2 plugin as well. It appears that the
UML2 plugin recently started using '*' instead of '-1'. It is still
possible for me to copy LiteralUnlimitedNatural values. I can also still
assign the '-1' value as follows:

observers : UML2!"uml::Property" (
name <- 'observer',
type <- thisModule.Observer,
visibility <- #private,
isUnique <- true,
isOrdered <- true,
upperValue <- observersUpper,
lowerValue <- observersLower),
observersUpper : UML2!"uml::LiteralUnlimitedNatural" (
value <- 0-1),
observersLower : UML2!"uml::LiteralInteger" (
value <- 0),

N.B. You cannot assign values to the 'upper' and 'lower' attributes of a
Property. You must assign to 'lowerValue' and 'upperValue'.

>
> 2)The UML2 metamodel says every Property owns a ‘class’ attribute
> pointing to the UML2!Class that contains the Property. Nevertheless,
> when we try to navigate it in any binding (i.e. p.class), it returns
> oclUndefined. We can solve the problem using OCL
> refImmediateComposite(). Again, is there any way to avoid this??

This works for me, provided that the Property is really owned by a
Class. Some Property elements are owned by an Association.

Cheers,
Dennis

>
> Thanks on advance ...
> Juancho
Previous Topic:[ATL] Problem in Transformation ATL (Root Element)
Next Topic:[ATL] Team project sets
Goto Forum:
  


Current Time: Thu Apr 25 04:36:37 GMT 2024

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

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

Back to the top