[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.gmt.amw] Re: [ATL] UserInteraction in Transformationprocess

Hi,

I was following your interesting discussion, and I have some comments about it..

First, I don't understand what you mean by "it wouldn't validate the input metamodel". Can you explain that?

You would have a weaving model between the input-model and the output-metamodel. The weaving model would be created before the execution of the transformation. I will explain my point of view with a simple illustration.

The SQL2003 input-model could be woven with the OracleSQL output-metamodel. For instance, you would create a link between one particular "SQLType", "A", with an "OrclTypeB" in the output metamodel. This link can be created manually, reflecting the user decision with the correct output type:

A <-UserDecisionLink-> OrclTypeB
B <-UserDecisionLink-> OrclTypeA

etc.

Then, the transformation could be something like:

rule SQL2003Type2OracleTypeB {
from
    w : AMW!UserDecisionLink
   (w.output.getReferredElement() = OrclTypeB)
to
   out : OracleSQL!OrclTypeB
}

rule SQL2003Type2OracleTypeA {
from
    w : AMW!UserDecisionLink
   (w.output.getReferredElement() = OrclTypeA)
to
   out : OracleSQL!OrclTypeA
}

You can also write a different rule, matching directly the SQLType, but with some helper to get the corresponding user decision link.

rule SQL2003Type2OracleTypeA {
from
    s : SQL2003!SQLType ( s.getDecisionLink() = OrclTypeA)
to
   out : OracleSQL!OrclTypeA
}


Regards,

Marcos.

Martin Baus wrote:
Hi,

maybe because I am new to 'Model Driven Development' I have problems understanding your answer:
However, if you weave your decisions to the source model (instead of metamodel), then you should be able to achieve one decision per occurence.

What do you mean with weaving the UserDecisions to the source model and not the metamodel?


 From my point of understanding I have the following situation:

1 Input-Metamodel describing the SQL2003 Standard
1 Input-Model (an Instance of the SQL2003Metamodel)

1 Weaving Model for mapping Input to Output

1 Output-Metamodel describing OracleSQL
1 Output-Model (the result of the transformation of the Input-Model)

If I would weave the UserDecisions to the source model (=Input-Model?) now, then I think it wouldn't validate to the Input-Meta-Model, which should be a clean Metamodel for the SQL2003 Standard.

Thanks for your answer.

Martin Baus