eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[evaluator] Support to-Ecore Associativity #1787

Open eclipse-ocl-bot opened 6 days ago

eclipse-ocl-bot commented 6 days ago

| --- | --- | | Bugzilla Link | 509698 | | Status | NEW | | Importance | P3 normal | | Reported | Dec 24, 2016 04:11 EDT | | Modified | Dec 30, 2016 11:59 EDT | | Blocks | 509668 | | See also | 509699 | | Reporter | Ed Willink |

Description

Optimization of redundant box/unbox/ecore conversions across collection operations requires a model of the conversion associativity.

The conversions are mostly monotomic and so associative, but numerics in particular are not. For instance Set(EObject){EFloatObject(1.0), EDoubleObject(1.0)}->size() is 1 using OCL semantics. Therefore toBox,toUnique are not associative if the type allows for numeric content.

eclipse-ocl-bot commented 6 days ago

By Ed Willink on Dec 24, 2016 04:23

(In reply to Ed Willink from comment #0)

Set(EObject){EFloatObject(1.0), EDoubleObject(1.0)}->size() is 1 using OCL

See Bug 509699 for a solution to using Ecore semantics.

eclipse-ocl-bot commented 6 days ago

By Ed Willink on Dec 24, 2016 07:56

More generally we can often know that "=" rather than "oclEquals" can be used for value equality, making set operations much faster.

eclipse-ocl-bot commented 6 days ago

By Ed Willink on Dec 30, 2016 11:59

Unfortunately many Ecore usages require an eager EList.