Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Invalid and OclInvalid
Invalid and OclInvalid [message #61537] Tue, 26 August 2008 14:57 Go to next message
Eclipse UserFriend
Originally posted by: Alexander.Igdalov.borland.com

Hi Christian,

It seems there is some confusion with invalid and OCLInvalid. In the
current implementation Invalid is a type, while OclInvalid is a literal
of the Invalid type. Here follow the corresponding grammar extracts:

primitiveTypeCS ::= Invalid
invalidLiteralExpCS ::= OclInvalid

However, the OCL spec says (11.2.4 OclInvalid):

"The type OclInvalid is a type that conforms to all other types. It has
one single instance called invalid. Any property call applied on invalid
results in OclInvalid, except for the operations oclIsUndefined() and
oclIsInvalid(). OclInvalid is itself an instance of the metatype
InvalidType."

Thus, I would propose to exchange OclInvalid and Invalid and turn
Invalid to lower case.

Cheers,
Alex.
Re: Invalid and OclInvalid [message #61571 is a reply to message #61537] Tue, 26 August 2008 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Alex,

Yes, I know :-( This is a change that I am hoping to do in am MDT OCL
2.0 release to adopt the 2.1 revision of the spec. Otherwise, this
constitutes a breaking API change that we can't do in a 1.3 release. I
haven't thought about whether it could be hacked with a
strict-compliance Option ... the implications at the grammar level
suggest that it could be problematic.

If it's urgent, I would certainly welcome contribution of a solution
that maintains compatibility!

Cheers,

Christian

Alexander Igdalov wrote:
> Hi Christian,
>
> It seems there is some confusion with invalid and OCLInvalid. In the
> current implementation Invalid is a type, while OclInvalid is a literal
> of the Invalid type. Here follow the corresponding grammar extracts:
>
> primitiveTypeCS ::= Invalid
> invalidLiteralExpCS ::= OclInvalid
>
> However, the OCL spec says (11.2.4 OclInvalid):
>
> "The type OclInvalid is a type that conforms to all other types. It has
> one single instance called invalid. Any property call applied on invalid
> results in OclInvalid, except for the operations oclIsUndefined() and
> oclIsInvalid(). OclInvalid is itself an instance of the metatype
> InvalidType."
>
> Thus, I would propose to exchange OclInvalid and Invalid and turn
> Invalid to lower case.
>
> Cheers,
> Alex.
Re: Invalid and OclInvalid [message #61594 is a reply to message #61571] Tue, 26 August 2008 16:48 Go to previous message
Eclipse UserFriend
Originally posted by: Alexander.Igdalov.borland.com

Christian,

Fortunately, this is not urgent in my case. And regarding a solution
that would be compatible with the current implementation, I agree, it
cannot be just adding new rules

primitiveTypeCS ::= OclInvalid
invalidLiteralExpCS ::= invalid

since it causes RR-conflicts.

Best,
Alex.

Christian W. Damus wrote:
> Hi, Alex,
>
> Yes, I know :-( This is a change that I am hoping to do in am MDT OCL
> 2.0 release to adopt the 2.1 revision of the spec. Otherwise, this
> constitutes a breaking API change that we can't do in a 1.3 release. I
> haven't thought about whether it could be hacked with a
> strict-compliance Option ... the implications at the grammar level
> suggest that it could be problematic.
>
> If it's urgent, I would certainly welcome contribution of a solution
> that maintains compatibility!
>
> Cheers,
>
> Christian
>
> Alexander Igdalov wrote:
>> Hi Christian,
>>
>> It seems there is some confusion with invalid and OCLInvalid. In the
>> current implementation Invalid is a type, while OclInvalid is a
>> literal of the Invalid type. Here follow the corresponding grammar
>> extracts:
>>
>> primitiveTypeCS ::= Invalid
>> invalidLiteralExpCS ::= OclInvalid
>>
>> However, the OCL spec says (11.2.4 OclInvalid):
>>
>> "The type OclInvalid is a type that conforms to all other types. It
>> has one single instance called invalid. Any property call applied on
>> invalid results in OclInvalid, except for the operations
>> oclIsUndefined() and oclIsInvalid(). OclInvalid is itself an instance
>> of the metatype InvalidType."
>>
>> Thus, I would propose to exchange OclInvalid and Invalid and turn
>> Invalid to lower case.
>>
>> Cheers,
>> Alex.
Previous Topic:OrderedSet::flatten()
Next Topic:Type conformance issues
Goto Forum:
  


Current Time: Fri Apr 26 11:09:04 GMT 2024

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

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

Back to the top