Issue 8451: OCL for Property::opposite() is incorrect: (uml2-rtf) Source: International Business Machines (Mr. Jim Amsden, jamsden(at)us.ibm.com) Nature: Uncategorized Issue Severity: Summary: OCL for InfrastructureLibrary::Core::Constructs::Property::opposite() should it be: opposite = if owningAssociation->empty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->empty() then otherEnd else Set{} endif else Set {} endif Recommendation: Fix the operation definition. Resolution: see above Revised Text: Superstructure (ptc/04-10-02) Replace the OCL constraint of constraint [1] for Property on page 126: opposite = if owningAssociation->notEmpty() and association.memberEnd-> size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->notEmpty() then otherEnd else Set{} endif else Set {} endif with the following constraint: opposite = if (owningAssociation->isEmpty() and association.memberEnd-> size() = 2) then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->isEmpty() then otherEnd else Set{} endif else Set {} endif Infrastructure (ptc/04-10-14) Replace the OCL constraint of constraint [1] for Property on page 128: opposite = if owningAssociation->notEmpty() and association.memberEnd-> size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->notEmpty() then otherEnd else Set{} endif else Set {} endif with the following constraint: opposite = if (owningAssociation->isEmpty() and association.memberEnd-> size() = 2) then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->isEmpty() then otherEnd else Set{} endif else Set {} endif Actions taken: March 4, 2005: received issue August 23, 2006: closed issue Discussion: Yes, there is an error here (although the correction expression must use the “isEmpty()” operation and not “empty()”) End of Annotations:===== ssue Y1: OCL for Property::opposite() is incorrect: Source: Jim Amsden, IBM Software Summary: OCL for InfrastructureLibrary::Core::Constructs::Property::opposite() should it be: opposite = if owningAssociation->empty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->empty() then otherEnd else Set{} endif else Set {} endif Recommendation: Fix the operation definition.