Issue 13280: Page 90: Notation Section 8.2.2.4 WhileExp (qvt-rtf) Source: Open Canarias, SL (Mr. Adolfo Sanchez-Barbudo Herrera, nobody) Nature: Revision Severity: Minor Summary: Problem's text: compute (x:MyClass := self.getFirstItem()) while (x<>null) { … } discussion: the compute expression's body requires the enclosing braces Suggestion: replace the text above by "compute (x:MyClass := self.getFirstItem()) { while (x<>null) { … }}" - Page 92: Semantics Section 8.2.2.4 ForExp Problems text: Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 0; while (count <= source->size()) { var iterator := source->at(count+1); if (condition) continue; body; count += 1; }; }; Collection(T)::forOne(source, iterator, condition,body) = forEach (i | condition) { body; break; } Discussion: It seems that ForEach and forOne expression are not correctly expressed in QVTo terms. Suggestion: Change the text above by: Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 1; while (count <= source->size()) { var iterator := source->at(count); if (condition) body; count += 1; }; }; Collection(T)::forOne(source, iterator, condition,body) = forEach (iterator | condition) { body; break; } Resolution: Yes. Yes. Revised Text: In 8.2.2.4 WhileExp replace compute (x:MyClass := self.getFirstItem()) while (x<>null) { … } by compute (x:MyClass := self.getFirstItem()) { while (x<>null) { … } } In 8.2.2.6 ForExp replace Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 0; while (count <= source->size()) { var iterator := source->at(count+1); if (condition) continue; body; count += 1; }; }; by Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 1; while (count <= source->size()) { var iterator := source->at(count); if (condition) body; count += 1; }; }; and Collection(T)::forOne(source, iterator, condition,body) = forEach (i | condition) { body; break; } by Collection(T)::forOne(source, iterator, condition,body) = forEach (iterator | condition) { body; break; } Actions taken: January 15, 2009: received issue July 15, 2014: closed issue Discussion: End of Annotations:===== s is issue # 13280 Page 90: Notation Section 8.2.2.4 WhileExp Problem's text: compute (x:MyClass := self.getFirstItem()) while (x<>null) { . } discussion: the compute expression's body requires the enclosing braces Suggestion: replace the text above by "compute (x:MyClass := self.getFirstItem()) { while (x<>null) { . }}" - Page 92: Semantics Section 8.2.2.4 ForExp Problems text: Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 0; while (count <= source->size()) { var iterator := source->at(count+1); if (condition) continue; body; count += 1; }; }; Collection(T)::forOne(source, iterator, condition,body) = forEach (i | condition) { body; break; } Discussion: It seems that ForEach and forOne expression are not correctly expressed in QVTo terms. Suggestion: Change the text above by: Collection(T)::forEach(source, iterator, condition,body) = do { count : Integer := 1; while (count <= source->size()) { var iterator := source->at(count); if (condition) body; count += 1; }; }; Collection(T)::forOne(source, iterator, condition,body) = forEach (iterator | condition) { body; break; }