Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] In-place transformation
[QVTO] In-place transformation [message #529464] Sun, 25 April 2010 21:17 Go to next message
ari is currently offline ariFriend
Messages: 2
Registered: April 2010
Junior Member
Hello,

the QVT documentation says something about accessing a transformation 'in-place'.

I tried this way, but it doesn't work.
transformation A()
access transformation B();
.
.
new B()->transform();
.
transformation B();

Is there any possibility to do this?

Thank you

[Updated on: Sun, 25 April 2010 21:24]

Report message to a moderator

Re: [QVTo] in-place transformation [message #529487 is a reply to message #529464] Mon, 26 April 2010 06:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl

Hello ari,

you can take a look at sections 8.1.3 (Libraries), 8.1.11 (Composing
Transformations) and 8.1.18 (Advanced Features: dynamic definition and
parallelism) of the QVT 1.0 specification
(http://www.omg.org/spec/QVT/1.0/PDF/) for some information about
'access'. From what I know about it, you can use it to access another
transformation, which you manually instantiate, and then execute. It
doesn't have anything to do with in-place transformations.

Section 7.7 (In-place Transformations) may be of interest to you, but
it's only a few lines.

Section 8.1.11 mentions an 'in-place "cleaning facility" on the UML
model', and this code:

transformation CompleteUml2Rdbms(in uml:UML,out rdbms:RDBMS)
access transformation UmlCleaning(inout UML),
extends transformation Uml2Rdbms(in UML,out RDBMS);

I think that the trick is to use 'inout' for the input/output model,
making the same model both input and output, which corresponds to what
is stated in section 7.7:

"A transformation may be considered in-place when its source and target
candidate models are both bound to the same
model at runtime."

I've never tried in-place transformations, but I hope this information
helps.

Dennis

PS: It's good that you prefixed the topic of your post with [QVTo], but
you forgot to provide an actual topic...


ari wrote:
> Hello,
>
> the QVT documentation says something about accessing a transformation
> 'in-place'.
>
> I tried this way, but it doesn't work.
>
> transformation A()
> access transformation B();
Re: [QVTO] In-place transformation [message #529566 is a reply to message #529464] Mon, 26 April 2010 12:34 Go to previous messageGo to next message
ari is currently offline ariFriend
Messages: 2
Registered: April 2010
Junior Member
Hello Dennis,

thanks for your response.

I've already read all of your mentioned sections.

If I have just one transformation 'A' in my file, all is fine.

If I add a second transformation 'B' with an access statement to it from transformation 'A', I get an error at the beginning of the file: -> "Module 'A' should define transformation".

Furthermore I get the console output :

"Multiple modules are unsupported yet!unexpected input discarded"

Re: [QVTO] In-place transformation [message #529580 is a reply to message #529566] Mon, 26 April 2010 13:15 Go to previous message
Eclipse UserFriend
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl

Maybe put the two different transformations in different files, and
import the file with transformation A in the file with transformation B?

Dennis


ari wrote:
> Hello Dennis,
>
> thanks for your response.
>
> I've already read all of your mentioned sections.
>
> If I have just one transformation 'A' in my file, all is fine.
>
> If I add a second transformation 'B' with an access statement to it from
> transformation 'A', I get an error at the beginning of the file: ->
> "Module 'A' should define transformation".
>
> Furthermore I get the console output :
>
> "Multiple modules are unsupported yet!unexpected input discarded"
>
>
Previous Topic:[ATL] instanceClassName
Next Topic:[ATL] ATL query and for Statement
Goto Forum:
  


Current Time: Wed Apr 24 22:03:54 GMT 2024

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

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

Back to the top