| 
| [ATL] ATL projector [message #51316] | Sun, 08 July 2007 04:44  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: basgraaf.tudelft.nl 
 Hi All,
 
 I am having problems with the ATL injector. As an example consider
 ATLCopier.atl from the KM32ATLCopier transformation from the zoo. When I
 inject:
 
 module Copy;
 create OUT : MM from IN : MM;
 
 rule CopyTest {
 from
 s : MM!Test
 (
 s.oclIsTypeOf(MM!Test)
 )
 to
 t : MM!Test (
 name <- s.name,
 description <- s.description
 )
 }
 
 and subsequently extract the resulting model, I get:
 
 module Copy;
 create OUT : MM from IN : MM;
 
 rule CopyTest {
 from
 s : MM!Test
 (
 .oclIsTypeOf(MM!Test)
 )
 to
 t : MM!Test (
 name <-.name,
 description <-.description
 )
 }
 
 The variable expressions disappeared in the output pattern (s). It seems
 that the problem is that the referredVariable feature of the
 variableExpression is not set by the injector (see fragment of injection
 result below). When I correct this manually, the extracted ATL code is
 as expected.
 
 I am using
 http://www.sciences.univ-nantes.fr/lina/atl/www/atldemo/adt_ am3.zip. Has
 anybody observed this behaviour before?
 
 Thanks for any help,
 Kind regards,
 
 Bas Graaf.
 
 <outPattern location="10:3-14:6">
 <elements xsi:type="atl:SimpleOutPatternElement" location="11:5-14:6"
 varName="t">
 <type xsi:type="ocl:OclModelElement" location="11:9-11:16"
 name="Test" model="/1"/>
 <bindings location="12:7-12:21" propertyName="name">
 <value xsi:type="ocl:NavigationOrAttributeCallExp"
 location="12:15-12:21" name="name">
 <source xsi:type="ocl:VariableExp" location="12:15-12:16"
 name="s"/>
 </value>
 </bindings>
 <bindings location="13:7-13:35" propertyName="description">
 <value xsi:type="ocl:NavigationOrAttributeCallExp"
 location="13:22-13:35" name="description">
 <source xsi:type="ocl:VariableExp" location="13:22-13:23"
 name="s"/>
 </value>
 </bindings>
 </elements>
 </outPattern>
 |  |  |  | 
| 
| Re: [ATL] ATL projector [message #51537 is a reply to message #51316] | Mon, 09 July 2007 05:13   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: Hugo.Bruneliere.univ-nantes.fr 
 Bas Graaf a écrit :
 > Hi All,
 >
 
 Hi Bas,
 
 > I am having problems with the ATL injector. As an example consider
 > ATLCopier.atl from the KM32ATLCopier transformation from the zoo. When I
 > inject:
 >
 > module Copy;
 > create OUT : MM from IN : MM;
 >
 > rule CopyTest {
 >   from
 >     s : MM!Test
 >     (
 >       s.oclIsTypeOf(MM!Test)
 >     )
 >   to
 >     t : MM!Test (
 >       name <- s.name,
 >       description <- s.description
 >     )
 > }
 >
 > and subsequently extract the resulting model, I get:
 >
 > module Copy;
 > create OUT : MM from IN : MM;
 >
 > rule CopyTest {
 >   from
 >     s : MM!Test
 >     (
 >       .oclIsTypeOf(MM!Test)
 >     )
 >   to
 >     t : MM!Test (
 >       name <-.name,
 >       description <-.description
 >     )
 > }
 >
 > The variable expressions disappeared in the output pattern (s). It seems
 > that the problem is that the referredVariable feature of the
 > variableExpression is not set by the injector (see fragment of injection
 > result below). When I correct this manually, the extracted ATL code is
 > as expected.
 >
 > I am using
 >  http://www.sciences.univ-nantes.fr/lina/atl/www/atldemo/adt_ am3.zip. Has
 > anybody observed this behaviour before?
 >
 
 The version you're using is quite old. You may try to use the latest
 version of ATL & AM3 and I think it should work.
 
 See
 http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg01185.html
 for getting install instructions.
 
 > Thanks for any help,
 > Kind regards,
 >
 > Bas Graaf.
 >
 > <outPattern location="10:3-14:6">
 >   <elements xsi:type="atl:SimpleOutPatternElement" location="11:5-14:6"
 > varName="t">
 >     <type xsi:type="ocl:OclModelElement" location="11:9-11:16"
 > name="Test" model="/1"/>
 >     <bindings location="12:7-12:21" propertyName="name">
 >       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 > location="12:15-12:21" name="name">
 >         <source xsi:type="ocl:VariableExp" location="12:15-12:16"
 > name="s"/>
 >       </value>
 >     </bindings>
 >     <bindings location="13:7-13:35" propertyName="description">
 >       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 > location="13:22-13:35" name="description">
 >         <source xsi:type="ocl:VariableExp" location="13:22-13:23"
 > name="s"/>
 >       </value>
 >     </bindings>
 >   </elements>
 > </outPattern>
 
 Best regards,
 
 Hugo
 
 --
 --------------------------------------------------------
 Hugo Bruneliere - R&D Engineer
 ATLAS Group (INRIA & LINA) - University of Nantes
 2, rue de la Houssiniere
 44322 Nantes Cedex 3 - France
 office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
 EMail: Hugo.Bruneliere@univ-nantes.fr
 http://www.sciences.univ-nantes.fr/lina/atl/
 --------------------------------------------------------
 |  |  |  | 
| 
| Re: [ATL] ATL projector [message #51760 is a reply to message #51537] | Tue, 10 July 2007 02:33   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: basgraaf.tudelft.nl 
 Hi Hugo,
 
 Now it works. Thanks!
 
 As a follow-up question:
 
 Is it possible to invoke the ATL extractor from an ANT build script?
 This is not working:
 
 <am3.saveModel model="ATLModel" path="${targetModels}ATLFile.atl" >
 <extractor name="atl"/>
 </am3.saveModel>
 
 Kind regards,
 Bas.
 
 Hugo Bruneliere wrote:
 > Bas Graaf a écrit :
 >> Hi All,
 >>
 >
 > Hi Bas,
 >
 >> I am having problems with the ATL injector. As an example consider
 >> ATLCopier.atl from the KM32ATLCopier transformation from the zoo. When
 >> I inject:
 >>
 >> module Copy;
 >> create OUT : MM from IN : MM;
 >>
 >> rule CopyTest {
 >>   from
 >>     s : MM!Test
 >>     (
 >>       s.oclIsTypeOf(MM!Test)
 >>     )
 >>   to
 >>     t : MM!Test (
 >>       name <- s.name,
 >>       description <- s.description
 >>     )
 >> }
 >>
 >> and subsequently extract the resulting model, I get:
 >>
 >> module Copy;
 >> create OUT : MM from IN : MM;
 >>
 >> rule CopyTest {
 >>   from
 >>     s : MM!Test
 >>     (
 >>       .oclIsTypeOf(MM!Test)
 >>     )
 >>   to
 >>     t : MM!Test (
 >>       name <-.name,
 >>       description <-.description
 >>     )
 >> }
 >>
 >> The variable expressions disappeared in the output pattern (s). It
 >> seems that the problem is that the referredVariable feature of the
 >> variableExpression is not set by the injector (see fragment of
 >> injection result below). When I correct this manually, the extracted
 >> ATL code is as expected.
 >>
 >> I am using
 >>  http://www.sciences.univ-nantes.fr/lina/atl/www/atldemo/adt_ am3.zip.
 >> Has anybody observed this behaviour before?
 >>
 >
 > The version you're using is quite old. You may try to use the latest
 > version of ATL & AM3 and I think it should work.
 >
 > See
 >  http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg01185.html
 > for getting install instructions.
 >
 >> Thanks for any help,
 >> Kind regards,
 >>
 >> Bas Graaf.
 >>
 >> <outPattern location="10:3-14:6">
 >>   <elements xsi:type="atl:SimpleOutPatternElement"
 >> location="11:5-14:6" varName="t">
 >>     <type xsi:type="ocl:OclModelElement" location="11:9-11:16"
 >> name="Test" model="/1"/>
 >>     <bindings location="12:7-12:21" propertyName="name">
 >>       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 >> location="12:15-12:21" name="name">
 >>         <source xsi:type="ocl:VariableExp" location="12:15-12:16"
 >> name="s"/>
 >>       </value>
 >>     </bindings>
 >>     <bindings location="13:7-13:35" propertyName="description">
 >>       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 >> location="13:22-13:35" name="description">
 >>         <source xsi:type="ocl:VariableExp" location="13:22-13:23"
 >> name="s"/>
 >>       </value>
 >>     </bindings>
 >>   </elements>
 >> </outPattern>
 >
 > Best regards,
 >
 > Hugo
 >
 |  |  |  | 
| 
| Re: [ATL] ATL projector [message #51789 is a reply to message #51760] | Tue, 10 July 2007 04:39  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: Hugo.Bruneliere.univ-nantes.fr 
 Bas Graaf a écrit :
 > Hi Hugo,
 
 Hi Bas,
 
 > Now it works. Thanks!
 >
 > As a follow-up question:
 >
 > Is it possible to invoke the ATL extractor from an ANT build script?
 > This is not working:
 >
 > <am3.saveModel model="ATLModel" path="${targetModels}ATLFile.atl" >
 >     <extractor name="atl"/>
 > </am3.saveModel>
 >
 
 In order to do that using ANT tasks, you have to proceed in several steps:
 
 1) Load the TCS metamodel (available from the org.eclipse.am3.core
 plugin, into "resources/TCS/")
 
 <am3.loadModel modelHandler="EMF" name="TCS" metamodel="MOF"
 path="TCS.ecore">
 
 2) Load the TCS model for ATL (also available from the
 org.eclipse.am3.core plugin, but into "resources/ATL-0.2/")
 
 <am3.loadModel modelHandler="EMF" name="ATL-TCS" metamodel="TCS"
 path="ATL-0.2-TCS.ecore">
 
 3) Finally extract your ATL model into an ATL file using this TCS model:
 
 <am3.saveModel model="ATLModel" path="${targetModels}ATLFile.atl">
 <extractor name="ebnf">
 <param name="format" value="ATL-TCS"/>
 <param name="indentString" value=" "/>
 <param name="serializeComments" value="false"/>
 </extractor>
 </am3.saveModel>
 
 Best regards,
 
 Hugo
 
 > Kind regards,
 > Bas.
 >
 > Hugo Bruneliere wrote:
 >> Bas Graaf a écrit :
 >>> Hi All,
 >>>
 >>
 >> Hi Bas,
 >>
 >>> I am having problems with the ATL injector. As an example consider
 >>> ATLCopier.atl from the KM32ATLCopier transformation from the zoo.
 >>> When I inject:
 >>>
 >>> module Copy;
 >>> create OUT : MM from IN : MM;
 >>>
 >>> rule CopyTest {
 >>>   from
 >>>     s : MM!Test
 >>>     (
 >>>       s.oclIsTypeOf(MM!Test)
 >>>     )
 >>>   to
 >>>     t : MM!Test (
 >>>       name <- s.name,
 >>>       description <- s.description
 >>>     )
 >>> }
 >>>
 >>> and subsequently extract the resulting model, I get:
 >>>
 >>> module Copy;
 >>> create OUT : MM from IN : MM;
 >>>
 >>> rule CopyTest {
 >>>   from
 >>>     s : MM!Test
 >>>     (
 >>>       .oclIsTypeOf(MM!Test)
 >>>     )
 >>>   to
 >>>     t : MM!Test (
 >>>       name <-.name,
 >>>       description <-.description
 >>>     )
 >>> }
 >>>
 >>> The variable expressions disappeared in the output pattern (s). It
 >>> seems that the problem is that the referredVariable feature of the
 >>> variableExpression is not set by the injector (see fragment of
 >>> injection result below). When I correct this manually, the extracted
 >>> ATL code is as expected.
 >>>
 >>> I am using
 >>>  http://www.sciences.univ-nantes.fr/lina/atl/www/atldemo/adt_ am3.zip.
 >>> Has anybody observed this behaviour before?
 >>>
 >>
 >> The version you're using is quite old. You may try to use the latest
 >> version of ATL & AM3 and I think it should work.
 >>
 >> See
 >>  http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg01185.html
 >> for getting install instructions.
 >>
 >>> Thanks for any help,
 >>> Kind regards,
 >>>
 >>> Bas Graaf.
 >>>
 >>> <outPattern location="10:3-14:6">
 >>>   <elements xsi:type="atl:SimpleOutPatternElement"
 >>> location="11:5-14:6" varName="t">
 >>>     <type xsi:type="ocl:OclModelElement" location="11:9-11:16"
 >>> name="Test" model="/1"/>
 >>>     <bindings location="12:7-12:21" propertyName="name">
 >>>       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 >>> location="12:15-12:21" name="name">
 >>>         <source xsi:type="ocl:VariableExp" location="12:15-12:16"
 >>> name="s"/>
 >>>       </value>
 >>>     </bindings>
 >>>     <bindings location="13:7-13:35" propertyName="description">
 >>>       <value xsi:type="ocl:NavigationOrAttributeCallExp"
 >>> location="13:22-13:35" name="description">
 >>>         <source xsi:type="ocl:VariableExp" location="13:22-13:23"
 >>> name="s"/>
 >>>       </value>
 >>>     </bindings>
 >>>   </elements>
 >>> </outPattern>
 >>
 >> Best regards,
 >>
 >> Hugo
 >>
 
 
 --
 --------------------------------------------------------
 Hugo Bruneliere - R&D Engineer
 ATLAS Group (INRIA & LINA) - University of Nantes
 2, rue de la Houssiniere
 44322 Nantes Cedex 3 - France
 office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
 EMail: Hugo.Bruneliere@univ-nantes.fr
 http://www.sciences.univ-nantes.fr/lina/atl/
 --------------------------------------------------------
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04295 seconds