Skip to main content


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 11:26 Go to next message
Tassilo Horn is currently offline Tassilo HornFriend
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 13:49 Go to previous message
Tassilo Horn is currently offline Tassilo HornFriend
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: Thu Apr 25 06:09:10 GMT 2024

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

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

Back to the top