1-
1+ # Emitted from framec_v0.11.0
22
33
44
55from framelang .framelang import FrameEvent
66
77
8- # Emitted from framec_v0.11.0
98
109class FrameEvent :
1110 def __init__ (self , message , parameters ):
@@ -79,28 +78,28 @@ def OnInt(self,i: int):
7978
8079 def __branch_state_I (self , __e ):
8180 if __e ._message == "A" :
82- compartment = BranchCompartment ('__branch_state_SimpleIf' )
83- self .__transition (compartment )
81+ next_compartment = BranchCompartment ('__branch_state_SimpleIf' )
82+ self .__transition (next_compartment )
8483 return
8584 elif __e ._message == "B" :
86- compartment = BranchCompartment ('__branch_state_NegatedIf' )
87- self .__transition (compartment )
85+ next_compartment = BranchCompartment ('__branch_state_NegatedIf' )
86+ self .__transition (next_compartment )
8887 return
8988 elif __e ._message == "C" :
90- compartment = BranchCompartment ('__branch_state_Precedence' )
91- self .__transition (compartment )
89+ next_compartment = BranchCompartment ('__branch_state_Precedence' )
90+ self .__transition (next_compartment )
9291 return
9392 elif __e ._message == "D" :
94- compartment = BranchCompartment ('__branch_state_NestedIf' )
95- self .__transition (compartment )
93+ next_compartment = BranchCompartment ('__branch_state_NestedIf' )
94+ self .__transition (next_compartment )
9695 return
9796 elif __e ._message == "E" :
98- compartment = BranchCompartment ('__branch_state_GuardedTransition' )
99- self .__transition (compartment )
97+ next_compartment = BranchCompartment ('__branch_state_GuardedTransition' )
98+ self .__transition (next_compartment )
10099 return
101100 elif __e ._message == "F" :
102- compartment = BranchCompartment ('__branch_state_NestedGuardedTransition' )
103- self .__transition (compartment )
101+ next_compartment = BranchCompartment ('__branch_state_NestedGuardedTransition' )
102+ self .__transition (next_compartment )
104103 return
105104
106105 # ----------------------------------------
@@ -124,12 +123,12 @@ def __branch_state_SimpleIf(self, __e):
124123 self .log_do ("else 2" )
125124
126125 if __e ._parameters ["b" ]:
127- compartment = BranchCompartment ('__branch_state_F1' )
128- self .__transition (compartment )
126+ next_compartment = BranchCompartment ('__branch_state_F1' )
127+ self .__transition (next_compartment )
129128 return
130129 else :
131- compartment = BranchCompartment ('__branch_state_F2' )
132- self .__transition (compartment )
130+ next_compartment = BranchCompartment ('__branch_state_F2' )
131+ self .__transition (next_compartment )
133132 return
134133
135134 return
@@ -146,13 +145,13 @@ def __branch_state_SimpleIf(self, __e):
146145
147146 if __e ._parameters ["i" ] == 7 :
148147 self .log_do ("== 7" )
149- compartment = BranchCompartment ('__branch_state_F1' )
150- self .__transition (compartment )
148+ next_compartment = BranchCompartment ('__branch_state_F1' )
149+ self .__transition (next_compartment )
151150 return
152151 else :
153152 self .log_do ("!= 7" )
154- compartment = BranchCompartment ('__branch_state_F2' )
155- self .__transition (compartment )
153+ next_compartment = BranchCompartment ('__branch_state_F2' )
154+ self .__transition (next_compartment )
156155 return
157156
158157 return
@@ -178,12 +177,12 @@ def __branch_state_NegatedIf(self, __e):
178177 self .log_do ("else 2" )
179178
180179 if not (__e ._parameters ["b" ]):
181- compartment = BranchCompartment ('__branch_state_F1' )
182- self .__transition (compartment )
180+ next_compartment = BranchCompartment ('__branch_state_F1' )
181+ self .__transition (next_compartment )
183182 return
184183 else :
185- compartment = BranchCompartment ('__branch_state_F2' )
186- self .__transition (compartment )
184+ next_compartment = BranchCompartment ('__branch_state_F2' )
185+ self .__transition (next_compartment )
187186 return
188187
189188 return
@@ -200,13 +199,13 @@ def __branch_state_NegatedIf(self, __e):
200199
201200 if not (__e ._parameters ["i" ] != 7 ):
202201 self .log_do ("== 7" )
203- compartment = BranchCompartment ('__branch_state_F1' )
204- self .__transition (compartment )
202+ next_compartment = BranchCompartment ('__branch_state_F1' )
203+ self .__transition (next_compartment )
205204 return
206205 else :
207206 self .log_do ("!= 7" )
208- compartment = BranchCompartment ('__branch_state_F2' )
209- self .__transition (compartment )
207+ next_compartment = BranchCompartment ('__branch_state_F2' )
208+ self .__transition (next_compartment )
210209 return
211210
212211 return
@@ -247,8 +246,8 @@ def __branch_state_NestedIf(self, __e):
247246 self .log_do ("> 0" )
248247 if __e ._parameters ["i" ] < 100 :
249248 self .log_do ("< 100" )
250- compartment = BranchCompartment ('__branch_state_F1' )
251- self .__transition (compartment )
249+ next_compartment = BranchCompartment ('__branch_state_F1' )
250+ self .__transition (next_compartment )
252251 return
253252 else :
254253 self .log_do (">= 100" )
@@ -259,8 +258,8 @@ def __branch_state_NestedIf(self, __e):
259258 self .log_do ("> -10" )
260259 else :
261260 self .log_do ("<= -10" )
262- compartment = BranchCompartment ('__branch_state_F2' )
263- self .__transition (compartment )
261+ next_compartment = BranchCompartment ('__branch_state_F2' )
262+ self .__transition (next_compartment )
264263 return
265264
266265
@@ -273,8 +272,8 @@ def __branch_state_GuardedTransition(self, __e):
273272 if __e ._message == "OnInt" :
274273 if __e ._parameters ["i" ] > 100 :
275274 self .log_do ("-> $F1" )
276- compartment = BranchCompartment ('__branch_state_F1' )
277- self .__transition (compartment )
275+ next_compartment = BranchCompartment ('__branch_state_F1' )
276+ self .__transition (next_compartment )
278277 return
279278 else :
280279 pass
@@ -283,13 +282,13 @@ def __branch_state_GuardedTransition(self, __e):
283282 pass
284283 else :
285284 self .log_do ("-> $F2" )
286- compartment = BranchCompartment ('__branch_state_F2' )
287- self .__transition (compartment )
285+ next_compartment = BranchCompartment ('__branch_state_F2' )
286+ self .__transition (next_compartment )
288287 return
289288
290289 self .log_do ("-> $F3" )
291- compartment = BranchCompartment ('__branch_state_F3' )
292- self .__transition (compartment )
290+ next_compartment = BranchCompartment ('__branch_state_F3' )
291+ self .__transition (next_compartment )
293292 return
294293
295294 # ----------------------------------------
@@ -300,8 +299,8 @@ def __branch_state_NestedGuardedTransition(self, __e):
300299 if __e ._parameters ["i" ] > 10 :
301300 if __e ._parameters ["i" ] > 100 :
302301 self .log_do ("-> $F1" )
303- compartment = BranchCompartment ('__branch_state_F1' )
304- self .__transition (compartment )
302+ next_compartment = BranchCompartment ('__branch_state_F1' )
303+ self .__transition (next_compartment )
305304 return
306305 else :
307306 pass
@@ -310,16 +309,16 @@ def __branch_state_NestedGuardedTransition(self, __e):
310309 pass
311310 else :
312311 self .log_do ("-> $F2" )
313- compartment = BranchCompartment ('__branch_state_F2' )
314- self .__transition (compartment )
312+ next_compartment = BranchCompartment ('__branch_state_F2' )
313+ self .__transition (next_compartment )
315314 return
316315
317316 else :
318317 pass
319318
320319 self .log_do ("-> $F3" )
321- compartment = BranchCompartment ('__branch_state_F3' )
322- self .__transition (compartment )
320+ next_compartment = BranchCompartment ('__branch_state_F3' )
321+ self .__transition (next_compartment )
323322 return
324323
325324 # ----------------------------------------
@@ -403,8 +402,8 @@ def __router(self, __e):
403402 elif self .__compartment .state == '__branch_state_F3' :
404403 self .__branch_state_F3 (__e )
405404
406- def __transition (self , compartment : 'BranchCompartment' ):
407- self .__next_compartment = compartment
405+ def __transition (self , next_compartment : 'BranchCompartment' ):
406+ self .__next_compartment = next_compartment
408407
409408 def state_info (self ):
410409 return self .__compartment .state
0 commit comments