Issue 13183: QVTo Standard Library. Clarification of the side-effect operations is needed. (qvt-rtf) Source: Open Canarias, SL (Mr. Adolfo Sanchez-Barbudo Herrera, nobody) Nature: Clarification Severity: Minor Summary: ** QVTo Standard Library. Clarification of the side-effect operations is needed. I would explicity clarify which operations may modify the object source on which the operations are called. All the stdlib operations must clarify: 1. if the operation acts on the own object or on a copy of the object. 2. which object(s) is(are) exactly returned (the own object, a (collection of) new object(s), a (collection of) referenced object(s)) For example: String::trim operation clearly says that creates a new object copy of itself which is modified and returned. However, String::firstToUpper operation may have several interpretations. Resolution: Issue 19146 resolution makes the behaviour of List clear. Dict clarified below and a typo String clarified below. Revised Text: In 8.3.7.1 Dictionary get change The null value is returned is not present. to The null value is returned if k is not present. Modifying the returned value modifies the value stored in the dictionary. In 8.3.7.4 Dictionary put change Assigns a value to a key. to Modifies the dictionary by assigning a value to a key. Modifying the value modifies the value stored in the dictionary. In 8.3.7.5 Dictionary clear change Removes all values in the dictionary to Modifies the dictionary by removing all values. In 8.3.7.7 Dictionary values change Returns the list of values in a list. The order is arbitrary. to Returns a new list of the values in the dictionary. The order is arbitrary. Modifying the returned list does not modify the contents of the dictionary. Modifying the values in the list modifies the values stored in the dictionary. In 8.3.7.8 Dictionary keys change Returns the list of keys in a list. The order is arbitrary. to Returns a new list of keys to the dictionary. Modifying the returned list does not modify the contents of the dictionary. Modifying the values in the list may modify the keys to the dictionary contents giving unpredictable behaviour. If mutable types such as List or Dictionary are used as Dictionary keys, applications should take care to create clones where appropriate. In 8.3.9 String change All string operations defined in OCL are available. to All string operations defined in OCL 2.4 are available. An OCL String is immutable and so there are no operations that modify strings. Actions taken: December 19, 2008: received issue July 15, 2014: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 19 Dec 2008 14:00:58 -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.X FormalNumber: formal/2008-04-03 Version: 1.0 RevisionDate: 04/03/08 Page: 107 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. Clarification of the side-effect operations is needed. I would explicity clarify which operations may modify the object source on which the operations are called. All the stdlib operations must clarify: 1. if the operation acts on the own object or on a copy of the object. 2. which object(s) is(are) exactly returned (the own object, a (collection of) new object(s), a (collection of) referenced object(s)) For example: String::trim operation clearly says that creates a new object copy of itself which is modified and returned. However, String::firstToUpper operation may have several interpretations.