Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » Problem with clause "using" in called rule
Problem with clause "using" in called rule [message #11967] Mon, 22 January 2007 06:58 Go to next message
Eclipse UserFriend
Originally posted by: jairson.gmail.com

Hello All,

I´ve read in the manual that called rules allow us to use the clause
"using" to declare local variables. But I am having an error message
"unexpected token: using" with the excerpt below:

rule simpagation2simpagation (r : CHR!Simpagation,v :
Sequence(CHR!VariableSymbol))
{
using {
co : Sequence(CHR!ConstantSymbol) =
thisModule.allConstantSymbols(r.keep->union(r.remove));
}
to
ro : CHR!Simpagation (
(...)

Can anyone help?

regards,

Jairson Vitorino
Re: Problem with clause "using" in called rule [message #11981 is a reply to message #11967] Mon, 22 January 2007 08:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Hi Jairson,

Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If it's
2006, try it with 2004 and report us if it is working. This would mean
that ATL 2006 doesn't support "using" in called rules.

Regards,
Mikael

Jairson a écrit :
> Hello All,
>
> I´ve read in the manual that called rules allow us to use the clause
> "using" to declare local variables. But I am having an error message
> "unexpected token: using" with the excerpt below:
>
> rule simpagation2simpagation (r : CHR!Simpagation,v :
> Sequence(CHR!VariableSymbol))
> {
> using {
> co : Sequence(CHR!ConstantSymbol) =
> thisModule.allConstantSymbols(r.keep->union(r.remove));
> }
> to
> ro : CHR!Simpagation (
> (...)
>
> Can anyone help?
>
> regards,
>
> Jairson Vitorino



--
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: Problem with clause "using" in called rule [message #11993 is a reply to message #11981] Mon, 22 January 2007 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jairson.gmail.com

Mikaël

Thanks for the answer. I am using ATL 2004! That´s what I found it strange.

here is the whole rule:

rule simpagation2simpagation (r : CHR!Simpagation,v :
Sequence(CHR!VariableSymbol))
{
using {
co : Sequence(CHR!ConstantSymbol) =
thisModule.allConstantSymbols(r.keep->union(r.remove));
}
to
ro : CHR!Simpagation (
name <- r.name,
keep <- r.keep,
remove <- r.remove,
guard <- r.guard->union(co->iterate(c; acc : CHR!Bic = Sequence{} |
acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
disjunctiveBody <- r.disjunctiveBody
)

}

I still have the same error.

Jairson

Mikaël Barbero wrote:
> Hi Jairson,
>
> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If it's
> 2006, try it with 2004 and report us if it is working. This would mean
> that ATL 2006 doesn't support "using" in called rules.
>
> Regards,
> Mikael
>
> Jairson a écrit :
>> Hello All,
>>
>> I´ve read in the manual that called rules allow us to use the clause
>> "using" to declare local variables. But I am having an error message
>> "unexpected token: using" with the excerpt below:
>>
>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>> Sequence(CHR!VariableSymbol))
>> {
>> using {
>> co : Sequence(CHR!ConstantSymbol) =
>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>> }
>> to
>> ro : CHR!Simpagation (
>> (...)
>>
>> Can anyone help?
>>
>> regards,
>>
>> Jairson Vitorino
>
>
>
Re: Problem with clause "using" in called rule [message #12019 is a reply to message #11993] Mon, 22 January 2007 10:13 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Your rule parses ok with the latest version of ATL.
Can you please try to update?

The problem may also be a syntax error earlier in the file. If there is
one, the parser may not have succeeded in resynchronizing. Correcting
any previous error should then make this one disappear.


Regards,

Frédéric Jouault


Jairson wrote:
> Mikaël
>
> Thanks for the answer. I am using ATL 2004! That´s what I found it strange.
>
> here is the whole rule:
>
> rule simpagation2simpagation (r : CHR!Simpagation,v :
> Sequence(CHR!VariableSymbol))
> {
> using {
> co : Sequence(CHR!ConstantSymbol) =
> thisModule.allConstantSymbols(r.keep->union(r.remove));
> }
> to
> ro : CHR!Simpagation (
> name <- r.name,
> keep <- r.keep,
> remove <- r.remove,
> guard <- r.guard->union(co->iterate(c; acc : CHR!Bic
> = Sequence{} |
> acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
>
> disjunctiveBody <- r.disjunctiveBody
> )
>
> }
>
> I still have the same error.
>
> Jairson
>
> Mikaël Barbero wrote:
>> Hi Jairson,
>>
>> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If
>> it's 2006, try it with 2004 and report us if it is working. This would
>> mean that ATL 2006 doesn't support "using" in called rules.
>>
>> Regards,
>> Mikael
>>
>> Jairson a écrit :
>>> Hello All,
>>>
>>> I´ve read in the manual that called rules allow us to use the clause
>>> "using" to declare local variables. But I am having an error message
>>> "unexpected token: using" with the excerpt below:
>>>
>>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>>> Sequence(CHR!VariableSymbol))
>>> {
>>> using {
>>> co : Sequence(CHR!ConstantSymbol) =
>>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>>> }
>>> to
>>> ro : CHR!Simpagation (
>>> (...)
>>>
>>> Can anyone help?
>>>
>>> regards,
>>>
>>> Jairson Vitorino
>>
>>
>>
Re: Problem with clause "using" in called rule [message #12032 is a reply to message #12019] Mon, 22 January 2007 13:16 Go to previous message
Eclipse UserFriend
Originally posted by: jairson.gmail.com

Thanks. I´ll update then.

Frédéric Jouault wrote:
> Hello,
>
> Your rule parses ok with the latest version of ATL.
> Can you please try to update?
>
> The problem may also be a syntax error earlier in the file. If there is
> one, the parser may not have succeeded in resynchronizing. Correcting
> any previous error should then make this one disappear.
>
>
> Regards,
>
> Frédéric Jouault
>
>
> Jairson wrote:
>> Mikaël
>>
>> Thanks for the answer. I am using ATL 2004! That´s what I found it
>> strange.
>>
>> here is the whole rule:
>>
>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>> Sequence(CHR!VariableSymbol))
>> {
>> using {
>> co : Sequence(CHR!ConstantSymbol) =
>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>> }
>> to
>> ro : CHR!Simpagation (
>> name <- r.name,
>> keep <- r.keep,
>> remove <- r.remove,
>> guard <- r.guard->union(co->iterate(c; acc :
>> CHR!Bic = Sequence{} |
>> acc->including(thisModule.newBic(c,thisModule.newVariables- >at(co->indexOf(c)))))),
>>
>> disjunctiveBody <- r.disjunctiveBody
>> )
>> }
>>
>> I still have the same error.
>>
>> Jairson
>>
>> Mikaël Barbero wrote:
>>> Hi Jairson,
>>>
>>> Which ATL compiler version do you have ? ATL 2006 or ATL 2004 ? If
>>> it's 2006, try it with 2004 and report us if it is working. This
>>> would mean that ATL 2006 doesn't support "using" in called rules.
>>>
>>> Regards,
>>> Mikael
>>>
>>> Jairson a écrit :
>>>> Hello All,
>>>>
>>>> I´ve read in the manual that called rules allow us to use the clause
>>>> "using" to declare local variables. But I am having an error message
>>>> "unexpected token: using" with the excerpt below:
>>>>
>>>> rule simpagation2simpagation (r : CHR!Simpagation,v :
>>>> Sequence(CHR!VariableSymbol))
>>>> {
>>>> using {
>>>> co : Sequence(CHR!ConstantSymbol) =
>>>> thisModule.allConstantSymbols(r.keep->union(r.remove));
>>>> }
>>>> to
>>>> ro : CHR!Simpagation (
>>>> (...)
>>>>
>>>> Can anyone help?
>>>>
>>>> regards,
>>>>
>>>> Jairson Vitorino
>>>
>>>
>>>
Previous Topic:Problem with UML profiles and ATL 2006 - Message #2052 @yahoo list
Next Topic:[ATL] transform model to model
Goto Forum:
  


Current Time: Thu May 01 16:42:29 EDT 2025

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

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

Back to the top