Issue 13252: QVTo Standard Lybrary and typedefs Issue. Extending OCL predefined types (qvt-rtf) Source: Open Canarias, SL (Mr. Adolfo Sanchez-Barbudo Herrera, adolfosbh(at)opencanarias.com) Nature: Uncategorized Issue Severity: Summary: As interpretated from the especification (pag 104), the way of adding new operations to OCL predefined types is creating new Typedef instances which must have the OCL predefined type as the base type. The new operations are added to this new typedef. However there are several problems: 1. The specification doesn't provide any name for these typedefs. 2. The specification doesn't specify which type (QVT typedef or OCL predefined type) should be used when referencing such OCL predefined types in a QVTo transformation. Solution for 1). Suggestion a: Name the typedef with the same name of the base type. This provokes name's clash with the predefined type's name, due to there are two different types from two standard libraries which have the same name. A possible solution, would be expliciting that typedefs (aliases) will never clash its name with its base type. Suggestion b: Name the tpyedef with a different name, such as QVToXXXXXX or XXXX_Alias. Solution for 2). Suggestion a: Taking the typedef as the referenced type in QVTo transformations. Suggestion b: Taking the OCL predefined type as the referenced type in QVTo transformations. Suggestion c: Considering resolution of issue 13168, so that only OCL predefined exists, and therefore, the only type which can be referenced. It's a little bit weird having 2 different types (a type, and its alias typedef) which represent just the same type, specially when they are related by a reference. My solution's preference in order are: Suggestion c: Just having one type to refer. Suggestion a: Since the typedef "extends" the behaviour of the predefined type (adding new operations), the former must be the referred one. Suggestion b: The OCL predefined type is referenced, but we must take into account that the operations added to the typedef are also available. Resolution: Revised Text: Actions taken: January 13, 2009: received issue Discussion: End of Annotations:===== ender: Adolfo Sanchez Barbudo Date: Tue, 13 Jan 2009 17:13:34 +0000 From: Adolfo Sánchez-Barbudo Herrera Organization: Open Canarias S.L. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) To: Juergen Boldt Subject: MOF QVT RTF issue: QVTo Standard Lybrary and typedefs Issue. Extending OCL predefined types. Hi Juergen, I think that the issue which I sent you in my last email has not been included. I definitely will use the issues@omg.org email address to send issues, so that they are well organized, and I can format them. When you are able to, please, only add the following one (which I haven't sent to that address in order to not confuse you). Regards, Adolfo. ** QVTo Standard Lybrary and typedefs Issue. Extending OCL predefined types. ** As interpretated from the especification (pag 104), the way of adding new operations to OCL predefined types is creating new Typedef instances which must have the OCL predefined type as the base type. The new operations are added to this new typedef. However there are several problems: 1. The specification doesn't provide any name for these typedefs. 2. The specification doesn't specify which type (QVT typedef or OCL predefined type) should be used when referencing such OCL predefined types in a QVTo transformation. Solution for 1). Suggestion a: Name the typedef with the same name of the base type. This provokes name's clash with the predefined type's name, due to there are two different types from two standard libraries which have the same name. A possible solution, would be expliciting that typedefs (aliases) will never clash its name with its base type. Suggestion b: Name the tpyedef with a different name, such as QVToXXXXXX or XXXX_Alias. Solution for 2). Suggestion a: Taking the typedef as the referenced type in QVTo transformations. Suggestion b: Taking the OCL predefined type as the referenced type in QVTo transformations. Suggestion c: Considering resolution of issue 13168, so that only OCL predefined exists, and therefore, the only type which can be referenced. It's a little bit weird having 2 different types (a type, and its alias typedef) which represent just the same type, specially when they are related by a reference. My solution's preference in order are: Suggestion c: Just having one type to refer. Suggestion a: Since the typedef "extends" the behaviour of the predefined type (adding new operations), the former must be the referred one. Suggestion b: The OCL predefined type is referenced, but we must take into account that the operations added to the typedef are also available. -- Adolfo Sánchez-Barbudo Herrera adolfosbh(at)opencanarias(dot)com C/Elías Ramos González, 4, ofc. 304 38001 SANTA CRUZ DE TENERIFE Tel.: +34 922 240231 / +34 617 718268