Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » error
error [message #935776] Sun, 07 October 2012 05:55 Go to next message
dorraaaa Z is currently offline dorraaaa Z
Messages: 22
Registered: June 2012
Junior Member
Hi,
i want to know where is the fault in this code, because i have error message


helper def : behavior(node:CTT!Task) : OrderedSet(CTT!Task) =

let children: OrderedSet(CTT!Task) =
if (node.oclIsUndefined()=false)then thisModule.getParent(thisModule.leaf(node)).hasChildren
->iterate(child; tab_children: OrderedSet(CTT!Task) =
thisModule.opChoice(child))
else drop endif
in children->select(e | not e.marqued and not e.Last() and
thisModule.behavior(CTT!Task.getParent(CTT!Task.getParent(thisModule.feuille(node)))));


[Updated on: Sun, 07 October 2012 06:39]

Report message to a moderator

Re: error [message #935834 is a reply to message #935776] Sun, 07 October 2012 07:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4027
Registered: July 2009
Senior Member
Hi

And the error message is? at? when? where?

Regards

Ed Willink


On 07/10/2012 10:55, dorraaaa 1987 wrote:
> Hi,
> i want to know where is the fault in this code, because i have error
> message
>
>
> helper def : behavior(node:CTT!Task) : OrderedSet(CTT!Task) =
> let children: OrderedSet(CTT!Task) = if
> (node.oclIsUndefined()=false)then
> thisModule.getParent(thisModule.leaf(node)).hasChildren
> ->iterate(child; tab_children: OrderedSet(CTT!Task) = children|
>
> let tabPriority: OrderedSet(CTT!Task) =
> if (child.temporalOperator.name='Choice'){
> tabPriority= thisModule.opChoice(child);
> if (thisModule.exist(child)=true) then
> thisModule.behavior(child+1) endif } else {
> if (child.temporalOperator.name='OrderIndependent'){
> tabPriority= thisModule.opOrderIndependent(child);
> if (thisModule.exist(child)=true) then
> thisModule.behavior(child+1)
> }else { if (child.temporalOperator.name='Sequential
> Enabling') {
> tabPriority= thisModule.opSequentialEnabling(child) ;
> if (thisModule.exist(child)=true) then
> thisModule.behavior(child+1) endif }
> }
> } in (node.oclIsUndefined()=false)) else drop endif
> in fils->select(e | not e.marqued and not e.Last() and
> thisModule.behavior(CTT!Task.getParent(CTT!Task.getParent(thisModule.feuille(node)))));
>
>
>
>
Re: error [message #935871 is a reply to message #935834] Sun, 07 October 2012 08:04 Go to previous messageGo to next message
dorraaaa Z is currently offline dorraaaa Z
Messages: 22
Registered: June 2012
Junior Member
Please , see the second code , i have restricted it to be clear
i have this decscrption
mismatched input ')' expecting PIPE

at the end of this instruction

thisModule.getParent(thisModule.leaf(node)).hasChildren
->iterate(child; tab_children: OrderedSet(CTT!Task) =
thisModule.opChoice(child))
Re: error [message #935956 is a reply to message #935871] Sun, 07 October 2012 10:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4027
Registered: July 2009
Senior Member
Hi

Your iterate has no body; it seems ATL describes the missing '|' as PIPE.

Regards

Ed Willink

On 07/10/2012 13:04, dorraaaa 1987 wrote:
> Please , see the second code , i have restricted it to be clear
> i have this decscrption
> mismatched input ')' expecting PIPE
>
> at the end of this instruction
>
> thisModule.getParent(thisModule.leaf(node)).hasChildren
> ->iterate(child; tab_children: OrderedSet(CTT!Task) =
> thisModule.opChoice(child))
Re: error [message #936283 is a reply to message #935956] Sun, 07 October 2012 18:09 Go to previous message
dorraaaa Z is currently offline dorraaaa Z
Messages: 22
Registered: June 2012
Junior Member
ok thank you but when i write this code

helper def : behavior(node:CTT!Task) : OrderedSet(CTT!Task) =
let children: OrderedSet(CTT!Task) =
if (node.oclIsUndefined()=false)then thisModule.getParent(thisModule.feuille(node)).hasChildren
->iterate(child; tab_children: OrderedSet(CTT!Task) = children|

let tabPriority: OrderedSet(CTT!Task) =

if (child.temporalOperator.name='Choice'){ // mismatched input '{' expecting 'then'
tabPriority= thisModule.opChoice(child); //mismatched input ';' expecting 'in'
if (thisModule.exist(child)=true) //mismatched input ')' expecting 'else'
then
thisModule.behavior(child+1) endif //mismatched input 'endif' expecting 'in'
}
else {
if (child.temporalOperator.name='OrderIndependent'){
tabPriority= thisModule.opOrderIndependent(child);
if // mismatched input 'if' expecting EOF
(thisModule.exist(child)=true) then
thisModule.behavior(child+1)

}else { if (child.temporalOperator.name='Sequential Enabling') {
tabPriority= thisModule.opSequentialEnabling(child) ;
if (thisModule.exist(child)=true) then
thisModule.behavior(child+1) endif }
}
}
in (node.oclIsUndefined()=false))
else 0 endif
in children->select(e | not e.marqued and not e.Last() and
thisModule.behavior(CTT!Task.getParent(CTT!Task.getParent(thisModule.feuille(node)))));


i have error , there are montionned in the code , see it please

[Updated on: Mon, 08 October 2012 11:33]

Report message to a moderator

Previous Topic:error message
Next Topic:[ATL] How to change ecoding
Goto Forum:
  


Current Time: Fri Aug 22 19:36:10 EDT 2014

Powered by FUDForum. Page generated in 0.07999 seconds