Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] for
[ATL] for [message #535437] Sun, 23 May 2010 13:58 Go to next message
graa is currently offline graaFriend
Messages: 42
Registered: April 2010
Member
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 08:16 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
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 11:14 Go to previous message
graa is currently offline graaFriend
Messages: 42
Registered: April 2010
Member
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 Dec 07 08:41:42 GMT 2024

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

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

Back to the top