[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2m-dev] FW: Quality Assessment of QVTO Model Transformations

Hi Phu

Your AST seems to be a mixture:

http://www.eclipse.org/qvt/1.0/ImperativeOCL is 'my' QVT 1.0 model and might be correct.
http://www.eclipse.org/qvt/1.0.0/Operational/Expressions is a variant about which I cannot comment

However

the EntryOperation is empty
the MappingOperation has significant content

are you sure what you want is missing?

If the problem is just a missing containment, it might be a very easy fix.

    Regards

        Ed Willink


On 20/09/2010 11:08, Phu H. Nguyen wrote:
Hello Ed Willink,

Thank you. Now I know that it is not easy to obtain a QVTo AST with full composition. You are right about my problem. The serialized AST I got seems to be the wrong one. Please find the QVTo file and the corresponding xmi file in the attachments

Is there any suggestion about obtaining a QVTo AST with full composition?


Best regards,
Phu

On Mon, Sep 20, 2010 at 10:56 AM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:
Hi Phu

If you have a true QVTo AST then it should compose/share all the information you require.
When you invoke Resource.save to serialize, what is the URI in the XMI?

QVT 1.0 enabled at least three different interpreations of some AST definitions and in some cases all three were wrong with the result that not all child objects were composed and so those elements were omitted from a serialized AST. Perhaps your problem is that you do not have a QVTo AST with full composition.

Please post the XMI file resulting from Resource.save.

    Regards

        Ed Willink


On 20/09/2010 09:32, Phu H. Nguyen wrote:
Hello,

First I would like to thank for suggestions from Ed Willink and Sergey.

I tried several ways and I have found out that it is possible to obtain AST of corresponding QVTo file by using the InternalTransformationExecutor:

InternalTransformationExecutor executor = new InternalTransformationExecutor(transformationURI);
CompiledUnit myCompiled = executor.getUnit();
OperationalTransformation trans = executor.getTransformation();
Resource res = trans.eResource();
EObject qvtoModule = res.getContents().get(0);

Via the OperationalTransformation object, generated AST can be accessed and it certainly conforms to the metamodels QVTOperational.ecore and ImperativeOCL.ecore

For now it is possible to extract some information from the AST, i.e. names of modeltype, transformation, name of mapping operations. However I have not found out the way to access other parts, i.e. bodies of mapping operation. Are there any suggestions?

Last but not least, it would be much better to access the AST if there is a way to serialize it. The ATL tool kit allows obtaining the file of  ATL model (generated AST) quite easily. I was wondering if QVTO tool kit has a similar function?

If you have any suggestions, please let me know. Thank you very much!


Best regards,
Phu


On Mon, Sep 13, 2010 at 11:25 PM, Sergey Boyko <Sergey.Boyko@xxxxxxxxxxx> wrote:
 


From: Sergey Boyko
Sent: Tuesday, September 14, 2010 01:24
To: 'nguyenhongphu@xxxxxxxxx'
Subject: RE: [m2m-dev] Quality Assessment of QVTO Model Transformations

Hi Phu,
 
QVTo engine is able to be launched outside Eclipse.
 
Inside Eclipse you can obtain AST of corresponding .qvto by means of EMF Resource, i.e. some like follows:
  URI uri = URI.createURI("file:/.../my.qvto");
  Resource res = new ResourceSetImpl().createResource(uri);
  EObject qvtoModule = res.getContents().get(0);
 
Generated AST is conformed to org.eclipse.m2m.qvt.oml/model/QVTOperational.ecore (for QVTOperational package) and org.eclipse.m2m.qvt.oml.ecore.imperativeocl/ImperativeOCL.ecore (for ImperativeOCL package). In fact that models have some (very minor) deviations from official OMG QVTO metamodels.
 
 
Regards,
  Sergey
 



_______________________________________________
m2m-dev mailing list
m2m-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2m-dev


_______________________________________________ m2m-dev mailing list m2m-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/m2m-dev
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.851 / Virus Database: 271.1.1/3146 - Release Date: 09/19/10 19:34:00