-
Key: QVT-25
-
Legacy Issue Number: 10977
-
Status: closed
-
Source: France Telecom R&D ( Mariano Belaunde)
-
Summary:
Find better notation for explicit extent indication in operational mapping parameters.
Though the type names prefixed with the extent work from the point of implementation, I suspect it
might add on complexity of type resolution.
All the folks are pretty much used to local and qualified name convention concerning the '::' separator use.
Is 'bag::Foo' a qualified type name or unqualified one but to be created in a 'bag' extent?
I think that including model param names into type resolution may increase the level of ambiguity as in this way, param names can impose clashes with packages, model types.This issue is related to resolution of 9388 in Ballot1.
-
Reported: QVT 1.0b1 — Mon, 30 Apr 2007 04:00 GMT
-
Disposition: Resolved — QVT 1.0
-
Disposition Summary:
Replace resolution of issue 9388 (Ballot 1) by the following resolution text.
(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 the '@' symbol after the type of the mapping parameter. In that case the declarator has the form:
mymappingparameter : myextent::MyType@mymodelparameter.
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 Y@dest1) : Y@dest2;
// 'X' is a class of 'S' metamodel and 'Y' is a class of 'D' metamodel
"""(3) In Figure 8.1, add the correspond link between MappingParameter
and ModelParameter.(4) In Section 8.2.1 (ObjectExp), within the "Notation" subtitle,
{ ... } // x is created within the 'srcmodel
replace:
"""When provided the model parameter is notated within brackets
after the object keyword.
object[srcmodel] x:X
"""
by:
"""When an explicit extent is provided, the model parameter variable name
postfixes the type of the object expression using the "@" separator symbol.
object x: X@srcmodel { ... }// 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
postfixes the type of the instantiation expression using the "@" separator symbol.
column := new Column@mymodel(n,t); // mymodel is the extent for the new instance.
"""
(6) In BNF grammar (Section 8.4.6.1), define the <typespec> rule as follows:
<typespec> ::= <type_reference> <extent_location>?
<type_reference> ::= <scoped_identifier> | <complex_type>
<extent_location> ::= '@' <identifier> -
Updated: Fri, 6 Mar 2015 20:54 GMT
QVT — Find better notation for explicit extent indication in op mapping parameter
- Key: QVT-25
- OMG Task Force: MOF QVT FTF