Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Bug or feature: Order of 'out' model parameters affects transformation results(References between output models fail if corresponding 'out' models are not declared in a specific order)
[QVTO] Bug or feature: Order of 'out' model parameters affects transformation results [message #675701] Wed, 01 June 2011 08:46
Toni Ruokolainen is currently offline Toni RuokolainenFriend
Messages: 1
Registered: June 2011
Junior Member
Hi all,

This is my first post to the forum. I'm developing a quite complex model transformation which creates multiple (four) output models from a single input model.

Here is the signature and the main -section of the operational transformation
(the transformation itself is so huge that I won't post it here):

transformation UML2EcosystemModel(in input : UML, in ecoprof : UML, in ecoMM : INT,
out int : INT, out ecosystem : ECO, out domont : DO, out ecore : ECORE);

main() {
log('Beginning transformation');
input.objectsOfType(UML::Package)->map mapPackage2IntensionModel();
input.objectsOfType(UML::Package)->map mapPackage2EcosystemModel();
input.objectsOfType(UML::Package)->map mapPackage2DomainOntology();
input.objectsOfType(UML::Package)->map mapPackage2IntensionMetaModel();
log('Transformation done');
}

The transformation creates four output models (int, ecosystem, domont and ecore)from a single UML model (input). The ecoprof and ecoMM models are used for facilitating certain operations in the transformation and they are static in nature.

The resulting 'domont' model references both 'int' and 'ecosystem' models.
I struggled for a few days with the transformation and tried all kinds of tricks, due to the fact that inter-model references between the output models didn't work. I used assert -clauses in the transformation to make sure that the references were actually resolved correctly during the transformation (they were). However, when I looked at the resulting models, the references were not stored in the models, except only between 'domont' and 'ecosystem' models. That is, while the references were resolved correctly also between 'domont' and 'int' models, they were not included in the resulting models.

Today I realized, that actually what was wrong in this transformation, was that the order of the model parameters in the transformation signature is significant and has semantic meaning. Element references between output models do not work, if the target model for the refences is later in the sequence of model parameter declarations. I.e. in my case, the correct order for model parameter declarations, is (as in the above transformation signature):

out int : INT, out ecosystem : ECO, out domont : DO
out ecosystem : ECO, out int : INT, out domont : DO

If the order is, as it was originally in my transformation, like this:
out ecosystem : ECO, out domont :DO, out int : INT

the resulting 'domont' model will only contain references to the 'ecosystem' model; the references to 'int' model are resolved correctly in the transformation, but are not 'stored' in the corresponding outputs.

Now I'm wondering whether this is a bug or a feature in QVT standard or QVTo implementation. I checked the QVT -standard (version 08-04-03). While modelParameter reference from the OperationalTransformation element of the QVT metamodel is ordered, I couldn't find any declaration for the fact that the ordering does have an effect on the transformation results. Does anyone have any clue what is the situation with this, and possibly a reference to a document which states this fact (or a bug report, possibly)?

Sorry for the long post!

Best regards,
-Toni Ruokolainen
Previous Topic:[QVTo] Multiple output
Next Topic:KAOS metamodel
Goto Forum:
  


Current Time: Fri Nov 28 03:11:31 GMT 2014

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

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