Issue 7517: result value of an association class call expression evaluation (ocl2-rtf) Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl) Nature: Uncategorized Issue Severity: 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(i).name = formalQualifiers->at(i).name and obj.qualifiedEnd.getCurrentValueOf( objectAttributes->at(i).name ) = qualifiersValues->at(i) )) Resolution: Revised Text: Actions taken: June 10, 2004: received issue Discussion: End of Annotations:===== s is issue # 7517 result value of an association class call expression evaluation 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(i).name = formalQualifiers->at(i).name and obj.qualifiedEnd.getCurrentValueOf( objectAttributes->at(i).name ) = qualifiersValues->at(i) ))