Could it be that that invariant should be be assigned to the C_SINGLE_ATTRIBUTE instead? There it could make sense, for defining alternative C_OBJECTS. Since we only can have one of them at the instances, we don’t need to define any upper occurrence bigger than 1.
I think that is probably right. Somehow this invariant ended up on the wrong class. In ADL2, there is only C_ATTRIBUTE, and no such invariant anyway. I will change this in the UML.
When a C_SINGLE_ATTRIBUTE.alternatives().size() > 1, for all C_OBJECT in alternatives(), the C_OBJECT.occurrences.lower == 0
Because if any alternative has lower 1, it means that is the only alternative of object that can occur at that attribute (since it’s a single attribute).
I can’t find that constraint/invariant in AOM 1.4, and it’s key for modeling tools, and for archetype/template validation.
However, now that I think about it, I have some doubts. From a purely technical approach it seems a valid rule since, otherwise, in the instances only one of the children C_OBJECT would be compliant with the archetype.
But if we look at the context, (i.e. we are defining an alternative inside a C_SINGLE_ATTRIBUTE) defining those lower occurrences to 1 is as good as saying that a C_SINGLE_ATTRIBUTE has two possible children, when that will never happen in the instances. Moreover, if we could not use those {1} occurrences, how would we constrain that an ELEMENT cannot be null? They only way to do that is by defining that the alternatives, which are exclusive, have a minimum occurrence of 1.
I believe that the second interpretation is the correct one.