Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » MOF2UML inheritance
MOF2UML inheritance [message #34541] Thu, 26 April 2007 15:19 Go to next message
Kelly  arcés is currently offline Kelly arcésFriend
Messages: 22
Registered: July 2009
Junior Member
Hello!

From http://www.eclipse.org/m2m/atl/atlTransformations/, i downloaded
MOF2UML example, but i did not find rule inheritance. Where could i find
the version with rule inheritance?

Thanks in adcance.
Re: MOF2UML inheritance [message #34575 is a reply to message #34541] Thu, 26 April 2007 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi Kelly,

MOF2UML is a very old transformation (about 2 years) and rules
inheritance were not supported. There is no new version planned but any
contribution is welcome ;)

Best regards,

Mikael

Kelly Garcés wrote:
> Hello!
>
> From http://www.eclipse.org/m2m/atl/atlTransformations/, i downloaded
> MOF2UML example, but i did not find rule inheritance. Where could i find
> the version with rule inheritance?
>
> Thanks in adcance.
>
>
>



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: MOF2UML inheritance [message #34609 is a reply to message #34575] Thu, 26 April 2007 17:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: touzitou.enstimac.fr

Hi Mikael !!
there is any documentation about rules inheritance ??
But fastly for wich reason we have to use Rules inheritance ??
Thxs



Mikaël Barbero a écrit :
> Hi Kelly,
>
> MOF2UML is a very old transformation (about 2 years) and rules
> inheritance were not supported. There is no new version planned but any
> contribution is welcome ;)
>
> Best regards,
>
> Mikael
>
> Kelly Garcés wrote:
>> Hello!
>>
>> From http://www.eclipse.org/m2m/atl/atlTransformations/, i downloaded
>> MOF2UML example, but i did not find rule inheritance. Where could i
>> find the version with rule inheritance?
>>
>> Thanks in adcance.
>>
>>
>>
>
>
>
Re: MOF2UML inheritance [message #34643 is a reply to message #34575] Fri, 27 April 2007 08:28 Go to previous messageGo to next message
Kelly  arcés is currently offline Kelly arcésFriend
Messages: 22
Registered: July 2009
Junior Member
Mikaël Barbero a écrit :
> Hi Kelly,
>
> MOF2UML is a very old transformation (about 2 years) and rules
> inheritance were not supported. There is no new version planned but any
> contribution is welcome ;)
>
> Best regards,
>
> Mikael
>
> Kelly Garcés wrote:
>> Hello!
>>
>> From http://www.eclipse.org/m2m/atl/atlTransformations/, i downloaded
>> MOF2UML example, but i did not find rule inheritance. Where could i
>> find the version with rule inheritance?
>>
>> Thanks in adcance.
>>
>>
>>
>
>
>
Hello:

Are there any example of rule inheritance?
Where could i find them?

Thanks.
Re: MOF2UML inheritance [message #34676 is a reply to message #34643] Fri, 27 April 2007 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi Kelly and jihed,

I wrote a quick and dirty explanation about rule inheritance. It is
available here:
http://wiki.eclipse.org/index.php/ATL_Language_Troubleshoote r#Rule_inheritance

Do not hesitate to ask more questions about it. This will help me to
improve the documentation.

Best regards,
Mikael

Kelly Garcés wrote:
> Mikaël Barbero a écrit :
>> Hi Kelly,
>>
>> MOF2UML is a very old transformation (about 2 years) and rules
>> inheritance were not supported. There is no new version planned but
>> any contribution is welcome ;)
>>
>> Best regards,
>>
>> Mikael
>>
>> Kelly Garcés wrote:
>>> Hello!
>>>
>>> From http://www.eclipse.org/m2m/atl/atlTransformations/, i
>>> downloaded MOF2UML example, but i did not find rule inheritance.
>>> Where could i find the version with rule inheritance?
>>>
>>> Thanks in adcance.
>>>
>>>
>>>
>>
>>
>>
> Hello:
>
> Are there any example of rule inheritance?
> Where could i find them?
>
> Thanks.



--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: MOF2UML inheritance [message #36240 is a reply to message #34676] Mon, 07 May 2007 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Mikaël Barbero wrote:
> Hi Kelly and jihed,
>
> I wrote a quick and dirty explanation about rule inheritance. It is
> available here:
> http://wiki.eclipse.org/index.php/ATL_Language_Troubleshoote r#Rule_inheritance
>
>
> Do not hesitate to ask more questions about it. This will help me to
> improve the documentation.
>
Here's a question :)

Is it possible to override values in subrules which are set by
superrules? For example, to override atttribute b of class t:

rule A { -- superrule, either lazy or abstract
from s : mm!s
to t : mm!t(
a <- s.a,
b <- 'super'
)
}

rule B extends A {
from s : mm!s
to t : mm!t{
b <- 'sub'
)
}

Thanks,
Rene
Re: MOF2UML inheritance [message #36307 is a reply to message #36240] Mon, 07 May 2007 15:55 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

> Is it possible to override values in subrules which are set by
> superrules? For example, to override atttribute b of class t:
>
> rule A { -- superrule, either lazy or abstract
> from s : mm!s
> to t : mm!t(
> a <- s.a,
> b <- 'super'
> )
> }
>
> rule B extends A {
> from s : mm!s
> to t : mm!t{
> b <- 'sub'
> )
> }

Yes, you can do this. However, rule inheritance is not implemented for
lazy rules yet.



Note that b <- 'super' will not be "executed" at all.

This means that if a lazy rule was called in the super rule, it will not
be called in the subrule unless you call it explicitly.

Moreover, you can definitely not reuse the value of t.b by writing
something like:

-- INCORRECT
rule B extends A {
from s : mm!s
to t : mm!t{
b <- t.b + '_sub'
)
}

, which is anyway incorrect because it also involves target model
navigation.

If you want to reuse a computed value, simply use an attribute helper
instead:

helper context mm!s def: value : String =
'super';

rule A {
from s : mm!s
to t : mm!t(
a <- s.a,
b <- s.value
)
}

rule B extends A {
from s : mm!s
to t : mm!t{
b <- s.value + '_sub'
)
}


Regards,

Frédéric Jouault
Re: MOF2UML inheritance [message #36371 is a reply to message #36307] Tue, 08 May 2007 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Frédéric Jouault wrote:
> Hello,
>
> > Is it possible to override values in subrules which are set by
> > superrules? For example, to override atttribute b of class t:
> >
> > rule A { -- superrule, either lazy or abstract
> > from s : mm!s
> > to t : mm!t(
> > a <- s.a,
> > b <- 'super'
> > )
> > }
> >
> > rule B extends A {
> > from s : mm!s
> > to t : mm!t{
> > b <- 'sub'
> > )
> > }
>
> Yes, you can do this. However, rule inheritance is not implemented for
> lazy rules yet.
>
Is there a timeline for the implementation of lazy rule inheritance?
I have a superimposed ATL rule 'library' which contains lazy rules to be
executed on demand. As an alternative, I guess I can turn the lazy
superrules into abstract superrules since abstract rules aren't
standalone anyway.

>
> Note that b <- 'super' will not be "executed" at all.
>
So if rule A is lazy, the output of thisModule.A(s_in) would be {t.a =
s_in.a , t.b = <undefined>} ?
And if rule A is lazy and rule B (either lazy or normal) is executed
with s = s_in2, its output would be {t.a = s_in2.a (inherited from rule
), t.b = 'sub'} ?

> This means that if a lazy rule was called in the super rule, it will not
> be called in the subrule unless you call it explicitly.
>

> Moreover, you can definitely not reuse the value of t.b by writing
> something like:
>
[...]

It wasn't my intention to reuse variables, but to have a "use the value
of the superrule if not set here" policy (just like imperative object
orientation).

Regards,
Rene
Re: MOF2UML inheritance [message #36420 is a reply to message #36371] Wed, 09 May 2007 11:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
> Frédéric Jouault wrote:
>> However, rule inheritance is not implemented for
>> lazy rules yet.
>>
> Is there a timeline for the implementation of lazy rule inheritance?
> I have a superimposed ATL rule 'library' which contains lazy rules to be
> executed on demand. As an alternative, I guess I can turn the lazy
> superrules into abstract superrules since abstract rules aren't
> standalone anyway.
>
I planned to have lazy rules in this 'library' extend other rules, but
unfortunately having lazy rules extend other rules crashes the ATL compiler.

[...]

Regards,
Rene
Re: [ATL] MOF2UML inheritance [message #36629 is a reply to message #36371] Wed, 09 May 2007 15:43 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

I have just noticed that we have been discussing in this thread without
prefixing its subject with [ATL]. This is now corrected. Please, keep
this in mind for your future posts ;-).


>> Yes, you can do this. However, rule inheritance is not implemented for
>> lazy rules yet.
>>
> Is there a timeline for the implementation of lazy rule inheritance?

So far, we have been delaying the implementation of lazy rule
inheritance because we wanted to integrate it with an improved resolving
algorithm.

However, if the interest in lazy rule inheritance is strong enough, we
may decide to work on a first (simpler) version, without needing the
improved resolving algorithm.


>> Note that b <- 'super' will not be "executed" at all.
>>
> So if rule A is lazy, the output of thisModule.A(s_in) would be {t.a =
> s_in.a , t.b = <undefined>} ?
> And if rule A is lazy and rule B (either lazy or normal) is executed
> with s = s_in2, its output would be {t.a = s_in2.a (inherited from rule
> ), t.b = 'sub'} ?

Rules A and B cannot be lazy because they use rule inheritance, which is
not implemented for lazy rules yet.


>> Moreover, you can definitely not reuse the value of t.b by writing
>> something like:
>>
> [...]
>
> It wasn't my intention to reuse variables, but to have a "use the value
> of the superrule if not set here" policy (just like imperative object
> orientation).

It was not my intention either to imply that you wanted to do this :-).

I was merely mentioning this fact here because it seemed relevant.

Sorry for the confusion.


Regards,

Frédéric Jouault
Previous Topic:[ATL] Transformation BPEL - XPDL
Next Topic:Re: [ATL] Datatype mapping during Ecore to KM3 extraction
Goto Forum:
  


Current Time: Tue Jan 19 22:21:33 GMT 2021

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

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

Back to the top