Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[] Question regarding operations on UnlimitedNatural taking UnlimitedNatural argument


there are operations defined on UnlimitedNatural in the 2.3 spec which as argument take an UnlimitedNatural (e.g., div, mod, max, min and the comparison operations). The current parser creates IntegerLiteralExp expressions for non-negative integer literals such as 0, 1, ...

This leads to a glitch for expressions such as


because * parses to an UnlimitedNaturalLiteralExp, 1 parses to an IntegerLiteralExp, Integer does not conform to UnlimitedNatural and hence the operation UnlimitedNatural::div(UnlimitedNatural) is not applicable.

Now, Integer::div(Integer) would be applicable, but it's not clear to me whether these operations should be visible for the specialization UnlimitedNatural. What's your take on this?

Currently, the "mature" implementation for Ecore gives up on any expression of this sort, and I wonder whether and how to fix it.

-- Axel

Back to the top