OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — value of an association end call expression evaluation

  • Key: OCL25-106
  • Legacy Issue Number: 7518
  • Status: open  
  • Source: OpenModeling ( Jos Warmer)
  • Summary:

    10. – [2] The result value of an association end call expression evaluation that has
    – qualifiers, is determined according to the following rule. The ‘normal’
    – determination of result value is already given in section 5.3.7
    – ("Well-formedness Rules of the Evaluations package").
    ==> add ’inv’, remove ’implies’, add comma. It should be:
    [2] The result value of an association end call expression evaluation that has
    – qualifiers, is determined according to the following rule. The ‘normal’
    – determination of result value is already given in section 5.3.7
    – ("Well-formedness Rules of the Evaluations package").
    inv: let
    – the attributes that are the formal qualifiers
    formalQualifiers : Sequence(Attribute) =
    self.model.referredAssociationEnd.qualifier ,
    – the attributes of the class at the qualified end
    objectAttributes: Sequence(Attribute) =
    (if self.resultValue.model.isOclKind( Collection )
    then self.resultValue.model.oclAsType( Collection ).elementType->
    collect( feature->asOclType( Attribute ) )
    else self.resultValue.model->collect( feature->asOclType( Attribute ) )
    endif).asSequence() ,
    – the values for the qualifiers given in the ocl expression
    qualifierValues : Sequence( Value ) = self.qualifiers.asSequence() ,
    – the objects from which a subset must be selected through the
    qualifiers
    normalResult =
    source.resultValue.getCurrentValueOf(referredAssociationEnd.name)
    in
    – if name of attribute of object at qualified end equals name of formal
    – qualifier then
    – if value of attribute of object at qualified end equals the value
    given in
    – the exp
    – then select this object and put it in the resultValue of this
    expression.
    qualifiers->size <> 0 implies
    normalResult->select( obj |
    Sequence

    {1..formalQualifiers->size()}

    ->forAll( i |
    objectAttributes->at.name = formalQualifiers->at.name and
    obj.getCurrentValueOf( objectAttributes->at.name ) =
    qualifiersValues->at ))

  • Reported: OCL 2.0b2 — Thu, 10 Jun 2004 04:00 GMT
  • Updated: Thu, 8 Oct 2015 14:12 GMT