Skip to main content


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 WendlandFriend
Messages: 83
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 WillinkFriend
Messages: 7655
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:Transform between Rose model and UML model
Next Topic:How can I get the order among SD Lifeline events?
Goto Forum:
  


Current Time: Fri Apr 26 04:31:49 GMT 2024

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

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

Back to the top