OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — result value of an association class call expression evaluation

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

    9. – [2] The result value of an association class 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").
    ==> missing ’context .... inv:’
    ==> missing brackets and comma; the whole expression should be:
    let
    – the attributes that are the formal qualifiers. Because and
    association
    – class has two or
    – more association ends, we must select the qualifiers from the other
    end(s),
    – not from – the source of this expression. We allow only 2-ary associations.
    formalQualifiers : Sequence(Attribute) =
    self.model.referredAssociationClass.connection->any( c |
    c <> self.navigationSource).qualifier.asSequence() ,
    – the attributes of the class at the qualified end. Here we already
    assume
    – that an
    – AssociationEnd will be owned by a Classifier, as will most likely be
    the
    – case in the
    – UML 2.0 Infrastructure.
    objectAttributes: Sequence(Attribute) =
    self.model.referredAssociationClass.connection->any( c |
    c <> self.navigationSource).owner.feature->select( f |
    f.isOclType( Attribute ))->asSequence() ,
    – the rolename of the qualified association end
    qualifiedEnd: String = self.model.referredAssociationClass.connection-
    >any( c

    c <> self.navigationSource).name ,
    – 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(referredAssociationClass.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.qualifiedEnd.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