Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] for
[ATL] for [message #535437] Sun, 23 May 2010 09:58 Go to next message
Eclipse UserFriend
hi,
i have a problem in instruction for :
mismatched input 'for' expecting RPAREN

rule transformation {
from
u: uml!PackageableElement
using {


iniseq : Sequence(uml!PackageableElement) =u.machine;
level :Integer = 0;


}
to
b : eventb!BModel(
name <- 'M'+ level.toString(),
events <- u.Level0->collect(r|thisModule.NewEvent(r))),



fi : distinct eventb!BModel foreach(goal in iniseq)(


name <- 'M'+ ( u.counter(level)).toString()


for(ev in u.AllEvent(goal))
(events<-ev)





}
how i can resolve it?
thanks
Re: [ATL] for [message #535663 is a reply to message #535437] Tue, 25 May 2010 04:16 Go to previous messageGo to next message
Eclipse UserFriend
graa wrote on Sun, 23 May 2010 09:58
hi,
i have a problem in instruction for :
mismatched input 'for' expecting RPAREN

rule transformation {
from
u: uml!PackageableElement
using {


iniseq : Sequence(uml!PackageableElement) =u.machine;
level :Integer = 0;


}
to
b : eventb!BModel(
name <- 'M'+ level.toString(),
events <- u.Level0->collect(r|thisModule.NewEvent(r))),



fi : distinct eventb!BModel foreach(goal in iniseq)(


name <- 'M'+ ( u.counter(level)).toString()


for(ev in u.AllEvent(goal))
(events<-ev)





}
how i can resolve it?
thanks

You can't do that but this will work :
events <- u.AllEvent(goal)
Re: [ATL] for [message #535924 is a reply to message #535663] Wed, 26 May 2010 07:14 Go to previous message
Eclipse UserFriend
i know,but when i do events <- u.AllEvent(goal)

u.AllEvent(goal) return a sequence :Sequence {IN2!G1:uml!AbstractGoal, IN2!G2:uml!AbstractGoal,IN2!G3:uml!AbstractGoal,....}
it affect to first BModel events=IN2!G1:uml!AbstractGoal

and for exemple u.AllEvent(goal) ={IN2!G4:uml!AbstractGoal, IN2!G5:uml!AbstractGoal,IN2!G6:uml!AbstractGoal,....}

it affect to second BModel events=IN2!G5:uml!AbstractGoal

but i would that affect all element of the sequence in events for each BModel.
Previous Topic:[ATL] override attribute in sub rules
Next Topic:[ATL] troubles launching from java (even with atl-common)
Goto Forum:
  


Current Time: Sat Jun 21 05:06:19 EDT 2025

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

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

Back to the top