[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2m-dev] FW: Quality Assessment of QVTO Model Transformations
|
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
Dear members of project
modeling.m2m.qvt-oml,
May I ask
you some questions about how to parse qvto files?
My name is Phu Nguyen. I am doing my Master thesis in Software
Engineering & Technology group, at the Eindhoven University of Technology.
My research topic is Quality Assessment of Model Transformations (by means of
metrics, coverage, dependencies…)
Our approach is aimed at assessing the internal quality of model
transformations by extracting metrics from the model transformations directly.
Actually, many metrics have been defined for measuring the quality of model
transformations (created with ASF+SDF and ATL) by our reseach group.
(*)
We are also interested in enabling quality measurement of model
transformations (M2M) created using Operational QVT. But, in order to
enable quality measurement of QVTO model transformations, it is vital to parse
the qvto files to get the Abstract Syntax Trees
I have investigated the source code of org.eclipse.m2m.qvt.oml project.
If I understand correctly, the qvto files to be parsed, can only be referred
to in run-time of QVTO eclipse plugins. Is there another way to use the
QVTOCompiler to parse the qvto files without plugins?
For example, I
would like to parse the file book2pub.qvto, I have
written:
org.eclipse.emf.common.util.URI
transformationURI =
URI.createFileURI("/my.qvto.extractor/book2pub/book2pub.qvto");
UnitProxy
unit = URIUnitResolver.getUnit(transformationURI);
QVTOCompiler
compiler =
CompilerUtils.createCompiler(unit.getResolver());
QvtCompilerOptions options = new
QvtCompilerOptions();
options.setGenerateCompletionData(false);
return new CompiledUnit[] { compiler.compile(unit, options, new
BasicMonitor()) };
But certainly, it does not work because the
UnitProxy object will be NULL. I have tried other ways but not successfully.
Could you please give me some advices about how I can use the QVTOCompilerto
parse the qvto files or any other ways
possible?
Hope to hear from you soon. Thank you very much!
Best regards,
Phu
---(*)
M.F. van Amstel, C.F.J. Lange, M.G.J. van den Brand. Using Metrics for
Assessing the Quality of ASF+SDF Model Transformations. In Theory and Practice
of Model Transformations, Proceedings of the Second International Conference
on Model Transformation (ICMT'09), volume 5563 of Lecture Notes in Computer
Science, pages 239-248, Zürich, Switzerland, June 2009
M.F. van Amstel and M.G.J. van den Brand, Quality Assessment of ATL Model
Transformations using Metrics, Proceedings of the Second International
Workshop on Model Transformation with ATL, Málaga, Spain, June
2010
Click here
to report this email as spam.
This message has been scanned for viruses by MailController.
_______________________________________________
m2m-dev mailing list
m2m-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2m-dev