Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Executing transformation on dynamic input model
[QVTo] Executing transformation on dynamic input model [message #555225] Wed, 25 August 2010 22:39 Go to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Hi Everyone,

I am attempting to define and execute a qvt transformation on a dynamic
instance (right click on ecore model element and select "Create Dynamic
Instance...") of a model. The QVT editor finds the correct ecore file in
the workspace (via QVT meta-model mapping project setting) and I am able
to write the transformation using this model. When I launch the
transformation (via the QVT Interpreter Launch configuration) the type
of the model passed in is:

org.eclipse.emf.ecore.impl.DynamicEObjectImpl@3d09b1bc (eClass:
org.eclipse.emf.ecore.impl.EClassImpl@384d5e5 (name: Family)
(instanceClassName: null) (abstract: false, interface: false))

When I install the model plug-ins and use a non dynamic instance of the
model the type is:

com.mdesystems.models.family.impl.FamilyImpl@5fc0866c (name: Simpson).

The types of the input models in both cases make sense to me; A dynamic
instance on a dynamic model, and a domain model on non-dynamic input.
Unforunately, on the dynamic case, I am unable to successfully execute
the transformation targeting the domain model with a dynamic input model
since the type is DynamicObject instead of the desired underlying domain
model type. Is there a way to configure QVT to treat dynamic instances
as underlying domain model types?

In other words, the following transformation will not execute
printRepresenation() on dynamic input models since the objects are
DynamicInstances that represent Family model types and do not match the
ocl type expression Family::Family.

main() {
f.rootObjects()[Family::Family]->printRepresentation();
}

I am using QVT 3.0.0.

Regards,
Angel Roman

MDE Systems, Inc.
Re: [QVTo] Executing transformation on dynamic input model [message #555615 is a reply to message #555225] Fri, 27 August 2010 11:13 Go to previous messageGo to next message
Richard Gronback is currently offline Richard Gronback
Messages: 23
Registered: July 2009
Junior Member
Hi Angel,

I think it has to do with there being no definition available for the
printRepresentation() method in the case of using a dynamic instance.
If you are using OCL to express the body (using the proper annotation),
it will work fine using both the dynamic instance and the generated
code. If you're relying on code within the method generated by EMF,
clearly there's no way the dynamic instance invocation can find it.

Hope this helps,
Rich
Re: [QVTo] Executing transformation on dynamic input model [message #555620 is a reply to message #555615] Fri, 27 August 2010 11:55 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Angel, Roman

Angel: As Rich points out, without the definition of
printRepresentation() to look at it, we cannot tell how you have
implemented it and whether it could work.

Rich: I have found a variety of limitations with the new generation of
modeling tools that seem to limit full flexibility. It seems that QVTo
needs compiled models, Acceleo mandates a workspace project, Xtext has
multi-package issues ... Most have difficulties treating
platform:/plugin/..., platform:/resource/... and ../../... as synonyms.
I have reported some and will report more once I have MDT/OCL doing
dynamic Ecore and UML uniformly.

Regards

Ed Willink

On 27/08/2010 12:13, Richard Gronback wrote:
> Hi Angel,
>
> I think it has to do with there being no definition available for the
> printRepresentation() method in the case of using a dynamic instance. If
> you are using OCL to express the body (using the proper annotation), it
> will work fine using both the dynamic instance and the generated code.
> If you're relying on code within the method generated by EMF, clearly
> there's no way the dynamic instance invocation can find it.
>
> Hope this helps,
> Rich
Re: [QVTo] Executing transformation on dynamic input model [message #555728 is a reply to message #555620] Fri, 27 August 2010 22:22 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Rich and Ed,

Thank you for your assistance. Please excuse the incomplete
transformation source. I've added the full source below.

modeltype Family uses family('http://www.mdesystems.com/family/1.0');

transformation FamilyXForm(in f : Family);

main() {
f.rootObjects()->printRepresentation();
}

helper Element::printRepresentation() : OclVoid
{
log(self.repr());
}

Going through the newsgroups I realized that forEach is supported so
I've modified my test transformation script to the following:

modeltype Family uses family('http://www.mdesystems.com/family/1.0');

transformation FamilyXForm(in f : Family);

main() {
f.rootObjects()->forEach(ro)
{
if (ro.oclIsKindOf(Family::Family)) then
{
log("It's a family");
log(ro.repr());
} else
{
log("Not a family");
log(ro.repr())

} endif;
};
}

On the dynamic input model case I get "Not a family", and on the
non-dynamic case I get "It's a family".

By reading the newsgroups and the wiki, it seems that dynamic models as
inputs are supported. However, the information seems tied to a
programmatic execution of the transformation via TransformationRunner
and not the QVT Interpreter Launch Configuration. I will attempt to
write a test case to programmatically execute the transformation via
TransformationRunner and see where the launch configuration and my test
differ if successful.

Regards,
Angel

On 8/27/10 7:55 AM, Ed Willink wrote:
> Hi Angel, Roman
>
> Angel: As Rich points out, without the definition of
> printRepresentation() to look at it, we cannot tell how you have
> implemented it and whether it could work.
>
> Rich: I have found a variety of limitations with the new generation of
> modeling tools that seem to limit full flexibility. It seems that QVTo
> needs compiled models, Acceleo mandates a workspace project, Xtext has
> multi-package issues ... Most have difficulties treating
> platform:/plugin/..., platform:/resource/... and ../../... as synonyms.
> I have reported some and will report more once I have MDT/OCL doing
> dynamic Ecore and UML uniformly.
>
> Regards
>
> Ed Willink
>
> On 27/08/2010 12:13, Richard Gronback wrote:
>> Hi Angel,
>>
>> I think it has to do with there being no definition available for the
>> printRepresentation() method in the case of using a dynamic instance. If
>> you are using OCL to express the body (using the proper annotation), it
>> will work fine using both the dynamic instance and the generated code.
>> If you're relying on code within the method generated by EMF, clearly
>> there's no way the dynamic instance invocation can find it.
>>
>> Hope this helps,
>> Rich
>
Re: [QVTo] Executing transformation on dynamic input model [message #555745 is a reply to message #555728] Sat, 28 August 2010 06:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Angel

At first glance, I thought that my critique of other modeling projects
was going to come back to bite me; it looks like an MDT/OCL problem, but
actually I think it's a philsophical meta-modeling problem.

I'm pretty sure that by the time MDT/OCL comes to evaluate
oclIsKindOf(Family::Family) the tools have loaded the Family meta-model
more than once, so OCL is asked to test whether a meta-model-A family
is a kind of meta-model-B family and the answer is no; the same as Java
returning false for == on same text strings.

You need to make very sure that the exact spelling of your meta-model
paths is the same. If one is platform:/resource/family and another
.../../family the dynamic loading may fail to reuse the first load for
the second.

I have hit similar problems many times; it's very time consuming. We
must find a solution. At the pedantic level of doing what it's told, EMF
has behaved correctly. However the user friendliness is non-existent.

Perhaps EMF could throw an exception if a ResourceSet ever contains two
EPackages with the same nsURI; but there's probably a backward
compatibility issue.

I think MDT/OCL could provide the solution. I've raised
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.

Regards

Ed Willink

On 27/08/2010 23:22, Angel Roman wrote:
> Rich and Ed,
>
> Thank you for your assistance. Please excuse the incomplete
> transformation source. I've added the full source below.
>
> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>
> transformation FamilyXForm(in f : Family);
>
> main() {
> f.rootObjects()->printRepresentation();
> }
>
> helper Element::printRepresentation() : OclVoid
> {
> log(self.repr());
> }
>
> Going through the newsgroups I realized that forEach is supported so
> I've modified my test transformation script to the following:
>
> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>
> transformation FamilyXForm(in f : Family);
>
> main() {
> f.rootObjects()->forEach(ro)
> {
> if (ro.oclIsKindOf(Family::Family)) then
> {
> log("It's a family");
> log(ro.repr());
> } else
> {
> log("Not a family");
> log(ro.repr())
>
> } endif;
> };
> }
>
> On the dynamic input model case I get "Not a family", and on the
> non-dynamic case I get "It's a family".
>
> By reading the newsgroups and the wiki, it seems that dynamic models as
> inputs are supported. However, the information seems tied to a
> programmatic execution of the transformation via TransformationRunner
> and not the QVT Interpreter Launch Configuration. I will attempt to
> write a test case to programmatically execute the transformation via
> TransformationRunner and see where the launch configuration and my test
> differ if successful.
>
> Regards,
> Angel
>
> On 8/27/10 7:55 AM, Ed Willink wrote:
>> Hi Angel, Roman
>>
>> Angel: As Rich points out, without the definition of
>> printRepresentation() to look at it, we cannot tell how you have
>> implemented it and whether it could work.
>>
>> Rich: I have found a variety of limitations with the new generation of
>> modeling tools that seem to limit full flexibility. It seems that QVTo
>> needs compiled models, Acceleo mandates a workspace project, Xtext has
>> multi-package issues ... Most have difficulties treating
>> platform:/plugin/..., platform:/resource/... and ../../... as synonyms.
>> I have reported some and will report more once I have MDT/OCL doing
>> dynamic Ecore and UML uniformly.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 27/08/2010 12:13, Richard Gronback wrote:
>>> Hi Angel,
>>>
>>> I think it has to do with there being no definition available for the
>>> printRepresentation() method in the case of using a dynamic instance. If
>>> you are using OCL to express the body (using the proper annotation), it
>>> will work fine using both the dynamic instance and the generated code.
>>> If you're relying on code within the method generated by EMF, clearly
>>> there's no way the dynamic instance invocation can find it.
>>>
>>> Hope this helps,
>>> Rich
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555791 is a reply to message #555745] Sat, 28 August 2010 20:02 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Ed,

Thanks for the detailed explanation. I've simplified the transformation
and cleaned up the workspace to prevent (as far as I know) multiple
registrations.

My workspace has two projects (keep in mind family model is not
installed as a plug-in either). The first is a generic project called
Family containing Family.ecore and Family.xmi. I also modified the
schemaLocation of the dynamic instance of the family model to:

xsi:schemaLocation="http://family/1.0
platform:/resource/Family/Family.ecore"/>

The second project is FamilyXForm (a QVT Transformation project). There
is a URI mapping entry that matches the one in the schema location of
the dynamic input model resource.

The transformation in the FamilyXForm is:

modeltype Family uses family('http://family/1.0');

transformation FamilyXForm(in family : Family);

main() {
family.rootObjects()[Family::Family]->forEach(ro)
{
log(ro.repr());
}
}

When I run the transformation via the launch configuration I don't see
the log message. That's when I decided to dive in. If I remove the
select/collect short hand expression ([Family::Family]) I get the the
log message stating that it is a DynamicEObject. Which makes me assume
that OCL select is not matching a DynamicEObject with whatever
Family::Family resolves to (hopefully my meta-model Family eClass or
equivalent).

Do you still think there's a multiple registration of packages problem
in this scenario?

-Angel


On 8/28/10 2:08 AM, Ed Willink wrote:
> Hi Angel
>
> At first glance, I thought that my critique of other modeling projects
> was going to come back to bite me; it looks like an MDT/OCL problem, but
> actually I think it's a philsophical meta-modeling problem.
>
> I'm pretty sure that by the time MDT/OCL comes to evaluate
> oclIsKindOf(Family::Family) the tools have loaded the Family meta-model
> more than once, so OCL is asked to test whether a meta-model-A family
> is a kind of meta-model-B family and the answer is no; the same as Java
> returning false for == on same text strings.
>
> You need to make very sure that the exact spelling of your meta-model
> paths is the same. If one is platform:/resource/family and another
> ../../family the dynamic loading may fail to reuse the first load for
> the second.
>
> I have hit similar problems many times; it's very time consuming. We
> must find a solution. At the pedantic level of doing what it's told, EMF
> has behaved correctly. However the user friendliness is non-existent.
>
> Perhaps EMF could throw an exception if a ResourceSet ever contains two
> EPackages with the same nsURI; but there's probably a backward
> compatibility issue.
>
> I think MDT/OCL could provide the solution. I've raised
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.
>
> Regards
>
> Ed Willink
>
> On 27/08/2010 23:22, Angel Roman wrote:
>> Rich and Ed,
>>
>> Thank you for your assistance. Please excuse the incomplete
>> transformation source. I've added the full source below.
>>
>> ç
>> Going through the newsgroups I realized that forEach is supported so
>> I've modified my test transformation script to the following:
>>
>> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>>
>> transformation FamilyXForm(in f : Family);
>>
>> main() {
>> f.rootObjects()->forEach(ro)
>> {
>> if (ro.oclIsKindOf(Family::Family)) then
>> {
>> log("It's a family");
>> log(ro.repr());
>> } else
>> {
>> log("Not a family");
>> log(ro.repr())
>>
>> } endif;
>> };
>> }
>>
>> On the dynamic input model case I get "Not a family", and on the
>> non-dynamic case I get "It's a family".
>>
>> By reading the newsgroups and the wiki, it seems that dynamic models as
>> inputs are supported. However, the information seems tied to a
>> programmatic execution of the transformation via TransformationRunner
>> and not the QVT Interpreter Launch Configuration. I will attempt to
>> write a test case to programmatically execute the transformation via
>> TransformationRunner and see where the launch configuration and my test
>> differ if successful.
>>
>> Regards,
>> Angel
>>
>> On 8/27/10 7:55 AM, Ed Willink wrote:
>>> Hi Angel, Roman
>>>
>>> Angel: As Rich points out, without the definition of
>>> printRepresentation() to look at it, we cannot tell how you have
>>> implemented it and whether it could work.
>>>
>>> Rich: I have found a variety of limitations with the new generation of
>>> modeling tools that seem to limit full flexibility. It seems that QVTo
>>> needs compiled models, Acceleo mandates a workspace project, Xtext has
>>> multi-package issues ... Most have difficulties treating
>>> platform:/plugin/..., platform:/resource/... and ../../... as synonyms.
>>> I have reported some and will report more once I have MDT/OCL doing
>>> dynamic Ecore and UML uniformly.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 27/08/2010 12:13, Richard Gronback wrote:
>>>> Hi Angel,
>>>>
>>>> I think it has to do with there being no definition available for the
>>>> printRepresentation() method in the case of using a dynamic
>>>> instance. If
>>>> you are using OCL to express the body (using the proper annotation), it
>>>> will work fine using both the dynamic instance and the generated code.
>>>> If you're relying on code within the method generated by EMF, clearly
>>>> there's no way the dynamic instance invocation can find it.
>>>>
>>>> Hope this helps,
>>>> Rich
>>>
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555795 is a reply to message #555791] Sat, 28 August 2010 20:50 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Roman

The 'oclIsKindOf' has two inputs

a) your data - probably dynamic
b) the QVTo literal

I suspect that the latter is static. QVTo runs as a launched application
so it could use compiled Java from your workspace.

Delete all genmodeled artefacts; e.g FamilyPackage.java,
FamilyPackage.class, do a clean all projects and restart Eclipse to
reduce opportunities for magic caches.

Then see if you can reproduce your problem.

Regards

Ed Willink

On 28/08/2010 21:02, Angel Roman wrote:
> Ed,
>
> Thanks for the detailed explanation. I've simplified the transformation
> and cleaned up the workspace to prevent (as far as I know) multiple
> registrations.
>
> My workspace has two projects (keep in mind family model is not
> installed as a plug-in either). The first is a generic project called
> Family containing Family.ecore and Family.xmi. I also modified the
> schemaLocation of the dynamic instance of the family model to:
>
> xsi:schemaLocation="http://family/1.0
> platform:/resource/Family/Family.ecore"/>
>
> The second project is FamilyXForm (a QVT Transformation project). There
> is a URI mapping entry that matches the one in the schema location of
> the dynamic input model resource.
>
> The transformation in the FamilyXForm is:
>
> modeltype Family uses family('http://family/1.0');
>
> transformation FamilyXForm(in family : Family);
>
> main() {
> family.rootObjects()[Family::Family]->forEach(ro)
> {
> log(ro.repr());
> }
> }
>
> When I run the transformation via the launch configuration I don't see
> the log message. That's when I decided to dive in. If I remove the
> select/collect short hand expression ([Family::Family]) I get the the
> log message stating that it is a DynamicEObject. Which makes me assume
> that OCL select is not matching a DynamicEObject with whatever
> Family::Family resolves to (hopefully my meta-model Family eClass or
> equivalent).
>
> Do you still think there's a multiple registration of packages problem
> in this scenario?
>
> -Angel
>
>
> On 8/28/10 2:08 AM, Ed Willink wrote:
>> Hi Angel
>>
>> At first glance, I thought that my critique of other modeling projects
>> was going to come back to bite me; it looks like an MDT/OCL problem, but
>> actually I think it's a philsophical meta-modeling problem.
>>
>> I'm pretty sure that by the time MDT/OCL comes to evaluate
>> oclIsKindOf(Family::Family) the tools have loaded the Family meta-model
>> more than once, so OCL is asked to test whether a meta-model-A family
>> is a kind of meta-model-B family and the answer is no; the same as Java
>> returning false for == on same text strings.
>>
>> You need to make very sure that the exact spelling of your meta-model
>> paths is the same. If one is platform:/resource/family and another
>> ../../family the dynamic loading may fail to reuse the first load for
>> the second.
>>
>> I have hit similar problems many times; it's very time consuming. We
>> must find a solution. At the pedantic level of doing what it's told, EMF
>> has behaved correctly. However the user friendliness is non-existent.
>>
>> Perhaps EMF could throw an exception if a ResourceSet ever contains two
>> EPackages with the same nsURI; but there's probably a backward
>> compatibility issue.
>>
>> I think MDT/OCL could provide the solution. I've raised
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 27/08/2010 23:22, Angel Roman wrote:
>>> Rich and Ed,
>>>
>>> Thank you for your assistance. Please excuse the incomplete
>>> transformation source. I've added the full source below.
>>>
>>> ç
>>> Going through the newsgroups I realized that forEach is supported so
>>> I've modified my test transformation script to the following:
>>>
>>> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>>>
>>> transformation FamilyXForm(in f : Family);
>>>
>>> main() {
>>> f.rootObjects()->forEach(ro)
>>> {
>>> if (ro.oclIsKindOf(Family::Family)) then
>>> {
>>> log("It's a family");
>>> log(ro.repr());
>>> } else
>>> {
>>> log("Not a family");
>>> log(ro.repr())
>>>
>>> } endif;
>>> };
>>> }
>>>
>>> On the dynamic input model case I get "Not a family", and on the
>>> non-dynamic case I get "It's a family".
>>>
>>> By reading the newsgroups and the wiki, it seems that dynamic models as
>>> inputs are supported. However, the information seems tied to a
>>> programmatic execution of the transformation via TransformationRunner
>>> and not the QVT Interpreter Launch Configuration. I will attempt to
>>> write a test case to programmatically execute the transformation via
>>> TransformationRunner and see where the launch configuration and my test
>>> differ if successful.
>>>
>>> Regards,
>>> Angel
>>>
>>> On 8/27/10 7:55 AM, Ed Willink wrote:
>>>> Hi Angel, Roman
>>>>
>>>> Angel: As Rich points out, without the definition of
>>>> printRepresentation() to look at it, we cannot tell how you have
>>>> implemented it and whether it could work.
>>>>
>>>> Rich: I have found a variety of limitations with the new generation of
>>>> modeling tools that seem to limit full flexibility. It seems that QVTo
>>>> needs compiled models, Acceleo mandates a workspace project, Xtext has
>>>> multi-package issues ... Most have difficulties treating
>>>> platform:/plugin/..., platform:/resource/... and ../../... as synonyms.
>>>> I have reported some and will report more once I have MDT/OCL doing
>>>> dynamic Ecore and UML uniformly.
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>>
>>>> On 27/08/2010 12:13, Richard Gronback wrote:
>>>>> Hi Angel,
>>>>>
>>>>> I think it has to do with there being no definition available for the
>>>>> printRepresentation() method in the case of using a dynamic
>>>>> instance. If
>>>>> you are using OCL to express the body (using the proper
>>>>> annotation), it
>>>>> will work fine using both the dynamic instance and the generated code.
>>>>> If you're relying on code within the method generated by EMF, clearly
>>>>> there's no way the dynamic instance invocation can find it.
>>>>>
>>>>> Hope this helps,
>>>>> Rich
>>>>
>>>
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555796 is a reply to message #555795] Sat, 28 August 2010 21:01 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Hi Ed,

I am using a new workspace, no genmodel in sight, no emf generated code,
no old model plug-ins installed either and the behavior persists.

I am wondering if what I am attempting to do is supported, if it is user
error on my part, or if I've uncovered a bug.

Thanks,
Angel


On 8/28/10 4:50 PM, Ed Willink wrote:
> Hi Roman
>
> The 'oclIsKindOf' has two inputs
>
> a) your data - probably dynamic
> b) the QVTo literal
>
> I suspect that the latter is static. QVTo runs as a launched application
> so it could use compiled Java from your workspace.
>
> Delete all genmodeled artefacts; e.g FamilyPackage.java,
> FamilyPackage.class, do a clean all projects and restart Eclipse to
> reduce opportunities for magic caches.
>
> Then see if you can reproduce your problem.
>
> Regards
>
> Ed Willink
>
> On 28/08/2010 21:02, Angel Roman wrote:
>> Ed,
>>
>> Thanks for the detailed explanation. I've simplified the transformation
>> and cleaned up the workspace to prevent (as far as I know) multiple
>> registrations.
>>
>> My workspace has two projects (keep in mind family model is not
>> installed as a plug-in either). The first is a generic project called
>> Family containing Family.ecore and Family.xmi. I also modified the
>> schemaLocation of the dynamic instance of the family model to:
>>
>> xsi:schemaLocation="http://family/1.0
>> platform:/resource/Family/Family.ecore"/>
>>
>> The second project is FamilyXForm (a QVT Transformation project). There
>> is a URI mapping entry that matches the one in the schema location of
>> the dynamic input model resource.
>>
>> The transformation in the FamilyXForm is:
>>
>> modeltype Family uses family('http://family/1.0');
>>
>> transformation FamilyXForm(in family : Family);
>>
>> main() {
>> family.rootObjects()[Family::Family]->forEach(ro)
>> {
>> log(ro.repr());
>> }
>> }
>>
>> When I run the transformation via the launch configuration I don't see
>> the log message. That's when I decided to dive in. If I remove the
>> select/collect short hand expression ([Family::Family]) I get the the
>> log message stating that it is a DynamicEObject. Which makes me assume
>> that OCL select is not matching a DynamicEObject with whatever
>> Family::Family resolves to (hopefully my meta-model Family eClass or
>> equivalent).
>>
>> Do you still think there's a multiple registration of packages problem
>> in this scenario?
>>
>> -Angel
>>
>>
>> On 8/28/10 2:08 AM, Ed Willink wrote:
>>> Hi Angel
>>>
>>> At first glance, I thought that my critique of other modeling projects
>>> was going to come back to bite me; it looks like an MDT/OCL problem, but
>>> actually I think it's a philsophical meta-modeling problem.
>>>
>>> I'm pretty sure that by the time MDT/OCL comes to evaluate
>>> oclIsKindOf(Family::Family) the tools have loaded the Family meta-model
>>> more than once, so OCL is asked to test whether a meta-model-A family
>>> is a kind of meta-model-B family and the answer is no; the same as Java
>>> returning false for == on same text strings.
>>>
>>> You need to make very sure that the exact spelling of your meta-model
>>> paths is the same. If one is platform:/resource/family and another
>>> ../../family the dynamic loading may fail to reuse the first load for
>>> the second.
>>>
>>> I have hit similar problems many times; it's very time consuming. We
>>> must find a solution. At the pedantic level of doing what it's told, EMF
>>> has behaved correctly. However the user friendliness is non-existent.
>>>
>>> Perhaps EMF could throw an exception if a ResourceSet ever contains two
>>> EPackages with the same nsURI; but there's probably a backward
>>> compatibility issue.
>>>
>>> I think MDT/OCL could provide the solution. I've raised
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 27/08/2010 23:22, Angel Roman wrote:
>>>> Rich and Ed,
>>>>
>>>> Thank you for your assistance. Please excuse the incomplete
>>>> transformation source. I've added the full source below.
>>>>
>>>> ç
>>>> Going through the newsgroups I realized that forEach is supported so
>>>> I've modified my test transformation script to the following:
>>>>
>>>> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>>>>
>>>> transformation FamilyXForm(in f : Family);
>>>>
>>>> main() {
>>>> f.rootObjects()->forEach(ro)
>>>> {
>>>> if (ro.oclIsKindOf(Family::Family)) then
>>>> {
>>>> log("It's a family");
>>>> log(ro.repr());
>>>> } else
>>>> {
>>>> log("Not a family");
>>>> log(ro.repr())
>>>>
>>>> } endif;
>>>> };
>>>> }
>>>>
>>>> On the dynamic input model case I get "Not a family", and on the
>>>> non-dynamic case I get "It's a family".
>>>>
>>>> By reading the newsgroups and the wiki, it seems that dynamic models as
>>>> inputs are supported. However, the information seems tied to a
>>>> programmatic execution of the transformation via TransformationRunner
>>>> and not the QVT Interpreter Launch Configuration. I will attempt to
>>>> write a test case to programmatically execute the transformation via
>>>> TransformationRunner and see where the launch configuration and my test
>>>> differ if successful.
>>>>
>>>> Regards,
>>>> Angel
>>>>
>>>> On 8/27/10 7:55 AM, Ed Willink wrote:
>>>>> Hi Angel, Roman
>>>>>
>>>>> Angel: As Rich points out, without the definition of
>>>>> printRepresentation() to look at it, we cannot tell how you have
>>>>> implemented it and whether it could work.
>>>>>
>>>>> Rich: I have found a variety of limitations with the new generation of
>>>>> modeling tools that seem to limit full flexibility. It seems that QVTo
>>>>> needs compiled models, Acceleo mandates a workspace project, Xtext has
>>>>> multi-package issues ... Most have difficulties treating
>>>>> platform:/plugin/..., platform:/resource/... and ../../... as
>>>>> synonyms.
>>>>> I have reported some and will report more once I have MDT/OCL doing
>>>>> dynamic Ecore and UML uniformly.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ed Willink
>>>>>
>>>>> On 27/08/2010 12:13, Richard Gronback wrote:
>>>>>> Hi Angel,
>>>>>>
>>>>>> I think it has to do with there being no definition available for the
>>>>>> printRepresentation() method in the case of using a dynamic
>>>>>> instance. If
>>>>>> you are using OCL to express the body (using the proper
>>>>>> annotation), it
>>>>>> will work fine using both the dynamic instance and the generated
>>>>>> code.
>>>>>> If you're relying on code within the method generated by EMF, clearly
>>>>>> there's no way the dynamic instance invocation can find it.
>>>>>>
>>>>>> Hope this helps,
>>>>>> Rich
>>>>>
>>>>
>>>
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555817 is a reply to message #555796] Sun, 29 August 2010 05:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Angel

It's beginning to look like an MDT/OCL bug, can you please attach your
projects as attachments to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 or email to me
directly in confidence at ed_at_willink_dot_me_dot_uk.

Regards

Ed Willink

On 28/08/2010 22:01, Angel Roman wrote:
> Hi Ed,
>
> I am using a new workspace, no genmodel in sight, no emf generated code,
> no old model plug-ins installed either and the behavior persists.
>
> I am wondering if what I am attempting to do is supported, if it is user
> error on my part, or if I've uncovered a bug.
>
> Thanks,
> Angel
>
>
> On 8/28/10 4:50 PM, Ed Willink wrote:
>> Hi Roman
>>
>> The 'oclIsKindOf' has two inputs
>>
>> a) your data - probably dynamic
>> b) the QVTo literal
>>
>> I suspect that the latter is static. QVTo runs as a launched application
>> so it could use compiled Java from your workspace.
>>
>> Delete all genmodeled artefacts; e.g FamilyPackage.java,
>> FamilyPackage.class, do a clean all projects and restart Eclipse to
>> reduce opportunities for magic caches.
>>
>> Then see if you can reproduce your problem.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 28/08/2010 21:02, Angel Roman wrote:
>>> Ed,
>>>
>>> Thanks for the detailed explanation. I've simplified the transformation
>>> and cleaned up the workspace to prevent (as far as I know) multiple
>>> registrations.
>>>
>>> My workspace has two projects (keep in mind family model is not
>>> installed as a plug-in either). The first is a generic project called
>>> Family containing Family.ecore and Family.xmi. I also modified the
>>> schemaLocation of the dynamic instance of the family model to:
>>>
>>> xsi:schemaLocation="http://family/1.0
>>> platform:/resource/Family/Family.ecore"/>
>>>
>>> The second project is FamilyXForm (a QVT Transformation project). There
>>> is a URI mapping entry that matches the one in the schema location of
>>> the dynamic input model resource.
>>>
>>> The transformation in the FamilyXForm is:
>>>
>>> modeltype Family uses family('http://family/1.0');
>>>
>>> transformation FamilyXForm(in family : Family);
>>>
>>> main() {
>>> family.rootObjects()[Family::Family]->forEach(ro)
>>> {
>>> log(ro.repr());
>>> }
>>> }
>>>
>>> When I run the transformation via the launch configuration I don't see
>>> the log message. That's when I decided to dive in. If I remove the
>>> select/collect short hand expression ([Family::Family]) I get the the
>>> log message stating that it is a DynamicEObject. Which makes me assume
>>> that OCL select is not matching a DynamicEObject with whatever
>>> Family::Family resolves to (hopefully my meta-model Family eClass or
>>> equivalent).
>>>
>>> Do you still think there's a multiple registration of packages problem
>>> in this scenario?
>>>
>>> -Angel
>>>
>>>
>>> On 8/28/10 2:08 AM, Ed Willink wrote:
>>>> Hi Angel
>>>>
>>>> At first glance, I thought that my critique of other modeling projects
>>>> was going to come back to bite me; it looks like an MDT/OCL problem,
>>>> but
>>>> actually I think it's a philsophical meta-modeling problem.
>>>>
>>>> I'm pretty sure that by the time MDT/OCL comes to evaluate
>>>> oclIsKindOf(Family::Family) the tools have loaded the Family meta-model
>>>> more than once, so OCL is asked to test whether a meta-model-A family
>>>> is a kind of meta-model-B family and the answer is no; the same as Java
>>>> returning false for == on same text strings.
>>>>
>>>> You need to make very sure that the exact spelling of your meta-model
>>>> paths is the same. If one is platform:/resource/family and another
>>>> ../../family the dynamic loading may fail to reuse the first load for
>>>> the second.
>>>>
>>>> I have hit similar problems many times; it's very time consuming. We
>>>> must find a solution. At the pedantic level of doing what it's told,
>>>> EMF
>>>> has behaved correctly. However the user friendliness is non-existent.
>>>>
>>>> Perhaps EMF could throw an exception if a ResourceSet ever contains two
>>>> EPackages with the same nsURI; but there's probably a backward
>>>> compatibility issue.
>>>>
>>>> I think MDT/OCL could provide the solution. I've raised
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>>
>>>> On 27/08/2010 23:22, Angel Roman wrote:
>>>>> Rich and Ed,
>>>>>
>>>>> Thank you for your assistance. Please excuse the incomplete
>>>>> transformation source. I've added the full source below.
>>>>>
>>>>> ç
>>>>> Going through the newsgroups I realized that forEach is supported so
>>>>> I've modified my test transformation script to the following:
>>>>>
>>>>> modeltype Family uses family('http://www.mdesystems.com/family/1.0');
>>>>>
>>>>> transformation FamilyXForm(in f : Family);
>>>>>
>>>>> main() {
>>>>> f.rootObjects()->forEach(ro)
>>>>> {
>>>>> if (ro.oclIsKindOf(Family::Family)) then
>>>>> {
>>>>> log("It's a family");
>>>>> log(ro.repr());
>>>>> } else
>>>>> {
>>>>> log("Not a family");
>>>>> log(ro.repr())
>>>>>
>>>>> } endif;
>>>>> };
>>>>> }
>>>>>
>>>>> On the dynamic input model case I get "Not a family", and on the
>>>>> non-dynamic case I get "It's a family".
>>>>>
>>>>> By reading the newsgroups and the wiki, it seems that dynamic
>>>>> models as
>>>>> inputs are supported. However, the information seems tied to a
>>>>> programmatic execution of the transformation via TransformationRunner
>>>>> and not the QVT Interpreter Launch Configuration. I will attempt to
>>>>> write a test case to programmatically execute the transformation via
>>>>> TransformationRunner and see where the launch configuration and my
>>>>> test
>>>>> differ if successful.
>>>>>
>>>>> Regards,
>>>>> Angel
>>>>>
>>>>> On 8/27/10 7:55 AM, Ed Willink wrote:
>>>>>> Hi Angel, Roman
>>>>>>
>>>>>> Angel: As Rich points out, without the definition of
>>>>>> printRepresentation() to look at it, we cannot tell how you have
>>>>>> implemented it and whether it could work.
>>>>>>
>>>>>> Rich: I have found a variety of limitations with the new
>>>>>> generation of
>>>>>> modeling tools that seem to limit full flexibility. It seems that
>>>>>> QVTo
>>>>>> needs compiled models, Acceleo mandates a workspace project, Xtext
>>>>>> has
>>>>>> multi-package issues ... Most have difficulties treating
>>>>>> platform:/plugin/..., platform:/resource/... and ../../... as
>>>>>> synonyms.
>>>>>> I have reported some and will report more once I have MDT/OCL doing
>>>>>> dynamic Ecore and UML uniformly.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ed Willink
>>>>>>
>>>>>> On 27/08/2010 12:13, Richard Gronback wrote:
>>>>>>> Hi Angel,
>>>>>>>
>>>>>>> I think it has to do with there being no definition available for
>>>>>>> the
>>>>>>> printRepresentation() method in the case of using a dynamic
>>>>>>> instance. If
>>>>>>> you are using OCL to express the body (using the proper
>>>>>>> annotation), it
>>>>>>> will work fine using both the dynamic instance and the generated
>>>>>>> code.
>>>>>>> If you're relying on code within the method generated by EMF,
>>>>>>> clearly
>>>>>>> there's no way the dynamic instance invocation can find it.
>>>>>>>
>>>>>>> Hope this helps,
>>>>>>> Rich
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555843 is a reply to message #555817] Sun, 29 August 2010 13:46 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.
--------------050205060003090504080504
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Ed,

Sure thing. See attached.

Thank you,
Angel

On 8/29/10 1:21 AM, Ed Willink wrote:
> Hi Angel
>
> It's beginning to look like an MDT/OCL bug, can you please attach your
> projects as attachments to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 or email to me
> directly in confidence at ed_at_willink_dot_me_dot_uk.
>
> Regards
>
> Ed Willink
>
> On 28/08/2010 22:01, Angel Roman wrote:
>> Hi Ed,
>>
>> I am using a new workspace, no genmodel in sight, no emf generated code,
>> no old model plug-ins installed either and the behavior persists.
>>
>> I am wondering if what I am attempting to do is supported, if it is user
>> error on my part, or if I've uncovered a bug.
>>
>> Thanks,
>> Angel
>>
>>
>> On 8/28/10 4:50 PM, Ed Willink wrote:
>>> Hi Roman
>>>
>>> The 'oclIsKindOf' has two inputs
>>>
>>> a) your data - probably dynamic
>>> b) the QVTo literal
>>>
>>> I suspect that the latter is static. QVTo runs as a launched application
>>> so it could use compiled Java from your workspace.
>>>
>>> Delete all genmodeled artefacts; e.g FamilyPackage.java,
>>> FamilyPackage.class, do a clean all projects and restart Eclipse to
>>> reduce opportunities for magic caches.
>>>
>>> Then see if you can reproduce your problem.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 28/08/2010 21:02, Angel Roman wrote:
>>>> Ed,
>>>>
>>>> Thanks for the detailed explanation. I've simplified the transformation
>>>> and cleaned up the workspace to prevent (as far as I know) multiple
>>>> registrations.
>>>>
>>>> My workspace has two projects (keep in mind family model is not
>>>> installed as a plug-in either). The first is a generic project called
>>>> Family containing Family.ecore and Family.xmi. I also modified the
>>>> schemaLocation of the dynamic instance of the family model to:
>>>>
>>>> xsi:schemaLocation="http://family/1.0
>>>> platform:/resource/Family/Family.ecore"/>
>>>>
>>>> The second project is FamilyXForm (a QVT Transformation project). There
>>>> is a URI mapping entry that matches the one in the schema location of
>>>> the dynamic input model resource.
>>>>
>>>> The transformation in the FamilyXForm is:
>>>>
>>>> modeltype Family uses family('http://family/1.0');
>>>>
>>>> transformation FamilyXForm(in family : Family);
>>>>
>>>> main() {
>>>> family.rootObjects()[Family::Family]->forEach(ro)
>>>> {
>>>> log(ro.repr());
>>>> }
>>>> }
>>>>
>>>> When I run the transformation via the launch configuration I don't see
>>>> the log message. That's when I decided to dive in. If I remove the
>>>> select/collect short hand expression ([Family::Family]) I get the the
>>>> log message stating that it is a DynamicEObject. Which makes me assume
>>>> that OCL select is not matching a DynamicEObject with whatever
>>>> Family::Family resolves to (hopefully my meta-model Family eClass or
>>>> equivalent).
>>>>
>>>> Do you still think there's a multiple registration of packages problem
>>>> in this scenario?
>>>>
>>>> -Angel
>>>>
>>>>
>>>> On 8/28/10 2:08 AM, Ed Willink wrote:
>>>>> Hi Angel
>>>>>
>>>>> At first glance, I thought that my critique of other modeling projects
>>>>> was going to come back to bite me; it looks like an MDT/OCL problem,
>>>>> but
>>>>> actually I think it's a philsophical meta-modeling problem.
>>>>>
>>>>> I'm pretty sure that by the time MDT/OCL comes to evaluate
>>>>> oclIsKindOf(Family::Family) the tools have loaded the Family
>>>>> meta-model
>>>>> more than once, so OCL is asked to test whether a meta-model-A family
>>>>> is a kind of meta-model-B family and the answer is no; the same as
>>>>> Java
>>>>> returning false for == on same text strings.
>>>>>
>>>>> You need to make very sure that the exact spelling of your meta-model
>>>>> paths is the same. If one is platform:/resource/family and another
>>>>> ../../family the dynamic loading may fail to reuse the first load for
>>>>> the second.
>>>>>
>>>>> I have hit similar problems many times; it's very time consuming. We
>>>>> must find a solution. At the pedantic level of doing what it's told,
>>>>> EMF
>>>>> has behaved correctly. However the user friendliness is non-existent.
>>>>>
>>>>> Perhaps EMF could throw an exception if a ResourceSet ever contains
>>>>> two
>>>>> EPackages with the same nsURI; but there's probably a backward
>>>>> compatibility issue.
>>>>>
>>>>> I think MDT/OCL could provide the solution. I've raised
>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress this.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ed Willink
>>>>>
>>>>> On 27/08/2010 23:22, Angel Roman wrote:
>>>>>> Rich and Ed,
>>>>>>
>>>>>> Thank you for your assistance. Please excuse the incomplete
>>>>>> transformation source. I've added the full source below.
>>>>>>
>>>>>>
Re: [QVTo] Executing transformation on dynamic input model [message #555846 is a reply to message #555843] Sun, 29 August 2010 14:08 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Just added them to the bug as well.

On 8/29/10 9:46 AM, Angel Roman wrote:
> Hi Ed,
>
> Sure thing. See attached.
>
> Thank you,
> Angel
>
> On 8/29/10 1:21 AM, Ed Willink wrote:
>> Hi Angel
>>
>> It's beginning to look like an MDT/OCL bug, can you please attach your
>> projects as attachments to
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 or email to me
>> directly in confidence at ed_at_willink_dot_me_dot_uk.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 28/08/2010 22:01, Angel Roman wrote:
>>> Hi Ed,
>>>
>>> I am using a new workspace, no genmodel in sight, no emf generated code,
>>> no old model plug-ins installed either and the behavior persists.
>>>
>>> I am wondering if what I am attempting to do is supported, if it is user
>>> error on my part, or if I've uncovered a bug.
>>>
>>> Thanks,
>>> Angel
>>>
>>>
>>> On 8/28/10 4:50 PM, Ed Willink wrote:
>>>> Hi Roman
>>>>
>>>> The 'oclIsKindOf' has two inputs
>>>>
>>>> a) your data - probably dynamic
>>>> b) the QVTo literal
>>>>
>>>> I suspect that the latter is static. QVTo runs as a launched
>>>> application
>>>> so it could use compiled Java from your workspace.
>>>>
>>>> Delete all genmodeled artefacts; e.g FamilyPackage.java,
>>>> FamilyPackage.class, do a clean all projects and restart Eclipse to
>>>> reduce opportunities for magic caches.
>>>>
>>>> Then see if you can reproduce your problem.
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>>
>>>> On 28/08/2010 21:02, Angel Roman wrote:
>>>>> Ed,
>>>>>
>>>>> Thanks for the detailed explanation. I've simplified the
>>>>> transformation
>>>>> and cleaned up the workspace to prevent (as far as I know) multiple
>>>>> registrations.
>>>>>
>>>>> My workspace has two projects (keep in mind family model is not
>>>>> installed as a plug-in either). The first is a generic project called
>>>>> Family containing Family.ecore and Family.xmi. I also modified the
>>>>> schemaLocation of the dynamic instance of the family model to:
>>>>>
>>>>> xsi:schemaLocation="http://family/1.0
>>>>> platform:/resource/Family/Family.ecore"/>
>>>>>
>>>>> The second project is FamilyXForm (a QVT Transformation project).
>>>>> There
>>>>> is a URI mapping entry that matches the one in the schema location of
>>>>> the dynamic input model resource.
>>>>>
>>>>> The transformation in the FamilyXForm is:
>>>>>
>>>>> modeltype Family uses family('http://family/1.0');
>>>>>
>>>>> transformation FamilyXForm(in family : Family);
>>>>>
>>>>> main() {
>>>>> family.rootObjects()[Family::Family]->forEach(ro)
>>>>> {
>>>>> log(ro.repr());
>>>>> }
>>>>> }
>>>>>
>>>>> When I run the transformation via the launch configuration I don't see
>>>>> the log message. That's when I decided to dive in. If I remove the
>>>>> select/collect short hand expression ([Family::Family]) I get the the
>>>>> log message stating that it is a DynamicEObject. Which makes me assume
>>>>> that OCL select is not matching a DynamicEObject with whatever
>>>>> Family::Family resolves to (hopefully my meta-model Family eClass or
>>>>> equivalent).
>>>>>
>>>>> Do you still think there's a multiple registration of packages problem
>>>>> in this scenario?
>>>>>
>>>>> -Angel
>>>>>
>>>>>
>>>>> On 8/28/10 2:08 AM, Ed Willink wrote:
>>>>>> Hi Angel
>>>>>>
>>>>>> At first glance, I thought that my critique of other modeling
>>>>>> projects
>>>>>> was going to come back to bite me; it looks like an MDT/OCL problem,
>>>>>> but
>>>>>> actually I think it's a philsophical meta-modeling problem.
>>>>>>
>>>>>> I'm pretty sure that by the time MDT/OCL comes to evaluate
>>>>>> oclIsKindOf(Family::Family) the tools have loaded the Family
>>>>>> meta-model
>>>>>> more than once, so OCL is asked to test whether a meta-model-A family
>>>>>> is a kind of meta-model-B family and the answer is no; the same as
>>>>>> Java
>>>>>> returning false for == on same text strings.
>>>>>>
>>>>>> You need to make very sure that the exact spelling of your meta-model
>>>>>> paths is the same. If one is platform:/resource/family and another
>>>>>> ../../family the dynamic loading may fail to reuse the first load for
>>>>>> the second.
>>>>>>
>>>>>> I have hit similar problems many times; it's very time consuming. We
>>>>>> must find a solution. At the pedantic level of doing what it's told,
>>>>>> EMF
>>>>>> has behaved correctly. However the user friendliness is non-existent.
>>>>>>
>>>>>> Perhaps EMF could throw an exception if a ResourceSet ever contains
>>>>>> two
>>>>>> EPackages with the same nsURI; but there's probably a backward
>>>>>> compatibility issue.
>>>>>>
>>>>>> I think MDT/OCL could provide the solution. I've raised
>>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 to progress
>>>>>> this.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ed Willink
>>>>>>
>>>>>> On 27/08/2010 23:22, Angel Roman wrote:
>>>>>>> Rich and Ed,
>>>>>>>
>>>>>>> Thank you for your assistance. Please excuse the incomplete
>>>>>>> transformation source. I've added the full source below.
>>>>>>>
>>>>>>> ç
>>>>>>> Going through the newsgroups I realized that forEach is supported so
>>>>>>> I've modified my test transformation script to the following:
>>>>>>>
>>>>>>> modeltype Family uses
>>>>>>> family('http://www.mdesystems.com/family/1.0');
>>>>>>>
>>>>>>> transformation FamilyXForm(in f : Family);
>>>>>>>
>>>>>>> main() {
>>>>>>> f.rootObjects()->forEach(ro)
>>>>>>> {
>>>>>>> if (ro.oclIsKindOf(Family::Family)) then
>>>>>>> {
>>>>>>> log("It's a family");
>>>>>>> log(ro.repr());
>>>>>>> } else
>>>>>>> {
>>>>>>> log("Not a family");
>>>>>>> log(ro.repr())
>>>>>>>
>>>>>>> } endif;
>>>>>>> };
>>>>>>> }
>>>>>>>
>>>>>>> On the dynamic input model case I get "Not a family", and on the
>>>>>>> non-dynamic case I get "It's a family".
>>>>>>>
>>>>>>> By reading the newsgroups and the wiki, it seems that dynamic
>>>>>>> models as
>>>>>>> inputs are supported. However, the information seems tied to a
>>>>>>> programmatic execution of the transformation via
>>>>>>> TransformationRunner
>>>>>>> and not the QVT Interpreter Launch Configuration. I will attempt to
>>>>>>> write a test case to programmatically execute the transformation via
>>>>>>> TransformationRunner and see where the launch configuration and my
>>>>>>> test
>>>>>>> differ if successful.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Angel
>>>>>>>
>>>>>>> On 8/27/10 7:55 AM, Ed Willink wrote:
>>>>>>>> Hi Angel, Roman
>>>>>>>>
>>>>>>>> Angel: As Rich points out, without the definition of
>>>>>>>> printRepresentation() to look at it, we cannot tell how you have
>>>>>>>> implemented it and whether it could work.
>>>>>>>>
>>>>>>>> Rich: I have found a variety of limitations with the new
>>>>>>>> generation of
>>>>>>>> modeling tools that seem to limit full flexibility. It seems that
>>>>>>>> QVTo
>>>>>>>> needs compiled models, Acceleo mandates a workspace project, Xtext
>>>>>>>> has
>>>>>>>> multi-package issues ... Most have difficulties treating
>>>>>>>> platform:/plugin/..., platform:/resource/... and ../../... as
>>>>>>>> synonyms.
>>>>>>>> I have reported some and will report more once I have MDT/OCL doing
>>>>>>>> dynamic Ecore and UML uniformly.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Ed Willink
>>>>>>>>
>>>>>>>> On 27/08/2010 12:13, Richard Gronback wrote:
>>>>>>>>> Hi Angel,
>>>>>>>>>
>>>>>>>>> I think it has to do with there being no definition available for
>>>>>>>>> the
>>>>>>>>> printRepresentation() method in the case of using a dynamic
>>>>>>>>> instance. If
>>>>>>>>> you are using OCL to express the body (using the proper
>>>>>>>>> annotation), it
>>>>>>>>> will work fine using both the dynamic instance and the generated
>>>>>>>>> code.
>>>>>>>>> If you're relying on code within the method generated by EMF,
>>>>>>>>> clearly
>>>>>>>>> there's no way the dynamic instance invocation can find it.
>>>>>>>>>
>>>>>>>>> Hope this helps,
>>>>>>>>> Rich
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #555944 is a reply to message #555843] Mon, 30 August 2010 10:43 Go to previous messageGo to next message
Richard Gronback is currently offline Richard Gronback
Messages: 23
Registered: July 2009
Junior Member
FWIW, I imported the projects into a clean workspace and ran the
FamilyXForm.launch configuration and got "It is a Family" in the output.
I'm using an older version of QVTO (v2.0) and OCL (v1.3).

- Rich
Re: [QVTo] Executing transformation on dynamic input model [message #555956 is a reply to message #555944] Mon, 30 August 2010 11:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Rich

My current diagnosis on
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 is that the
submitted projects do not reproduce the reported problem for
Family::Family which was a suspect <ModelType>::<ModelType> which was
indeed not a Family-valued <ModelType>::<EClass>. Awaiting confirmation
from Angel.

Ed

On 30/08/2010 11:43, Richard Gronback wrote:
> FWIW, I imported the projects into a clean workspace and ran the
> FamilyXForm.launch configuration and got "It is a Family" in the output.
> I'm using an older version of QVTO (v2.0) and OCL (v1.3).
>
> - Rich
>
Re: [QVTo] Executing transformation on dynamic input model [message #556129 is a reply to message #555956] Mon, 30 August 2010 22:27 Go to previous messageGo to next message
Angel Roman is currently offline Angel Roman
Messages: 11
Registered: July 2009
Junior Member
Rich & Ed,

Thanks for helping me trouble shoot this issue. I must admit I got
scared when no one else could reproduce it.

I imported my project into a fresh workspace running Galileo, right
clicked on my launch configuration and... it WORKED! This made me
suspect it is a Galileo vs Helios version of the plug-ins. So, I went
back to my Helios install and right clicked on the launch configuration
and... it worked! I know I am not crazy, so I decided to inspect how I
was launching my configuration and went back to helios. It turns out
that in helios I have two options on how to launch the transformation:
Run mode and Debug mode. Via the Run Launch Configuration, it works. Via
the Debug Launch Configuration, it does not. At this point I am more
than happy to stay away from the Debug Configuration and use Run
Configuration; I mean who in their right minds want to debug their qvt
scripts anyway? ;)

Thank you both for your time and assistance.

Regards,
Angel

On 8/30/10 7:05 AM, Ed Willink wrote:
> Hi Rich
>
> My current diagnosis on
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 is that the
> submitted projects do not reproduce the reported problem for
> Family::Family which was a suspect <ModelType>::<ModelType> which was
> indeed not a Family-valued <ModelType>::<EClass>. Awaiting confirmation
> from Angel.
>
> Ed
>
> On 30/08/2010 11:43, Richard Gronback wrote:
>> FWIW, I imported the projects into a clean workspace and ran the
>> FamilyXForm.launch configuration and got "It is a Family" in the output.
>> I'm using an older version of QVTO (v2.0) and OCL (v1.3).
>>
>> - Rich
>>
>
Re: [QVTo] Executing transformation on dynamic input model [message #556148 is a reply to message #556129] Tue, 31 August 2010 05:49 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi Angel

Thanks for providing such a simple repro; it is very reproducible in
Debug mode. I've raised
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324054 for the
inconsistent execution which is caused by anomalous ResourceSet loading
ending up with two reads of Family.ecore in Debug mode.

Some user reports just stink of a bad problem and are well worth
investigating. This was one such.

Regards

Ed Willink

On 30/08/2010 23:27, Angel Roman wrote:
> Rich & Ed,
>
> Thanks for helping me trouble shoot this issue. I must admit I got
> scared when no one else could reproduce it.
>
> I imported my project into a fresh workspace running Galileo, right
> clicked on my launch configuration and... it WORKED! This made me
> suspect it is a Galileo vs Helios version of the plug-ins. So, I went
> back to my Helios install and right clicked on the launch configuration
> and... it worked! I know I am not crazy, so I decided to inspect how I
> was launching my configuration and went back to helios. It turns out
> that in helios I have two options on how to launch the transformation:
> Run mode and Debug mode. Via the Run Launch Configuration, it works. Via
> the Debug Launch Configuration, it does not. At this point I am more
> than happy to stay away from the Debug Configuration and use Run
> Configuration; I mean who in their right minds want to debug their qvt
> scripts anyway? ;)
>
> Thank you both for your time and assistance.
>
> Regards,
> Angel
>
> On 8/30/10 7:05 AM, Ed Willink wrote:
>> Hi Rich
>>
>> My current diagnosis on
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323878 is that the
>> submitted projects do not reproduce the reported problem for
>> Family::Family which was a suspect <ModelType>::<ModelType> which was
>> indeed not a Family-valued <ModelType>::<EClass>. Awaiting confirmation
>> from Angel.
>>
>> Ed
>>
>> On 30/08/2010 11:43, Richard Gronback wrote:
>>> FWIW, I imported the projects into a clean workspace and ran the
>>> FamilyXForm.launch configuration and got "It is a Family" in the output.
>>> I'm using an older version of QVTO (v2.0) and OCL (v1.3).
>>>
>>> - Rich
>>>
>>
Previous Topic:[QVTo] Dictionary Configuration Properties
Next Topic:[ATL] BPMN2BPEL-sample, helper-functions not clear
Goto Forum:
  


Current Time: Fri Oct 24 18:20:46 GMT 2014

Powered by FUDForum. Page generated in 0.02718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software