Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Stateflow / src_Inner4 / Inner4.lus @ eb639349

History | View | Annotate | Download (21.4 KB)

1
-- This file has been generated by cocoSim
2

    
3

    
4
-- System nodes
5

    
6

    
7

    
8

    
9

    
10

    
11

    
12

    
13

    
14

    
15

    
16

    
17

    
18
-- Entry action for state :A_A3
19
node A_A3_en(idInner4_A_1:int;
20
	enA3cnt_1:int;
21
	isInner:bool)
22

    
23
returns (idInner4_A:int;
24
	enA3cnt:int);
25

    
26

    
27
var 	idInner4_A_2:int;
28
	enA3cnt_2:int;
29

    
30

    
31
let
32

    
33

    
34

    
35
	-- set state as active 
36
	idInner4_A_2 
37
	= 1113;
38
	
39

    
40
	enA3cnt_2 
41
	= if (not isInner) then  enA3cnt_1  + 1
42
	 else enA3cnt_1;
43
	
44

    
45
	(idInner4_A, enA3cnt) 
46
	= (idInner4_A_2, enA3cnt_2);
47
	
48

    
49
tel
50

    
51

    
52

    
53

    
54

    
55
--During action for state :A_A3
56
node A_A3_du(duA3cnt_1:int)
57

    
58
returns (duA3cnt:int);
59

    
60

    
61
var 	duA3cnt_2:int;
62

    
63

    
64
let
65

    
66

    
67

    
68
	duA3cnt_2 
69
	=  duA3cnt_1  + 1;
70
	
71

    
72
	(duA3cnt) 
73
	= (duA3cnt_2);
74
	
75

    
76
tel
77

    
78

    
79

    
80

    
81

    
82
-- Exit action for state :A_A3
83
node A_A3_ex(exA3cnt_1:int;
84
	idInner4_A_1:int;
85
	isInner:bool)
86

    
87
returns (exA3cnt:int;
88
	idInner4_A:int);
89

    
90

    
91
var 	exA3cnt_2:int;
92
	idInner4_A_2:int;
93

    
94

    
95
let
96

    
97

    
98

    
99
	exA3cnt_2 
100
	= if (not isInner) then  exA3cnt_1  + 1
101
	 else exA3cnt_1;
102
	
103

    
104
	-- set state as inactive 
105
	idInner4_A_2
106
	 = if (not isInner) then 0 else idInner4_A_1;
107

    
108

    
109
	(exA3cnt, idInner4_A) 
110
	= (exA3cnt_2, idInner4_A_1);
111
	
112

    
113
tel
114

    
115

    
116

    
117

    
118

    
119

    
120
-- Entry action for state :A_A2
121
node A_A2_en(idInner4_A_1:int;
122
	enA2cnt_1:int;
123
	isInner:bool)
124

    
125
returns (idInner4_A:int;
126
	enA2cnt:int);
127

    
128

    
129
var 	idInner4_A_2:int;
130
	enA2cnt_2:int;
131

    
132

    
133
let
134

    
135

    
136

    
137
	-- set state as active 
138
	idInner4_A_2 
139
	= 1112;
140
	
141

    
142
	enA2cnt_2 
143
	= if (not isInner) then  enA2cnt_1  + 1
144
	 else enA2cnt_1;
145
	
146

    
147
	(idInner4_A, enA2cnt) 
148
	= (idInner4_A_2, enA2cnt_2);
149
	
150

    
151
tel
152

    
153

    
154

    
155

    
156

    
157
--During action for state :A_A2
158
node A_A2_du(duA2cnt_1:int)
159

    
160
returns (duA2cnt:int);
161

    
162

    
163
var 	duA2cnt_2:int;
164

    
165

    
166
let
167

    
168

    
169

    
170
	duA2cnt_2 
171
	=  duA2cnt_1  + 1;
172
	
173

    
174
	(duA2cnt) 
175
	= (duA2cnt_2);
176
	
177

    
178
tel
179

    
180

    
181

    
182

    
183

    
184
-- Exit action for state :A_A2
185
node A_A2_ex(exA2cnt_1:int;
186
	idInner4_A_1:int;
187
	isInner:bool)
188

    
189
returns (exA2cnt:int;
190
	idInner4_A:int);
191

    
192

    
193
var 	exA2cnt_2:int;
194
	idInner4_A_2:int;
195

    
196

    
197
let
198

    
199

    
200

    
201
	exA2cnt_2 
202
	= if (not isInner) then  exA2cnt_1  + 1
203
	 else exA2cnt_1;
204
	
205

    
206
	-- set state as inactive 
207
	idInner4_A_2
208
	 = if (not isInner) then 0 else idInner4_A_1;
209

    
210

    
211
	(exA2cnt, idInner4_A) 
212
	= (exA2cnt_2, idInner4_A_1);
213
	
214

    
215
tel
216

    
217

    
218

    
219

    
220

    
221

    
222
-- Entry action for state :A_A1
223
node A_A1_en(idInner4_A_1:int;
224
	enA1cnt_1:int;
225
	isInner:bool)
226

    
227
returns (idInner4_A:int;
228
	enA1cnt:int);
229

    
230

    
231
var 	idInner4_A_2:int;
232
	enA1cnt_2:int;
233

    
234

    
235
let
236

    
237

    
238

    
239
	-- set state as active 
240
	idInner4_A_2 
241
	= 1111;
242
	
243

    
244
	enA1cnt_2 
245
	= if (not isInner) then  enA1cnt_1  + 1
246
	 else enA1cnt_1;
247
	
248

    
249
	(idInner4_A, enA1cnt) 
250
	= (idInner4_A_2, enA1cnt_2);
251
	
252

    
253
tel
254

    
255

    
256

    
257

    
258

    
259
--During action for state :A_A1
260
node A_A1_du(duA1cnt_1:int)
261

    
262
returns (duA1cnt:int);
263

    
264

    
265
var 	duA1cnt_2:int;
266

    
267

    
268
let
269

    
270

    
271

    
272
	duA1cnt_2 
273
	=  duA1cnt_1  + 1;
274
	
275

    
276
	(duA1cnt) 
277
	= (duA1cnt_2);
278
	
279

    
280
tel
281

    
282

    
283

    
284

    
285

    
286
-- Exit action for state :A_A1
287
node A_A1_ex(exA1cnt_1:int;
288
	idInner4_A_1:int;
289
	isInner:bool)
290

    
291
returns (exA1cnt:int;
292
	idInner4_A:int);
293

    
294

    
295
var 	exA1cnt_2:int;
296
	idInner4_A_2:int;
297

    
298

    
299
let
300

    
301

    
302

    
303
	exA1cnt_2 
304
	= if (not isInner) then  exA1cnt_1  + 1
305
	 else exA1cnt_1;
306
	
307

    
308
	-- set state as inactive 
309
	idInner4_A_2
310
	 = if (not isInner) then 0 else idInner4_A_1;
311

    
312

    
313
	(exA1cnt, idInner4_A) 
314
	= (exA1cnt_2, idInner4_A_1);
315
	
316

    
317
tel
318

    
319

    
320

    
321

    
322

    
323

    
324
-- Entry action for state :Inner4_A
325
node Inner4_A_en(idInner4_A_1:int;
326
	idInner4_Inner4_1:int;
327
	enAcnt_1:int;
328
	enA1cnt_1:int;
329
	enA2cnt_1:int;
330
	enA3cnt_1:int;
331
	isInner:bool)
332

    
333
returns (idInner4_A:int;
334
	idInner4_Inner4:int;
335
	enAcnt:int;
336
	enA1cnt:int;
337
	enA2cnt:int;
338
	enA3cnt:int);
339

    
340

    
341
var 	idInner4_A_2, idInner4_A_3, idInner4_A_4, idInner4_A_5, idInner4_A_6, idInner4_A_7:int;
342
	idInner4_Inner4_2, idInner4_Inner4_3, idInner4_Inner4_4:int;
343
	enAcnt_2, enAcnt_3, enAcnt_4:int;
344
	enA1cnt_2, enA1cnt_3, enA1cnt_4, enA1cnt_5:int;
345
	enA2cnt_2, enA2cnt_3:int;
346
	enA3cnt_2, enA3cnt_3:int;
347

    
348

    
349
let
350

    
351

    
352

    
353
	-- set state as active 
354
	idInner4_Inner4_2 
355
	= 1110;
356
	
357

    
358
	enAcnt_2 
359
	= if (not isInner) then  enAcnt_1  + 1
360
	 else enAcnt_1;
361
	
362

    
363
	
364
-- transition trace :
365
	--POINT__To__A_A1_1
366
		(idInner4_A_2, enA1cnt_2) 
367
	= A_A1_en(idInner4_A_1, enA1cnt_1, false);
368
		
369

    
370
	(idInner4_A_3, idInner4_Inner4_3, enAcnt_3, enA1cnt_3) 
371
	= 
372

    
373
	if ( idInner4_A_1 = 0) then
374

    
375
	 (idInner4_A_2, idInner4_Inner4_2, enAcnt_2, enA1cnt_2)
376

    
377
	 else(idInner4_A_1, idInner4_Inner4_2, enAcnt_2, enA1cnt_1);
378

    
379
	
380

    
381
	(idInner4_A_4, enA2cnt_2) 
382
	= 
383
	if ( idInner4_A_1 = 1112) then
384
	A_A2_en(idInner4_A_1, enA2cnt_1, false)
385
	 else (idInner4_A_1, enA2cnt_1);
386

    
387
	
388

    
389
	(idInner4_A_5, enA3cnt_2) 
390
	= 
391
	if ( idInner4_A_1 = 1113) then
392
	A_A3_en(idInner4_A_1, enA3cnt_1, false)
393
	 else (idInner4_A_1, enA3cnt_1);
394

    
395
	
396

    
397
	(idInner4_A_6, enA1cnt_4) 
398
	= 
399
	if ( idInner4_A_1 = 1111) then
400
	A_A1_en(idInner4_A_1, enA1cnt_1, false)
401
	 else (idInner4_A_1, enA1cnt_1);
402

    
403
	
404

    
405
	(idInner4_A_7, idInner4_Inner4_4, enAcnt_4, enA1cnt_5, enA2cnt_3, enA3cnt_3) 
406
	= 
407
		 if ( idInner4_A_1 = 0) then 
408
		(idInner4_A_3, idInner4_Inner4_3, enAcnt_3, enA1cnt_3, enA2cnt_1, enA3cnt_1)
409
		 else
410
		 if ( idInner4_A_1 = 1112) then 
411
		(idInner4_A_4, idInner4_Inner4_3, enAcnt_3, enA1cnt_1, enA2cnt_2, enA3cnt_1)
412
		 else
413
		 if ( idInner4_A_1 = 1113) then 
414
		(idInner4_A_5, idInner4_Inner4_3, enAcnt_3, enA1cnt_1, enA2cnt_1, enA3cnt_2)
415
		 else
416
		 if ( idInner4_A_1 = 1111) then 
417
		(idInner4_A_6, idInner4_Inner4_3, enAcnt_3, enA1cnt_4, enA2cnt_1, enA3cnt_1)
418
		 else (idInner4_A_1, idInner4_Inner4_2, enAcnt_2, enA1cnt_1, enA2cnt_1, enA3cnt_1);
419

    
420

    
421
	(idInner4_A, idInner4_Inner4, enAcnt, enA1cnt, enA2cnt, enA3cnt) 
422
	= (idInner4_A_7, idInner4_Inner4_4, enAcnt_4, enA1cnt_5, enA2cnt_3, enA3cnt_3);
423
	
424

    
425
tel
426

    
427

    
428

    
429

    
430

    
431
--During action for state :Inner4_A
432
node Inner4_A_du(duAcnt_1:int)
433

    
434
returns (duAcnt:int);
435

    
436

    
437
var 	duAcnt_2:int;
438

    
439

    
440
let
441

    
442

    
443

    
444
	duAcnt_2 
445
	=  duAcnt_1  + 1;
446
	
447

    
448
	(duAcnt) 
449
	= (duAcnt_2);
450
	
451

    
452
tel
453

    
454

    
455

    
456

    
457

    
458
-- Exit action for state :Inner4_A
459
node Inner4_A_ex(exA2cnt_1:int;
460
	idInner4_A_1:int;
461
	exA3cnt_1:int;
462
	exA1cnt_1:int;
463
	exAcnt_1:int;
464
	idInner4_Inner4_1:int;
465
	isInner:bool)
466

    
467
returns (exA2cnt:int;
468
	idInner4_A:int;
469
	exA3cnt:int;
470
	exA1cnt:int;
471
	exAcnt:int;
472
	idInner4_Inner4:int);
473

    
474

    
475
var 	exA2cnt_2, exA2cnt_3:int;
476
	idInner4_A_2, idInner4_A_3, idInner4_A_4, idInner4_A_5, idInner4_A_6:int;
477
	exA3cnt_2, exA3cnt_3:int;
478
	exA1cnt_2, exA1cnt_3:int;
479
	exAcnt_2:int;
480
	idInner4_Inner4_2:int;
481

    
482

    
483
let
484

    
485

    
486

    
487
	
488
	(exA2cnt_2, idInner4_A_2) 
489
	= 
490
	if ( idInner4_A_1 = 1112) then
491
	A_A2_ex(exA2cnt_1, idInner4_A_1, false)
492
	 else (exA2cnt_1, idInner4_A_1);
493

    
494
	
495

    
496
	(exA3cnt_2, idInner4_A_3) 
497
	= 
498
	if ( idInner4_A_1 = 1113) then
499
	A_A3_ex(exA3cnt_1, idInner4_A_1, false)
500
	 else (exA3cnt_1, idInner4_A_1);
501

    
502
	
503

    
504
	(exA1cnt_2, idInner4_A_4) 
505
	= 
506
	if ( idInner4_A_1 = 1111) then
507
	A_A1_ex(exA1cnt_1, idInner4_A_1, false)
508
	 else (exA1cnt_1, idInner4_A_1);
509

    
510
	
511

    
512
	(exA2cnt_3, idInner4_A_5, exA3cnt_3, exA1cnt_3) 
513
	= 
514
		 if ( idInner4_A_1 = 1112) then 
515
		(exA2cnt_2, idInner4_A_2, exA3cnt_1, exA1cnt_1)
516
		 else
517
		 if ( idInner4_A_1 = 1113) then 
518
		(exA2cnt_1, idInner4_A_3, exA3cnt_2, exA1cnt_1)
519
		 else
520
		 if ( idInner4_A_1 = 1111) then 
521
		(exA2cnt_1, idInner4_A_4, exA3cnt_1, exA1cnt_2)
522
		 else (exA2cnt_1, idInner4_A_1, exA3cnt_1, exA1cnt_1);
523

    
524

    
525
	exAcnt_2 
526
	= if (not isInner) then  exAcnt_1  + 1
527
	 else exAcnt_1;
528
	
529

    
530
	-- set state as inactive 
531
	idInner4_Inner4_2
532
	 = if (not isInner) then 0 else idInner4_Inner4_1;
533

    
534
	idInner4_A_6 
535
	= 0;
536
	
537

    
538
	(exA2cnt, idInner4_A, exA3cnt, exA1cnt, exAcnt, idInner4_Inner4) 
539
	= (exA2cnt_3, idInner4_A_6, exA3cnt_3, exA1cnt_3, exAcnt_2, idInner4_Inner4_1);
540
	
541

    
542
tel
543

    
544

    
545
--***************************************************State :Inner4_A Automaton***************************************************
546

    
547
node Inner4_A_node(idInner4_A_1:int;
548
	enA1cnt_1:int;
549
	E:bool;
550
	exA2cnt_1:int;
551
	enA2cnt_1:int;
552
	enA3cnt_1:int;
553
	enAcnt_1:int;
554
	idInner4_Inner4_1:int;
555
	F:bool;
556
	exA3cnt_1:int;
557
	exA1cnt_1:int;
558
	duA2cnt_1:int;
559
	duA3cnt_1:int;
560
	duA1cnt_1:int)
561

    
562
returns (idInner4_A:int;
563
	enA1cnt:int;
564
	exA2cnt:int;
565
	enA2cnt:int;
566
	enA3cnt:int;
567
	enAcnt:int;
568
	idInner4_Inner4:int;
569
	exA3cnt:int;
570
	exA1cnt:int;
571
	duA2cnt:int;
572
	duA3cnt:int;
573
	duA1cnt:int);
574

    
575

    
576
let
577

    
578
	 automaton inner4_a
579

    
580
	state POINTInner4_A:
581
	unless (idInner4_A_1=0) restart POINT__TO__A_A1_1
582

    
583

    
584

    
585
	unless (idInner4_A_1=1112) and E restart A_A2__TO__INNER4_INNER4JUNCTION1114_1
586

    
587

    
588

    
589
	unless (idInner4_A_1=1112) and F restart A_A2__TO__A_A3_2
590

    
591

    
592

    
593
	unless (idInner4_A_1=1113) and E restart A_A3__TO__INNER4_INNER4JUNCTION1114_1
594

    
595

    
596

    
597
	unless (idInner4_A_1=1113) and F restart A_A3__TO__A_A1_2
598

    
599

    
600

    
601
	unless (idInner4_A_1=1111) and E restart A_A1__TO__INNER4_INNER4JUNCTION1114_1
602

    
603

    
604

    
605
	unless (idInner4_A_1=1111) and F restart A_A1__TO__A_A2_2
606

    
607

    
608

    
609
	unless (idInner4_A_1=1112) restart A_A2_IDL
610

    
611
	unless (idInner4_A_1=1113) restart A_A3_IDL
612

    
613
	unless (idInner4_A_1=1111) restart A_A1_IDL
614

    
615
	let
616

    
617
		(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt, duA2cnt, duA3cnt, duA1cnt) 
618
	= (idInner4_A_1, enA1cnt_1, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_1, exA1cnt_1, duA2cnt_1, duA3cnt_1, duA1cnt_1);
619
	
620

    
621
	tel
622

    
623

    
624

    
625
	state POINT__TO__A_A1_1:
626

    
627
	 var 	idInner4_A_2:int;
628
	enA1cnt_2:int;
629
	let
630

    
631
		-- transition trace :
632
	--POINT__To__A_A1_1
633
		(idInner4_A_2, enA1cnt_2) 
634
	= A_A1_en(idInner4_A_1, enA1cnt_1, false);
635
		
636

    
637
	(idInner4_A, enA1cnt) 
638
	=  (idInner4_A_2, enA1cnt_2);
639

    
640
	--add unused variables
641
	(duA1cnt, duA2cnt, duA3cnt, enA2cnt, enA3cnt, enAcnt, exA1cnt, exA2cnt, exA3cnt, idInner4_Inner4) 
642
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, exA1cnt_1, exA2cnt_1, exA3cnt_1, idInner4_Inner4_1);
643
	
644

    
645
	tel
646

    
647
	until true restart POINTInner4_A
648

    
649

    
650

    
651
	state A_A2__TO__INNER4_INNER4JUNCTION1114_1:
652

    
653
	 var 	idInner4_A_2, idInner4_A_3, idInner4_A_4:int;
654
	enA1cnt_2:int;
655
	exA2cnt_2:int;
656
	enA2cnt_2:int;
657
	enA3cnt_2:int;
658
	enAcnt_2:int;
659
	idInner4_Inner4_2:int;
660
	let
661

    
662
		
663

    
664
-- transition trace :
665
	--A_A2__To__Junction1114_1, Junction1114__To__Inner4_A_1
666
		(exA2cnt_2, idInner4_A_2) 
667
	= A_A2_ex(exA2cnt_1, idInner4_A_1, false);
668
		
669

    
670
		idInner4_A_3 
671
	= 0;
672
	
673
		(idInner4_A_4, idInner4_Inner4_2, enAcnt_2, enA1cnt_2, enA2cnt_2, enA3cnt_2) 
674
	= Inner4_A_en(idInner4_A_3, idInner4_Inner4_1, enAcnt_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, true);
675
		
676

    
677
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4) 
678
	=  (idInner4_A_4, enA1cnt_2, exA2cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_Inner4_2);
679

    
680
	--add unused variables
681
	(duA1cnt, duA2cnt, duA3cnt, exA1cnt, exA3cnt) 
682
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1, exA3cnt_1);
683
	
684

    
685
	tel
686

    
687
	until true restart POINTInner4_A
688

    
689

    
690

    
691
	state A_A2__TO__A_A3_2:
692

    
693
	 var 	idInner4_A_2, idInner4_A_3:int;
694
	exA2cnt_2:int;
695
	enA3cnt_2:int;
696
	let
697

    
698
		-- transition trace :
699
	--A_A2__To__A_A3_2
700
		(exA2cnt_2, idInner4_A_2) 
701
	= A_A2_ex(exA2cnt_1, idInner4_A_1, false);
702
		
703

    
704
		(idInner4_A_3, enA3cnt_2) 
705
	= A_A3_en(idInner4_A_2, enA3cnt_1, false);
706
		
707

    
708
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4) 
709
	=  (idInner4_A_3, enA1cnt_1, exA2cnt_2, enA2cnt_1, enA3cnt_2, enAcnt_1, idInner4_Inner4_1);
710

    
711
	--add unused variables
712
	(duA1cnt, duA2cnt, duA3cnt, exA1cnt, exA3cnt) 
713
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1, exA3cnt_1);
714
	
715

    
716
	tel
717

    
718
	until true restart POINTInner4_A
719

    
720

    
721

    
722
	state A_A3__TO__INNER4_INNER4JUNCTION1114_1:
723

    
724
	 var 	idInner4_A_2, idInner4_A_3, idInner4_A_4:int;
725
	enA1cnt_2:int;
726
	enA2cnt_2:int;
727
	enA3cnt_2:int;
728
	enAcnt_2:int;
729
	idInner4_Inner4_2:int;
730
	exA3cnt_2:int;
731
	let
732

    
733
		
734

    
735
-- transition trace :
736
	--A_A3__To__Junction1114_1, Junction1114__To__Inner4_A_1
737
		(exA3cnt_2, idInner4_A_2) 
738
	= A_A3_ex(exA3cnt_1, idInner4_A_1, false);
739
		
740

    
741
		idInner4_A_3 
742
	= 0;
743
	
744
		(idInner4_A_4, idInner4_Inner4_2, enAcnt_2, enA1cnt_2, enA2cnt_2, enA3cnt_2) 
745
	= Inner4_A_en(idInner4_A_3, idInner4_Inner4_1, enAcnt_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, true);
746
		
747

    
748
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt) 
749
	=  (idInner4_A_4, enA1cnt_2, exA2cnt_1, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_Inner4_2, exA3cnt_2);
750

    
751
	--add unused variables
752
	(duA1cnt, duA2cnt, duA3cnt, exA1cnt) 
753
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1);
754
	
755

    
756
	tel
757

    
758
	until true restart POINTInner4_A
759

    
760

    
761

    
762
	state A_A3__TO__A_A1_2:
763

    
764
	 var 	idInner4_A_2, idInner4_A_3:int;
765
	enA1cnt_2:int;
766
	exA3cnt_2:int;
767
	let
768

    
769
		-- transition trace :
770
	--A_A3__To__A_A1_2
771
		(exA3cnt_2, idInner4_A_2) 
772
	= A_A3_ex(exA3cnt_1, idInner4_A_1, false);
773
		
774

    
775
		(idInner4_A_3, enA1cnt_2) 
776
	= A_A1_en(idInner4_A_2, enA1cnt_1, false);
777
		
778

    
779
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt) 
780
	=  (idInner4_A_3, enA1cnt_2, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_2);
781

    
782
	--add unused variables
783
	(duA1cnt, duA2cnt, duA3cnt, exA1cnt) 
784
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1);
785
	
786

    
787
	tel
788

    
789
	until true restart POINTInner4_A
790

    
791

    
792

    
793
	state A_A1__TO__INNER4_INNER4JUNCTION1114_1:
794

    
795
	 var 	idInner4_A_2, idInner4_A_3, idInner4_A_4:int;
796
	enA1cnt_2:int;
797
	enA2cnt_2:int;
798
	enA3cnt_2:int;
799
	enAcnt_2:int;
800
	idInner4_Inner4_2:int;
801
	exA1cnt_2:int;
802
	let
803

    
804
		
805

    
806
-- transition trace :
807
	--A_A1__To__Junction1114_1, Junction1114__To__Inner4_A_1
808
		(exA1cnt_2, idInner4_A_2) 
809
	= A_A1_ex(exA1cnt_1, idInner4_A_1, false);
810
		
811

    
812
		idInner4_A_3 
813
	= 0;
814
	
815
		(idInner4_A_4, idInner4_Inner4_2, enAcnt_2, enA1cnt_2, enA2cnt_2, enA3cnt_2) 
816
	= Inner4_A_en(idInner4_A_3, idInner4_Inner4_1, enAcnt_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, true);
817
		
818

    
819
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt) 
820
	=  (idInner4_A_4, enA1cnt_2, exA2cnt_1, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_Inner4_2, exA3cnt_1, exA1cnt_2);
821

    
822
	--add unused variables
823
	(duA1cnt, duA2cnt, duA3cnt) 
824
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1);
825
	
826

    
827
	tel
828

    
829
	until true restart POINTInner4_A
830

    
831

    
832

    
833
	state A_A1__TO__A_A2_2:
834

    
835
	 var 	idInner4_A_2, idInner4_A_3:int;
836
	enA2cnt_2:int;
837
	exA1cnt_2:int;
838
	let
839

    
840
		-- transition trace :
841
	--A_A1__To__A_A2_2
842
		(exA1cnt_2, idInner4_A_2) 
843
	= A_A1_ex(exA1cnt_1, idInner4_A_1, false);
844
		
845

    
846
		(idInner4_A_3, enA2cnt_2) 
847
	= A_A2_en(idInner4_A_2, enA2cnt_1, false);
848
		
849

    
850
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt) 
851
	=  (idInner4_A_3, enA1cnt_1, exA2cnt_1, enA2cnt_2, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_1, exA1cnt_2);
852

    
853
	--add unused variables
854
	(duA1cnt, duA2cnt, duA3cnt) 
855
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1);
856
	
857

    
858
	tel
859

    
860
	until true restart POINTInner4_A
861

    
862

    
863

    
864
	state A_A2_IDL:
865

    
866
	 var 	duA2cnt_2:int;
867
	let
868

    
869
		
870
	(duA2cnt_2) 
871
	= A_A2_du(duA2cnt_1);
872

    
873
		
874

    
875

    
876
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt, duA2cnt) 
877
	= (idInner4_A_1, enA1cnt_1, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_1, exA1cnt_1, duA2cnt_2);
878
	
879
	--add unused variables
880
	(duA1cnt, duA3cnt) 
881
	= (duA1cnt_1, duA3cnt_1);
882
	
883

    
884
	tel
885

    
886
	until true restart POINTInner4_A
887

    
888

    
889

    
890
	state A_A3_IDL:
891

    
892
	 var 	duA3cnt_2:int;
893
	let
894

    
895
		
896
	(duA3cnt_2) 
897
	= A_A3_du(duA3cnt_1);
898

    
899
		
900

    
901

    
902
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt, duA2cnt, duA3cnt) 
903
	= (idInner4_A_1, enA1cnt_1, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_1, exA1cnt_1, duA2cnt_1, duA3cnt_2);
904
	
905
	--add unused variables
906
	(duA1cnt) 
907
	= (duA1cnt_1);
908
	
909

    
910
	tel
911

    
912
	until true restart POINTInner4_A
913

    
914

    
915

    
916
	state A_A1_IDL:
917

    
918
	 var 	duA1cnt_2:int;
919
	let
920

    
921
		
922
	(duA1cnt_2) 
923
	= A_A1_du(duA1cnt_1);
924

    
925
		
926

    
927

    
928
	(idInner4_A, enA1cnt, exA2cnt, enA2cnt, enA3cnt, enAcnt, idInner4_Inner4, exA3cnt, exA1cnt, duA2cnt, duA3cnt, duA1cnt) 
929
	= (idInner4_A_1, enA1cnt_1, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, exA3cnt_1, exA1cnt_1, duA2cnt_1, duA3cnt_1, duA1cnt_2);
930
	
931

    
932
	tel
933

    
934
	until true restart POINTInner4_A
935

    
936

    
937

    
938
tel
939

    
940

    
941
--***************************************************State :Inner4_Inner4 Automaton***************************************************
942

    
943
node Inner4_Inner4_node(idInner4_Inner4_1:int;
944
	enA1cnt_1:int;
945
	enA2cnt_1:int;
946
	enA3cnt_1:int;
947
	enAcnt_1:int;
948
	idInner4_A_1:int;
949
	duAcnt_1:int;
950
	E:bool;
951
	F:bool;
952
	duA1cnt_1:int;
953
	duA2cnt_1:int;
954
	duA3cnt_1:int;
955
	exA1cnt_1:int;
956
	exA2cnt_1:int;
957
	exA3cnt_1:int)
958

    
959
returns (idInner4_Inner4:int;
960
	enA1cnt:int;
961
	enA2cnt:int;
962
	enA3cnt:int;
963
	enAcnt:int;
964
	idInner4_A:int;
965
	duAcnt:int;
966
	duA1cnt:int;
967
	duA2cnt:int;
968
	duA3cnt:int;
969
	exA1cnt:int;
970
	exA2cnt:int;
971
	exA3cnt:int);
972

    
973

    
974
let
975

    
976
	 automaton inner4_inner4
977

    
978
	state POINTInner4_Inner4:
979
	unless (idInner4_Inner4_1=0) restart POINT__TO__INNER4_A_1
980

    
981

    
982

    
983
	unless (idInner4_Inner4_1=1110) restart INNER4_A_IDL
984

    
985
	let
986

    
987
		(idInner4_Inner4, enA1cnt, enA2cnt, enA3cnt, enAcnt, idInner4_A, duAcnt, duA1cnt, duA2cnt, duA3cnt, exA1cnt, exA2cnt, exA3cnt) 
988
	= (idInner4_Inner4_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_A_1, duAcnt_1, duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1, exA2cnt_1, exA3cnt_1);
989
	
990

    
991
	tel
992

    
993

    
994

    
995
	state POINT__TO__INNER4_A_1:
996

    
997
	 var 	idInner4_Inner4_2:int;
998
	enA1cnt_2:int;
999
	enA2cnt_2:int;
1000
	enA3cnt_2:int;
1001
	enAcnt_2:int;
1002
	idInner4_A_2:int;
1003
	let
1004

    
1005
		-- transition trace :
1006
	--POINT__To__Inner4_A_1
1007
		(idInner4_A_2, idInner4_Inner4_2, enAcnt_2, enA1cnt_2, enA2cnt_2, enA3cnt_2) 
1008
	= Inner4_A_en(idInner4_A_1, idInner4_Inner4_1, enAcnt_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, false);
1009
		
1010

    
1011
	(idInner4_Inner4, enA1cnt, enA2cnt, enA3cnt, enAcnt, idInner4_A) 
1012
	=  (idInner4_Inner4_2, enA1cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_A_2);
1013

    
1014
	--add unused variables
1015
	(duA1cnt, duA2cnt, duA3cnt, duAcnt, exA1cnt, exA2cnt, exA3cnt) 
1016
	= (duA1cnt_1, duA2cnt_1, duA3cnt_1, duAcnt_1, exA1cnt_1, exA2cnt_1, exA3cnt_1);
1017
	
1018

    
1019
	tel
1020

    
1021
	until true restart POINTInner4_Inner4
1022

    
1023

    
1024

    
1025
	state INNER4_A_IDL:
1026

    
1027
	 var 	idInner4_Inner4_2:int;
1028
	enA1cnt_2:int;
1029
	enA2cnt_2:int;
1030
	enA3cnt_2:int;
1031
	enAcnt_2:int;
1032
	idInner4_A_2:int;
1033
	duAcnt_2:int;
1034
	duA1cnt_2:int;
1035
	duA2cnt_2:int;
1036
	duA3cnt_2:int;
1037
	exA1cnt_2:int;
1038
	exA2cnt_2:int;
1039
	exA3cnt_2:int;
1040
	let
1041

    
1042
		
1043
	(duAcnt_2) 
1044
	= Inner4_A_du(duAcnt_1);
1045

    
1046
		
1047

    
1048
	(idInner4_A_2, enA1cnt_2, exA2cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_Inner4_2, exA3cnt_2, exA1cnt_2, duA2cnt_2, duA3cnt_2, duA1cnt_2) 
1049
	= Inner4_A_node(idInner4_A_1, enA1cnt_1, E, exA2cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_Inner4_1, F, exA3cnt_1, exA1cnt_1, duA2cnt_1, duA3cnt_1, duA1cnt_1);
1050

    
1051
		
1052

    
1053

    
1054
	(idInner4_Inner4, enA1cnt, enA2cnt, enA3cnt, enAcnt, idInner4_A, duAcnt, duA1cnt, duA2cnt, duA3cnt, exA1cnt, exA2cnt, exA3cnt) 
1055
	= (idInner4_Inner4_2, enA1cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_A_2, duAcnt_2, duA1cnt_2, duA2cnt_2, duA3cnt_2, exA1cnt_2, exA2cnt_2, exA3cnt_2);
1056
	
1057

    
1058
	tel
1059

    
1060
	until true restart POINTInner4_Inner4
1061

    
1062

    
1063

    
1064
tel
1065

    
1066

    
1067
--***************************************************State :Inner4_Inner4 Automaton***************************************************
1068

    
1069
node Inner4_Inner4(E:bool;
1070
	F:bool)
1071

    
1072
returns (exAcnt:int;
1073
	enAcnt:int;
1074
	duAcnt:int;
1075
	enA1cnt:int;
1076
	duA1cnt:int;
1077
	exA1cnt:int;
1078
	enA2cnt:int;
1079
	duA2cnt:int;
1080
	exA2cnt:int;
1081
	enA3cnt:int;
1082
	duA3cnt:int;
1083
	exA3cnt:int);
1084

    
1085

    
1086
var exAcnt_1: int;
1087

    
1088
	enAcnt_1: int;
1089

    
1090
	duAcnt_1: int;
1091

    
1092
	enA1cnt_1: int;
1093

    
1094
	duA1cnt_1: int;
1095

    
1096
	exA1cnt_1: int;
1097

    
1098
	enA2cnt_1: int;
1099

    
1100
	duA2cnt_1: int;
1101

    
1102
	exA2cnt_1: int;
1103

    
1104
	enA3cnt_1: int;
1105

    
1106
	duA3cnt_1: int;
1107

    
1108
	exA3cnt_1: int;
1109

    
1110
	idInner4_Inner4, idInner4_Inner4_1: int;
1111

    
1112
	idInner4_A, idInner4_A_1: int;
1113

    
1114
		idInner4_Inner4_2:int;
1115
	enA1cnt_2:int;
1116
	enA2cnt_2:int;
1117
	enA3cnt_2:int;
1118
	enAcnt_2:int;
1119
	idInner4_A_2:int;
1120
	duAcnt_2:int;
1121
	duA1cnt_2:int;
1122
	duA2cnt_2:int;
1123
	duA3cnt_2:int;
1124
	exA1cnt_2:int;
1125
	exA2cnt_2:int;
1126
	exA3cnt_2:int;
1127
let
1128

    
1129
	exAcnt_1 = 0 -> pre exAcnt;
1130

    
1131
	enAcnt_1 = 0 -> pre enAcnt;
1132

    
1133
	duAcnt_1 = 0 -> pre duAcnt;
1134

    
1135
	enA1cnt_1 = 0 -> pre enA1cnt;
1136

    
1137
	duA1cnt_1 = 0 -> pre duA1cnt;
1138

    
1139
	exA1cnt_1 = 0 -> pre exA1cnt;
1140

    
1141
	enA2cnt_1 = 0 -> pre enA2cnt;
1142

    
1143
	duA2cnt_1 = 0 -> pre duA2cnt;
1144

    
1145
	exA2cnt_1 = 0 -> pre exA2cnt;
1146

    
1147
	enA3cnt_1 = 0 -> pre enA3cnt;
1148

    
1149
	duA3cnt_1 = 0 -> pre duA3cnt;
1150

    
1151
	exA3cnt_1 = 0 -> pre exA3cnt;
1152

    
1153
	idInner4_Inner4_1 = 0 -> pre idInner4_Inner4;
1154

    
1155
	idInner4_A_1 = 0 -> pre idInner4_A;
1156

    
1157
	
1158

    
1159

    
1160

    
1161
	(idInner4_Inner4_2, enA1cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_A_2, duAcnt_2, duA1cnt_2, duA2cnt_2, duA3cnt_2, exA1cnt_2, exA2cnt_2, exA3cnt_2)
1162
	 = 
1163

    
1164
	 if E then Inner4_Inner4_node(idInner4_Inner4_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_A_1, duAcnt_1, E, false, duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1, exA2cnt_1, exA3cnt_1)
1165

    
1166
	 else (idInner4_Inner4_1, enA1cnt_1, enA2cnt_1, enA3cnt_1, enAcnt_1, idInner4_A_1, duAcnt_1, duA1cnt_1, duA2cnt_1, duA3cnt_1, exA1cnt_1, exA2cnt_1, exA3cnt_1);
1167

    
1168
	
1169

    
1170

    
1171

    
1172
	(idInner4_Inner4, enA1cnt, enA2cnt, enA3cnt, enAcnt, idInner4_A, duAcnt, duA1cnt, duA2cnt, duA3cnt, exA1cnt, exA2cnt, exA3cnt)
1173
	 = 
1174

    
1175
	 if F then Inner4_Inner4_node(idInner4_Inner4_2, enA1cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_A_2, duAcnt_2, false, F, duA1cnt_2, duA2cnt_2, duA3cnt_2, exA1cnt_2, exA2cnt_2, exA3cnt_2)
1176

    
1177
	 else (idInner4_Inner4_2, enA1cnt_2, enA2cnt_2, enA3cnt_2, enAcnt_2, idInner4_A_2, duAcnt_2, duA1cnt_2, duA2cnt_2, duA3cnt_2, exA1cnt_2, exA2cnt_2, exA3cnt_2);
1178

    
1179
	
1180

    
1181

    
1182
--unused outputs
1183
	exAcnt = 0;
1184

    
1185
	
1186

    
1187
tel
1188

    
1189

    
1190

    
1191
node Inner4 (E_1_1 : real; F_1_1 : real)
1192
returns (exAcnt_1_1 : int;
1193
	enAcnt_2_1 : int;
1194
	duAcnt_3_1 : int;
1195
	enA1cnt_4_1 : int;
1196
	duA1cnt_5_1 : int;
1197
	exA1cnt_6_1 : int;
1198
	enA2cnt_7_1 : int;
1199
	duA2cnt_8_1 : int;
1200
	exA2cnt_9_1 : int;
1201
	enA3cnt_10_1 : int;
1202
	duA3cnt_11_1 : int;
1203
	exA3cnt_12_1 : int); 
1204
var
1205
	Inner4_1_1 : int; Inner4_2_1 : int; Inner4_3_1 : int; Inner4_4_1 : int; Inner4_5_1 : int; Inner4_6_1 : int; Inner4_7_1 : int; Inner4_8_1 : int; Inner4_9_1 : int; Inner4_10_1 : int; Inner4_11_1 : int; Inner4_12_1 : int;
1206
	Mux_1_1 : real; Mux_1_2 : real;
1207
	i_virtual_local : real;
1208
	Inner4Mux_1_1_event: bool;
1209
	Inner4Mux_1_2_event: bool;
1210
let 
1211
	Inner4Mux_1_1_event = false -> ((pre(Mux_1_1) > 0.0 and Mux_1_1 <= 0.0) or (pre(Mux_1_1) <= 0.0 and Mux_1_1 > 0.0));
1212
	Inner4Mux_1_2_event = false -> ((pre(Mux_1_2) > 0.0 and Mux_1_2 <= 0.0) or (pre(Mux_1_2) <= 0.0 and Mux_1_2 > 0.0));
1213
	(Inner4_1_1, Inner4_2_1, Inner4_3_1, Inner4_4_1, Inner4_5_1, Inner4_6_1, Inner4_7_1, Inner4_8_1, Inner4_9_1, Inner4_10_1, Inner4_11_1, Inner4_12_1) =  Inner4_Inner4(Inner4Mux_1_1_event, Inner4Mux_1_2_event);
1214
	Mux_1_1 = E_1_1 ;
1215
	Mux_1_2 = F_1_1 ;
1216
	exAcnt_1_1 = Inner4_1_1;
1217
	enAcnt_2_1 = Inner4_2_1;
1218
	duAcnt_3_1 = Inner4_3_1;
1219
	enA1cnt_4_1 = Inner4_4_1;
1220
	duA1cnt_5_1 = Inner4_5_1;
1221
	exA1cnt_6_1 = Inner4_6_1;
1222
	enA2cnt_7_1 = Inner4_7_1;
1223
	duA2cnt_8_1 = Inner4_8_1;
1224
	exA2cnt_9_1 = Inner4_9_1;
1225
	enA3cnt_10_1 = Inner4_10_1;
1226
	duA3cnt_11_1 = Inner4_11_1;
1227
	exA3cnt_12_1 = Inner4_12_1;
1228
	i_virtual_local= 0.0 -> 1.0;
1229
tel
1230