[ATL] Question about Rule Inheritance [message #642447] |
Wed, 01 December 2010 06:26  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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 |
|
|
|
Powered by
FUDForum. Page generated in 0.08446 seconds