QVT 1.0 NO IDEA Avatar
  1. OMG Issue

QVT — Missing association from MappingParameter to a ModelParameter

  • Key: QVT-59
  • Legacy Issue Number: 9388
  • Status: closed  
  • Source: France Telecom R&D ( Mariano Belaunde)
  • Summary:

    Non primitive MappingParameters are related to ModelParameters
    but the the association is missing in the metamodel. Also, when
    The information cannot be infered from the parameter types
    there is no way to indicate this when using the textual syntax.
    Suggestion:
    Add the association
    'MappingParameter::extent : [0..1] ModelParameter'
    For the concrete syntax, use the '@' character:
    mymappingparameter:MyType@mymodelparameter
    Usage of this notation should not be mandatory when the model
    type can be automatically infered from the parameter type.

  • Reported: QVT 1.0b1 — Mon, 13 Feb 2006 05:00 GMT
  • Disposition: Resolved — QVT 1.0
  • Disposition Summary:

    (1) In Section 8.2.1.16 (MappingParameter) add the association:
    """
    extent : ModelParameter [0..1]
    The extent of the mapping parameter. Should be explicitly provided
    when there is an ambiguity on the extent that will own a potential
    created element corresponding to this parameter.
    """
    (2) In the same section 8.2.1.16, add the "Notation" subtitle
    as follows:
    """
    Notation
    The extent of a mapping parameter can be provided explicitly
    using its name as the scope prefix of its type, using the "::"
    symbol. The declarator has the form:
    mymappingparameter : myextent::MyType.
    It is not mandatory to provide the extent when it can be inferred
    from the type.
    Example:
    transformation T(in src:S, out dest1, out dest2);
    mapping X::foo(inout dest1::Y) : dest2:Y;
    // 'X' is a class of 'S' metamodel and 'Y' is a class of 'D' metamodel
    """
    Remark: No changes are needed in the grammar since the 'declarator' rule
    already supports this syntax.

    (3) In Figure 8.1, add the correspond link between MappingParameter
    and ModelParameter.

    (4) In Section 8.2.1 (ObjectExp), within the "Notation" subtitle,
    replace:
    """When provided the model parameter is notated within brackets
    after the object keyword.
    object[srcmodel] x:X

    { ... } // x is created within the 'srcmodel
    """
    by:
    """When an explicit extent is provided, the variable name
    prefixes the type of the object expression using the "::" symbol.
    object x: srcmodel::X { ... }

    // x is created within the 'srcmodel
    """
    (this change is required for consistency with mapping parameter notation).

    (5) In Section 8.2.2.23 (InstantiationExp), within the "Notation" subtitle,
    replace:
    """
    When provided the extent is notated by adding the variable name in brackets after the new keyword.
    column := new [mymodel] Column(n,t); // mymodel is the extent for the new instance.
    """

    by:
    """When an explicit extent is provided, the variable name
    prefixes the type of the instantiation expression using the "::" symbol.
    column := new mymodel::Column(n,t); // mymodel is the extent for the new instance.
    """

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