Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 281849

Summary: OclInvalid and Invalid confusion
Product: [Modeling] OCL Reporter: Alexander Igdalov <alexander.igdalov>
Component: CoreAssignee: Alexander Igdalov <alexander.igdalov>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ed
Version: 1.3.0Keywords: plan
Target Milestone: 3.0.0   
Hardware: All   
OS: All   
Whiteboard: Compliance

Description Alexander Igdalov CLA 2009-06-29 09:19:29 EDT
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."

Remedy: exchange OclInvalid and Invalid and turn Invalid to lower case.

However, this is not trivial since it cannot be added to the current grammar as is since this causes RR-conflicts.

See http://dev.eclipse.org/newslists/news.eclipse.modeling.mdt.ocl/msg01476.html
Comment 1 Ed Willink CLA 2009-08-28 16:15:07 EDT
Solution submitted as patch to related discussion on Bug 282882.
Comment 2 Alexander Igdalov CLA 2009-09-22 07:34:39 EDT
Fixed. See comment #1
Comment 3 Ed Willink CLA 2011-05-27 02:47:05 EDT
Closing after over 18 months in resolved state.