[QVTO] In-place transformation [message #529464] |
Sun, 25 April 2010 21:17 |
ari 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 |
Eclipse User |
|
|
|
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 #529580 is a reply to message #529566] |
Mon, 26 April 2010 13:15 |
Eclipse User |
|
|
|
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"
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03171 seconds