QVT 1.1 RTF Avatar
  1. OMG Issue

QVT11 — QVTo Standard Lybrary and typedefs Issue. Extending OCL predefined types

  • Key: QVT11-113
  • Legacy Issue Number: 13331
  • Status: closed  
  • Source: Open Canarias, SL ( Adolfo Sanchez-Barbudo Herrera [X] (Inactive))
  • Summary:

    As interpretation 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:
    c) Just having one type to refer.
    a) Since the typedef "extends" the behaviour of the predefined type (adding new operations), the former must be the referred one.
    b) The OCL predefined type is referenced, but we must taking into account that operations added to the typedef are available.

  • Reported: QVT 1.0 — Mon, 22 Dec 2008 05:00 GMT
  • Disposition: Duplicate or Merged — QVT 1.1
  • Disposition Summary:

    issue closed, duplicate of issue # 13252

  • Updated: Fri, 6 Mar 2015 22:56 GMT