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 11:58 |
Eclipse User |
|
|
|
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 13:57 |
Eclipse User |
|
|
|
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 15:14 |
Eclipse User |
|
|
|
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 15:13 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
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 18:16 |
Eclipse User |
|
|
|
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
>>>
>>>
>>>
|
|
|
Goto Forum:
Current Time: Tue Mar 19 13:00:22 GMT 2024
Powered by FUDForum. Page generated in 0.02998 seconds
|