Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Is toString() operation not working on Real type?
[ATL] Is toString() operation not working on Real type? [message #97421] Mon, 29 December 2008 22:44 Go to next message
Fermín is currently offline FermínFriend
Messages: 5
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------050907040607080408020501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

After some experiments, I have found that the toString() operation is
not defined for Real types in ATL, thus contradicting the statement in
the ATL User Manual
( http://www.eclipse.org/m2m/atl/doc/ATL_User_Manual%5Bv0.7%5D .pdf),
4.1.4.3: "The toString() operation, available for both the integer and
*real* data types returns a string representing the integer/real value"

I'm attaching a very simple example that can be use to reproduce the
issue, composed of a metamodel with a class using a Real attribute
(Dummy.ecore), a model conforming to it (dummy-sample.ecore) and a very
simple query ATL that just print the attributes (DummyQuery.atl).

When I execute the query I get:

INFO: attReal=OclUndefined
attInteger=12
attString=foo

but I expected to get:

INFO: attReal=3.14
attInteger=12
attString=foo

So, I'm doing something wrong (my experience with ATL is not too long :)
or actually is there a issue with toString() on Real type? In the later
case, is there any workaround, please?

Thanks!

Best regards,

------
Ferm
Re: [ATL] Is toString() operation not working on Real type? [message #97479 is a reply to message #97421] Mon, 05 January 2009 08:53 Go to previous message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

This is a bug, so I created one here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259933

Thanks for reporting it.

Best regards,

William

Fermín Galán Márquez a écrit :
> Hi,
>
> After some experiments, I have found that the toString() operation is
> not defined for Real types in ATL, thus contradicting the statement in
> the ATL User Manual
> ( http://www.eclipse.org/m2m/atl/doc/ATL_User_Manual%5Bv0.7%5D .pdf),
> 4.1.4.3: "The toString() operation, available for both the integer and
> *real* data types returns a string representing the integer/real value"
>
> I'm attaching a very simple example that can be use to reproduce the
> issue, composed of a metamodel with a class using a Real attribute
> (Dummy.ecore), a model conforming to it (dummy-sample.ecore) and a very
> simple query ATL that just print the attributes (DummyQuery.atl).
>
> When I execute the query I get:
>
> INFO: attReal=OclUndefined
> attInteger=12
> attString=foo
>
> but I expected to get:
>
> INFO: attReal=3.14
> attInteger=12
> attString=foo
>
> So, I'm doing something wrong (my experience with ATL is not too long :)
> or actually is there a issue with toString() on Real type? In the later
> case, is there any workaround, please?
>
> Thanks!
>
> Best regards,
>
> ------
> Fermín
>
Previous Topic:[ATL] Problem with stereotype’s property with several values
Next Topic:[ATL] What's new in the 2.0.2 ATL version?
Goto Forum:
  


Current Time: Fri Apr 26 17:03:27 GMT 2024

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

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

Back to the top