Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Question about Rule Inheritance
[ATL] Question about Rule Inheritance [message #642447] Wed, 01 December 2010 06:26 Go to next message
Tassilo Horn is currently offline Tassilo Horn
Messages: 93
Registered: July 2009
Member
Hi again,

I have a question about rule inheritance. Let's use the example from
the user guide. The following rules

abstract rule A { | rule B extends A { | rule C extends B {
from [fromA] | from [fromB] | from [fromC]
using [usingA] | using [usingB] | using [usingC]
to [toA] | to [toB] | to [toC]
do [doA] | do [doB] | do [doC]
} | } | }

are compiled to:

rule B {
from [fromB]
using [usingB]
to [toA.bindings union toB.bindings]
do [doB]
}
rule C {
from [fromC]
using [usingC]
to [toA.bindings union toB.bindings union toC.bindings]
do [doC]
}

It seems to me that doA is forgotten in the procedure. So is there any
reason to specify an imperative code section in abstract rules?

Bye,
Tassilo
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@uni-koblenz.de
Universitätsstr. 1, 56070 Koblenz, Germany |
Re: [ATL] Question about Rule Inheritance [message #642479 is a reply to message #642447] Wed, 01 December 2010 08:49 Go to previous message
Tassilo Horn is currently offline Tassilo Horn
Messages: 93
Registered: July 2009
Member
Tassilo Horn <horn@uni-koblenz.de> writes:

> I have a question about rule inheritance. Let's use the example from
> the user guide. The following rules
>
> abstract rule A { | rule B extends A { | rule C extends B {
> from [fromA] | from [fromB] | from [fromC]
> using [usingA] | using [usingB] | using [usingC]
> to [toA] | to [toB] | to [toC]
> do [doA] | do [doB] | do [doC]
> } | } | }
>
> are compiled to:
>
> rule B {
> from [fromB]
> using [usingB]
> to [toA.bindings union toB.bindings]
> do [doB]
> }
> rule C {
> from [fromC]
> using [usingC]
> to [toA.bindings union toB.bindings union toC.bindings]
> do [doC]
> }
>
> It seems to me that doA is forgotten in the procedure. So is there
> any reason to specify an imperative code section in abstract rules?

I've just testet it out, and the do section of an abstract matched rule
isn't exectuted.

Bye,
Tassilo
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@uni-koblenz.de
Universitätsstr. 1, 56070 Koblenz, Germany |
Previous Topic:refining mode programmatically
Next Topic:[ATL] Refining Mode : Cannot create
Goto Forum:
  


Current Time: Fri Aug 29 12:35:20 EDT 2014

Powered by FUDForum. Page generated in 0.02632 seconds