Issue 13181: ** QVTo Standard Library (qvt-rtf) Source: Open Canarias, SL (Mr. Adolfo Sanchez-Barbudo Herrera, adolfosbh(at)opencanarias.com) Nature: Clarification Severity: Minor Summary: ** QVTo Standard Library. Some operation's returned values would better return the TemplateParameterType ** Several stdlib operations would be better changed to avoid doing unnecessary castings on the returned value of the operation. For AnyType::oclAsType(oclType) operation I could write: var aClass : Class := anotherVar.oclAsType(Class); However, for Model::objectsOfType(OclType) operation I can't do: var aClassSet : Set(Class) := aModel.objectsOfType(Class); I have to do the following, instead: var aClassSet : Set(Class) := aModel.objectsOfType(Class).oclAsType(Set(Class)); Therefore, for end-user usability, I propose exploiting TemplateParameterType and changing some QVTo Standard Library operations Element::subobjectsOfType(OclType) : Set(T) Element::allSubobjects(OclType) : Set(T) Element::subobjectsOfKind(OclType) : Set(T) Element::allSubobjectsOfKind(OclType) : Set(T) Element::clone() : T Element::deepclone() : T Model::objectsOfType(OclType) : Set(T) Model::copy() : T Model::createEmptyModel(): T Note: this approach is made in the Object::asOrderedTuple() : OrderedTuple(T) operation. Resolution: Revised Text: Actions taken: December 19, 2008: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 19 Dec 2008 13:55:07 -0500 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Adolfo Sanchez-Barbudo Herrera Company: Open Canarias S.L. mailFrom: adolfosbh@opencanarias.com Notification: Yes Specification: MOF 2.0 QVT Section: 8.3 FormalNumber: formal/2008-04-03 Version: 1.0 RevisionDate: 04/03/08 Page: 104 Nature: Clarification Severity: Minor HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 Description ** QVTo Standard Library. Some operation's returned values would better return the TemplateParameterType ** Several stdlib operations would be better changed to avoid doing unnecessary castings on the returned value of the operation. While for AnyType::oclAsType(oclType) operation I could write: var aClass : Class := anotherVar.oclAsType(Class); for Model::obectsOfType(OclType) operation I can't do: var aClassSet : Set(Class) := aModel.objectsOfType(Class); I have to do the following instead: var aClassSet : Set(Class) := aModel.objectsOfType(Class).oclAsType(Set(Class)); Therefore, for end-user usability, I propose exploiting TemplateParameterType and changing some QVTo standard Library operations Element::subobjectsOfType(OclType) : Set(T) Element::allSubobjects(OclType) : Set(T) Element::subobjectsOfKind(OclType) : Set(T) Element::allSubobjectsOfKind(OclType) : Set(T) Element::clone() : T Element::deepclone() : T Model::objectsOfType(OclType) : Set(T) Model::copy() : T Model::createEmptyModel(): T Note: this approach is made in the Object::asOrderedTuple() : OrderedTuple(T) operation. same AST as if I write OclVoid or oclAsType. With this idea, I'm really puzzled with the third paragraph of the section. Please revise this section so that it is less confusing.