| Summary: | [pivot] Make OclSelf a pseudo-type | ||
|---|---|---|---|
| Product: | [Modeling] OCL | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | OCL Inbox <mdt-ocl-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | ed:
juno+
|
| Version: | 3.2.0 | ||
| Target Milestone: | M1 | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | Specification | ||
|
Description
Ed Willink
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. 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. Closing all bugs resolved in Indigo. |