Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Implementation of UML::Integer too restricting
Implementation of UML::Integer too restricting [message #1049747] Fri, 26 April 2013 08:11 Go to next message
Marc-Florian Wendland is currently offline Marc-Florian Wendland
Messages: 60
Registered: January 2013
Member
Hi all,

I have found an interesting behavior when trying to set an value to an
LiteralInteger. I used a integer beyond my platform-specific Integer range.
As a result, the value was not changed. As a result, I cannot create a model
with integer vaues that exceeds my machine capacity. This is somehow
annoying, isn't it?

I see two possible solutions:

1. Submit an official change request to OMG to change the value type of
LiteralInteger to String (least favorable solution).
2. Change the UML2 implementation of Integer from int to BigInt. I would opt
for this.

Does this make sense? Shall I file a bug?

Marc-Florian
Re: Implementation of UML::Integer too restricting [message #1049938 is a reply to message #1049747] Fri, 26 April 2013 13:27 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

UML is not broken, so I don't see why OMG should change, and I can
predict very abrupt rejection of this change.

It seems that MDT/UML2's LiteralInteger is too close to Ecore.

If you use an OCL-languaged OpaqueExpression, the classic MDT/OCL you
will now get Long. The newer Pivot based MDT/OCL uses a Number that may
be BigInteger/Long/Integer/Short/Byte externally or IntIntegerValue,
LongIntegerValue or BigIntegerValue internally, the latter growing to
avoid ill-defined overflows and so getting much closer to an emulation
of the specified unbounded integers without imposing BigInteger on the
99.99% of more modest usages. Similarly for Reals.

It is hoped to have auto-generation of the UML 2.5 OCL constraints
direct from the OMG models for Luna, at which point this problem may
vanish. It is unlikely that anything will change before then because of
API compatibility.

If UML 2.5 requires a major MDT/UML2 version change then it may be
possible to adjust the LiiteralInteger API slightly.

So worth a Bugzilla, but don't expect a fast response.

Regards

Ed Willink




On 26/04/2013 09:11, Marc-Florian Wendland wrote:
> Hi all,
>
> I have found an interesting behavior when trying to set an value to an
> LiteralInteger. I used a integer beyond my platform-specific Integer
> range. As a result, the value was not changed. As a result, I cannot
> create a model with integer vaues that exceeds my machine capacity.
> This is somehow annoying, isn't it?
>
> I see two possible solutions:
>
> 1. Submit an official change request to OMG to change the value type
> of LiteralInteger to String (least favorable solution).
> 2. Change the UML2 implementation of Integer from int to BigInt. I
> would opt for this.
>
> Does this make sense? Shall I file a bug?
>
> Marc-Florian
Previous Topic:How to register a UML Profile
Next Topic:Transform between Rose model and UML model
Goto Forum:
  


Current Time: Sat Sep 20 07:58:56 GMT 2014

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

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