Home » Archived » M2M (model-to-model transformation) » ATL Rules
ATL Rules [message #87711] |
Thu, 07 August 2008 10:40 |
Swetha Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am writing ATL rules for mapping a metamodelA to metamodelB.I have the
following QVT rules which I want to convert to its corresponding ATL rules.
Can anyone help me how to write ATL rules when the keyword
"when,where,subfunction,opposite" of QVT is involved.
It would be very helpful if any document or links or examples are
available pertaining to the keywords used above.
relation Variant
{
pn:String;
idxx:String;
checkonly domain source
faa:east::fun_architecture::FAAT
{
aFun=af:east:fun_architecture::AF
{
name=pn,idx=idxx
}
};
enforce domain target
s:VM::Vari::Variant
{
ownedVarDe=ov:VM::Vari::Variant
{
name=pn,idx=idxx,
owner=vm:VM:Vari::Variant{}
}
}
};
when
{
FAA(faa,vm);
AnaVariant(af,av);
}
where
{
AnaModel(af,vm);
}
Regards,
Swetha.
|
|
|
Re: [ATL] ATL Rules [message #87887 is a reply to message #87711] |
Fri, 08 August 2008 10:58 |
Alfons Laarman Messages: 71 Registered: July 2009 |
Member |
|
|
Hi,
EMF rules too.
The when clause can be put between braces after the to clause in ATL.
Subfunction you can replace by lazy rules
The where clause would go into the do clause, but ATL cannot undo creating
of model elements yet, so you basicly want to moce this to the when (to)
clause
opposite, i don't know the semantics.
The ATL wiki provides allot of information http://wiki.eclipse.org/ATL,
including the ATL userguide.
Regards,
Alfons
"Swetha" <swetha.tarachandra@continental-corporation.com> schreef in bericht
news:fe5b025407755d3b5c072c4c28d96070$1@www.eclipse.org...
> Hi,
>
> I am writing ATL rules for mapping a metamodelA to metamodelB.I have the
> following QVT rules which I want to convert to its corresponding ATL
> rules.
>
> Can anyone help me how to write ATL rules when the keyword
> "when,where,subfunction,opposite" of QVT is involved.
>
> It would be very helpful if any document or links or examples are
> available pertaining to the keywords used above.
>
>
> relation Variant
> {
> pn:String;
> idxx:String;
>
> checkonly domain source
> faa:east::fun_architecture::FAAT
> {
> aFun=af:east:fun_architecture::AF
> {
> name=pn,idx=idxx
> }
> };
>
> enforce domain target
> s:VM::Vari::Variant
> {
> ownedVarDe=ov:VM::Vari::Variant
> {
> name=pn,idx=idxx,
> owner=vm:VM:Vari::Variant{}
> }
> }
>
> };
> when
> {
> FAA(faa,vm);
> AnaVariant(af,av);
> }
> where
> {
> AnaModel(af,vm);
> }
>
>
> Regards,
> Swetha.
>
|
|
|
Re: [ATL] ATL Rules [message #88220 is a reply to message #87887] |
Tue, 12 August 2008 16:26 |
Swetha Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi Alfons,
Thanks for replying.I did check the link...I have few questions for which
I didnt find the answers...Hope you can help me out please.I have a very
strict deadline to complete this assignment.
1. How do we represent a "top relation" and a "relation" in ATL?
I understand that relation represents a "rule" in ATL.How do we
distinguish a top relation and a "relation" in ATL?
2. How do we represent a checkonly domain source and an enforce domain
target in ATL
3. In the below scenario, how to I represent the ATL mapping
enforce domain target
vm : VM::X::Y{
owned =v: VM::X::B {
name=pn,
idx=idxx
}
};
4.x1::x2 is represented as X!Y, how do I represent VM::Y::Z?
Sample Snippet of QVT
top relation X {
pn: String;
idxx: String;
checkonly domain source
em: x1::x2 {
name=pn,
idx=idxx
};
enforce domain target
vm: VM::Y::Z {
name=pn,
idx=idxx
};
when {
A(faa,vm);
B(af,av);
}
where {
C(em,vm);
D(em,vm);
}
}
How do I represent VM::Y::Z in ATL?
5.How do I represent the when and the where conditions with respect to
this example (question 4) if both basically has the same meaning?
rule X
{
from em: x1!x2
to vm:-----
(
name<- em.name,
idx<-em.idx
)
(
------
)
}
6. Since QVT is a bidirectional transformation, how do we do this in ATL.?
Can you explain it with respect to the above example (question 4)?
Thanks in advance.
Regards,
Swetha.
|
|
|
Re: [ATL] ATL Rules [message #88233 is a reply to message #88220] |
Tue, 12 August 2008 19:56 |
Alfons Laarman Messages: 71 Registered: July 2009 |
Member |
|
|
Swetha,
I don't know the precise details of the QVTR semantics. But you must realize
that QVTR has been written with different goals then ATL. For example QVTR
different execution scenerio's: checkonly, bi-directionality, incremental
updates, etc. As far as I know ATL does not try to solve these scenerio's.
That's why you won;t find all QVTR constructs in ATL.
Good luck with your deadline.
Regards,
Alfons
"Swetha" <swetha.tarachandra@continental-corporation.com> schreef in bericht
news:563fac8378e3f8b79b7fe821a59616d9$1@www.eclipse.org...
> Hi Alfons,
>
> Thanks for replying.I did check the link...I have few questions for which
> I didnt find the answers...Hope you can help me out please.I have a very
> strict deadline to complete this assignment.
>
> 1. How do we represent a "top relation" and a "relation" in ATL?
> I understand that relation represents a "rule" in ATL.How do we
> distinguish a top relation and a "relation" in ATL?
>
> 2. How do we represent a checkonly domain source and an enforce domain
> target in ATL
>
>
> 3. In the below scenario, how to I represent the ATL mapping
> enforce domain target vm : VM::X::Y{
> owned =v: VM::X::B {
> name=pn,
> idx=idxx
> }
> };
>
> 4.x1::x2 is represented as X!Y, how do I represent VM::Y::Z?
> Sample Snippet of QVT
>
> top relation X {
> pn: String;
> idxx: String;
>
> checkonly domain source em: x1::x2 {
> name=pn,
> idx=idxx
> };
>
> enforce domain target vm: VM::Y::Z {
> name=pn,
> idx=idxx
> };
> when {
> A(faa,vm);
> B(af,av);
> }
>
> where {
> C(em,vm);
> D(em,vm);
> }
> }
>
>
> How do I represent VM::Y::Z in ATL?
>
>
>
>
>
> 5.How do I represent the when and the where conditions with respect to
> this example (question 4) if both basically has the same meaning?
>
>
> rule X
> {
> from em: x1!x2
> to vm:-----
> (
> name<- em.name,
> idx<-em.idx
> )
> (
> ------
> )
> }
>
> 6. Since QVT is a bidirectional transformation, how do we do this in ATL.?
> Can you explain it with respect to the above example (question 4)?
>
>
> Thanks in advance.
>
> Regards,
> Swetha.
>
>
|
|
|
Goto Forum:
Current Time: Thu Nov 07 05:12:52 GMT 2024
Powered by FUDForum. Page generated in 0.04090 seconds
|