Issue 11826: Section 7.11.2.3: Empty CollectionTemplateExp is useful (qvt-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: 7.11.2.3 and Figure 7.6 both impose a lowerBound of 1 on CollectionTemplateExp.member and CollectionTemplateExp.rest. However, the concrete syntax permits an empty match. This empty match is exploited in the UnsharedWhenVarsToMgVars relation in Section 10. Suggest: Change CollectionTemplateExp.member to [0..*] Change CollectionTemplateExp.rest to [0..1] Add a sentence to clarify the empty match semantics. Resolution: yes Revised Text: In 7.11.2.3 CollectionTemplateExp change member : OclExpression [1..*] {composes} The expressions that the elements of the collection must have matches for. A special variable _ may be used to indicate that any arbitrary element may be matched and ignored. rest : Variable [1] The variable that the rest of the collection (i.e., excluding elements matched by member expressions) must match. A special variable _ may be used to indicate that any arbitrary collection may be matched and ignored. to member : OclExpression [*] {composes} The expressions that the elements of the collection must have matches for. A special variable _ may be used to indicate that any arbitrary element may be matched and ignored. The expression may be omitted to restrict a match to an empty collection. rest : Variable [0..1] The variable that the rest of the collection (i.e., excluding elements matched by member expressions) must match. A special variable _ may be used to indicate that any arbitrary collection may be matched and ignored. The variable may be omitted to restrict a match to a collection with no elements other than those matched by the member expressions. Actions taken: December 17, 2007: received issue July 15, 2014: closed issue Discussion: End of Annotations:===== m: "Ed Willink" To: Subject: MOF-QVT 1.0 Section 7.11.2.3: Empty CollectionTemplateExp is useful Date: Mon, 17 Dec 2007 08:37:25 -0000 X-Mailer: Microsoft Outlook, Build 10.0.6822 Thread-Index: AchAiAzWihYaI2I7SCyZbiHti5J6fQ== Hi 7.11.2.3 and Figure 7.6 both impose a lowerBound of 1 on CollectionTemplateExp.member and CollectionTemplateExp.rest. However, the concrete syntax permits an empty match. This empty match is exploited in the UnsharedWhenVarsToMgVars relation in Section 10. Suggest: Change CollectionTemplateExp.member to [0..*] Change CollectionTemplateExp.rest to [0..1] Add a sentence to clarify the empty match semantics. Regards Ed Willink