I think to have a good solution in the spec, we need to go back to the core of this issue: comparing primitive/assumed types.
IMO we need to revisit this model :
- Any has an is_equal() method, should we say exactly what “is equal” for each type?
- In the UML, the methods of Any don’t appear.
- Most operators are defined with the keyword “infix”, I don’t think that is valid UML.
- All operators defined as “infix” could be defined as a normal method in the UML.
- Then if some implementation needs to map those methods to an infix operator, it could be done, but not all implementations need that.
- Seems all Numeric classes are Ordered, so why not inherit Numeric from Ordered instead of having the Ordered_Numeric class?
- Ordered seems to be more an interface than an abstract class, since it only has a method.
- Numeric seems also to be more an interface than a class.
- Ordered has the lowerThan() defined as “infix <”, I think we need to define how that works for all the ordered types.
With this considered, mainly points 1. and 9. we would have a good base to define is_equals() and lower_than() for other types, like “numeric DVs”.