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

Bug 228839

Summary: [library] Adding a parsing option to exclude non-standard operations from OCL Standard Library
Product: [Modeling] OCL Reporter: Adolfo Sanchez-Barbudo Herrera <adolfosbh>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P2 CC: alexander.igdalov, dvorak.radek, ed
Version: 1.2.0Keywords: plan
Target Milestone: 2.0.0   
Hardware: PC   
OS: Linux   
Whiteboard: Extensibility

Description Adolfo Sanchez-Barbudo Herrera CLA 2008-04-25 04:33:44 EDT
OCL Standard Library add some non-standard operations to some of its types:

String Primitive Type : toUpper, toLower.
All Collection Types: closure.

A parsing option which disable the inclusion of this operations during the parser process could be useful, specially to those languages (like QVTo) which define toUpper and toLower as operations in its Standard Library.
Comment 1 Ed Willink CLA 2009-06-24 12:55:38 EDT
I think the root Environment wants to publish a Map of String to IOCLBehavior so that at any point code can invoke something like

oclAny.inheritance is ANY_SCALAR or ANY

IOclBehavior behavior = rootEnvironment.getBehavior("oclAny.inheritance");
if ("ANY_SCALAR".equals(behavior.getString())
...

or

((IAnyTypeBehavior)behavior).getOclAnyTypeClass();

 to determine how to handle OclAny.

[not using final constants for clarity.]

So when choosing to use OCL 2.0 the behaviorMap gets one set of values and for OCL 2.1 another, and for strixct/non-strat yet another.

All unknown behavior keys return a DefaultBehavior for upward compatibility,
so that we only have to introduce behaviors as and when behavioral variation
points are required.

Comment 2 Ed Willink CLA 2010-06-26 10:05:03 EDT
The model driven library should allow users to supply variant libraries and so customised behaviours.

Further variation should be focussed on additional library declarative capability.
Comment 3 Ed Willink CLA 2011-05-27 02:58:05 EDT
Closing WONTFIXes.
Comment 4 Ed Willink CLA 2012-05-29 13:21:40 EDT
Closing all bugs resolved in Indigo.