Issue 19121: Imprecise result types of resolveIn expressions (qvt-rtf) Source: (, ) Nature: Revision Severity: Significant Summary: Section 8.2.1.22 ResolveExp states the following about the result type of a resolve expression: "If no target variable is provided, the type is either Object (the type representing all types, see Section 8.3.1) either a Sequence of Objects - depending on the multiplicity." On top of that, Section 8.2.1.23 ResolveInExp states: "The type of a ResolveInExp expression is computed using the same rules as for the type of a ResolveExp." In case of a ResolveInExp, why can't we obtain the result type from the respective mapping? Consider the following example mapping EClass :: EClass2EPackage() : EPackage The result of any resolveIn expression for that mapping is necessarily a subtype of EPackage. No need to cast this up to Object. Resolution: OclAny rather Object is of course the top type Revised Text: In 8.2.1.23 ResolveInExp replace The type of a ResolveInExp expression is computed using the same rules as for the type of a ResolveExp. by Type of a resolveIn expression The type of a ResolveInExp expression depends on the type of the ‘target’ variable, the 'inMapping' operation and on the multiplicity indication (the ‘one’ property). The overall returned type is specified in terms of an intermediate resolved type. If a 'target' variable is provided, the resolved-type is the type of the 'target' variable Otherwise if an 'inMapping' is provided, .the resolved-type is the type of the 'inMapping'. Otherwise the resolved-type is Object (the type representing all types, see Section 8.3.1). If ‘one’ is true, the returned type is the resolved-type. Otherwise, the returned type is a Sequence of the resolved-type. Actions taken: November 22, 2013: received issue July 15, 2014: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 22 Nov 2013 04:16:26 -0500 To: Subject: Issue/Bug Report ******************************************************************************* Name: Christopher Gerking Employer: University of Paderborn mailFrom: christopher.gerking@upb.de Terms_Agreement: I agree Specification: Meta Object Facility (MOF) 2.0 Query/View/ Transformation Specification Section: 8.2.1.23 ResolveInExp FormalNumber: formal/2011-01-01 Version: 1.1 Doc_Year: 2011 Doc_Month: January Doc_Day: 01 Page: 101 Title: Imprecise result types of resolveIn expressions Nature: Revision Severity: Significant CODE: 3TMw8 B1: Report Issue Remote Name: nb-sch-fs782-1.cs.uni-paderborn.de Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 Time: 04:16 AM Description: Section 8.2.1.22 ResolveExp states the following about the result type of a resolve expression: "If no target variable is provided, the type is either Object (the type representing all types, see Section 8.3.1) either a Sequence of Objects - depending on the multiplicity." On top of that, Section 8.2.1.23 ResolveInExp states: "The type of a ResolveInExp expression is computed using the same rules as for the type of a ResolveExp." In case of a ResolveInExp, why can't we obtain the result type from the respective mapping? Consider the following example mapping EClass :: EClass2EPackage() : EPackage The result of any resolveIn expression for that mapping is necessarily a subtype of EPackage. No need to cast this up to Object.