Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349125 - [pivot] Make OclSelf a pseudo-type
Summary: [pivot] Make OclSelf a pseudo-type
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: M1   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard: Specification
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-11 12:28 EDT by Ed Willink CLA
Modified: 2012-05-29 13:24 EDT (History)
0 users

See Also:
ed: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-06-11 12:28:39 EDT
OclSelf is current a special function Operation Template Parameter that must be declared. It is resolved as part of the specialization that creates the specialized signatures sometimes.

Change OclSelf to a pseudo-type that then just needs one global declaration, allowing as many uses as necessary. This should allow operation specialization to be unreified; OperationCallExp.referredOperation can be to the unspecialized operation, since the sopurce and arguments provide all the true types; no need to create the specialization and clutter up an orphanage.

This could simplify the pivot model so that only types have reified specializations.
Comment 1 Ed Willink CLA 2011-06-16 01:56:17 EDT
Operation specializations are now eliminated in the bug branch.

The second part of OclSelf is self-variant overload dispatch: e.g

OclAny::=(OclSelf) rather than OclAny::(OclAny) so that Collection::=(Collection) is an invariant overload, requiring single dynamic dispatch on the common type of source and argument. This is particularly useful for numerics so that

Real::+(OclSelf) : Real can be a catchall for
Double::+(OclSelf) : Real 
Integer::+(OclSelf) : Integer
Long::+(OclSelf) : Integer
Int::+(OclSelf) : Integer.

The dynamic dispatch for int + int will automatically invoke  Int::+(OclSelf) : Integer, requiring only intelligent code to give an appropriately grown type for the result.
Comment 2 Ed Willink CLA 2011-06-17 09:05:57 EDT
All symmetric binary operations are now declared using OclSelf and matched and dispatched accordingly.

Numeric Plus and Minus Operations revised to have distinct Real and Integer declarations. This saves an inheritance level for each.

Other operators can be tuned when IntValueImpl, LongValueImpl etc are introduced.

pushed to master.
Comment 3 Ed Willink CLA 2012-05-29 13:24:28 EDT
Closing all bugs resolved in Indigo.