Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] Fwd: Re: Eclipse QVTo: saving QVTo resource

Hi

For similar tests for the Pivot-based QVTc, QVTi and OCL where both CS2AS and AS2CS are available, I test by:

CS2AS then AS2CS then CS2AS and check that the AS output of the first CS2AS is equivalent to the second CS2AS. This avoids dealing with arbitrary whitespace / ordering inconsistencies when comparing CS text files.

You may find the use of org.eclipse.xtext.util.EmfFormatter by org.eclipse.ocl.examples.xtext.tests.TestUtil.assertSameModel helpful. It gives a text diff that can be viewed directly from the JUnit results. Very good once it is nearly perfect, useful even when buggy.

    Regards

        Ed Willink

On 08/02/2016 10:27, Uwe Ritzmann wrote:
Hi Christopher, hi Ed,

thanks for your responses.

My understanding of the QVTo import syntax and semantics were wrong, so I apologize for asking probably to early.

Yes, QVTo transformations can already be created in qvtox Format, e.g. a qvto transformation that generates
another qvto transformation and is run with a "*.qvtox"-target-URI in the launch config will happily do so.

But qvtox is not very human readable. Even for a use case were a generated QVTo transformation is
intended to only be consumed by the compiler, I assume that the development process for it will
benefit from the human readable qvto-Version.

Saving to qvtox can programmatically be done by ExeXMISerializer.saveUnitXMI().

I attach UnparserTests.java and TestQvtUnparser.java, which are work in progress (!!!), as you asked for it.
ExeXMISerializer is called in TestQvtUnparser.saveCompiledUnitsAsXMI().
General approach of the current testing is:
1. compile and check on errors for test transformations
2. unparse
3. recompile and check on errors for unparsed transformation copies
4. EMFCompare compile and recompile

Currently I am still wading thru 3.

Yes, there are issues in the ASTNodes. I will bug report them as soon as I have collected them all and am at least thru step 3 of the tests.

Sankt Augustin Alaaf,

Uwe


Am 26.01.2016 um 14:38 schrieb Christopher Gerking:

Hi everybody

 

Regardless of the OMG compliance, I wonder how beneficial it really is to save a transformation back to the textual *.qvto syntax.

Instead, why not using *.qvtox as an exchange format once a transformation has been compiled? Some details below:

 

·         Today, the QVTo builder has a hidden argument to store the compiled AST to *.qvtox.

 

·         In my branch http://git.eclipse.org/c/mmt/org.eclipse.qvto.git/log/?h=cgerking/478006, I prepared the TransformationExecutor API for loading a transformation from a given *.qvtox URI.

 

·         What is missing is an intuitive way to compile and save a transformation to *.qvtox. The above builder argument is very unintuitive. Any ideas?

 

Additionally, I’m not sure about the limitations of the serialized AST. I remember some insufficiencies with respect to Java blackboxes.

 

 

Uwe, your launch configuration refers to a class org.eclipse.m2m.tests.qvt.oml.UnparserTests. In order to reproduce the problems, can you share it somehow?

 

 

Kind regards

Christopher

 

Von: qvto-dev-bounces@xxxxxxxxxxx [mailto:qvto-dev-bounces@xxxxxxxxxxx] Im Auftrag von Uwe Ritzmann
Gesendet: Freitag, 22. Ja
nuar 2016 18:39
An: qvto-dev@xxxxxxxxxxx
Betreff: [qvto-dev] Fwd: Re: Eclipse QVTo: saving QVTo resource

 

Dear QVTo team,

unfortunately my budget of available time since my last email
did not allow me to proceed with my work from 2012 until recently.

As QvtOperationalResourceImpl.save() is still unimplemented,
I have continued the work. Thanks a lot for the now available oomph
setup for QVTo, which decreases the necessary up front time
investment tremendously.

For the first set of tests I shamelessly copied/adapted from TestQvtParser
and its associated testdata.

The problem I currently do not understand and would appreciate your advise for
is that the qvto-files that I generate during the test run and then try to compile
are not able to resolve e.g. TestBlackboxLibrary, which should be provided by
org.eclipse.m2m.tests.qvt.oml (via extension org.eclipse.m2m.qvt.oml.ocl.libraries, right?).
The test launch is with "all workspace and enabled target plugins".

My JUnit launch configuration for UnparserTests is attached.

Any hint is appreciated.

Best Regards

Uwe




_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/qvto-dev


Back to the top