Project

General

Profile

Download (4.31 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by cocoSim
2

    
3

    
4
-- System nodes
5

    
6

    
7

    
8

    
9
node Flowchart4_A__To__Flowchart4_Flowchart4Junction799_1_Condition_Action(x_1:int)
10

    
11
returns (x:int);
12

    
13

    
14
var 	x_2:int;
15

    
16

    
17
let
18

    
19

    
20

    
21
	x_2 
22
	=  x_1  + 1;
23
	
24

    
25
	(x) 
26
	= (x_2);
27
	
28

    
29
tel
30

    
31

    
32

    
33

    
34

    
35

    
36
-- Entry action for state :Flowchart4_A
37
node Flowchart4_A_en(idFlowchart4_A_1:int;
38
	idFlowchart4_Flowchart4_1:int;
39
	isInner:bool)
40

    
41
returns (idFlowchart4_A:int;
42
	idFlowchart4_Flowchart4:int);
43

    
44

    
45
var 	idFlowchart4_A_2:int;
46
	idFlowchart4_Flowchart4_2:int;
47

    
48

    
49
let
50

    
51

    
52

    
53
	-- set state as active 
54
	idFlowchart4_Flowchart4_2 
55
	= 798;
56
	
57

    
58
	-- case of state without states but contains transitions 
59
	idFlowchart4_A_2 
60
	= -1;
61
	
62

    
63
	(idFlowchart4_A, idFlowchart4_Flowchart4) 
64
	= (idFlowchart4_A_2, idFlowchart4_Flowchart4_2);
65
	
66

    
67
tel
68

    
69

    
70

    
71

    
72

    
73
-- Exit action for state :Flowchart4_A
74
node Flowchart4_A_ex(idFlowchart4_Flowchart4_1:int;
75
	isInner:bool)
76

    
77
returns (idFlowchart4_Flowchart4:int);
78

    
79

    
80
var 	idFlowchart4_Flowchart4_2:int;
81

    
82

    
83
let
84

    
85

    
86

    
87
	-- set state as inactive 
88
	idFlowchart4_Flowchart4_2
89
	 = if (not isInner) then 0 else idFlowchart4_Flowchart4_1;
90

    
91

    
92
	(idFlowchart4_Flowchart4) 
93
	= (idFlowchart4_Flowchart4_1);
94
	
95

    
96
tel
97

    
98

    
99

    
100

    
101

    
102
--During action for state :Flowchart4_A
103
node Flowchart4_A_du(x_1:int)
104

    
105
returns (x:int);
106

    
107

    
108

    
109

    
110
let
111

    
112

    
113

    
114
		 automaton flowchart4_a_INNER
115

    
116
	state POINTFlowchart4_A_INNER:
117
	unless true restart FLOWCHART4_A__TO__FLOWCHART4_FLOWCHART4JUNCTION799_1
118

    
119

    
120

    
121
	let
122

    
123
		(x) 
124
	= (x_1);
125
	
126

    
127
	tel
128

    
129

    
130

    
131
	state FLOWCHART4_A__TO__FLOWCHART4_FLOWCHART4JUNCTION799_1:
132

    
133
	 var 	x_2:int;
134
	let
135

    
136
		-- transition trace :
137
	--Flowchart4_A__To__Junction799_1
138
		-- condition Action : x++;
139
		
140
		(x_2) 
141
	= Flowchart4_A__To__Flowchart4_Flowchart4Junction799_1_Condition_Action(x_1);
142
		
143

    
144
	(x) 
145
	=  (x_2);
146

    
147

    
148
	tel
149

    
150
	until true restart POINTFlowchart4_A_INNER
151

    
152

    
153

    
154
tel
155

    
156

    
157
--***************************************************State :Flowchart4_A Automaton***************************************************
158

    
159
node Flowchart4_A_node(idFlowchart4_A_1:int)
160

    
161
returns (idFlowchart4_A:int);
162

    
163

    
164
let
165

    
166
	 automaton flowchart4_a
167

    
168
	state POINTFlowchart4_A:
169
	let
170

    
171
		(idFlowchart4_A) 
172
	= (idFlowchart4_A_1);
173
	
174

    
175
	tel
176

    
177

    
178

    
179
tel
180

    
181

    
182
--***************************************************State :Flowchart4_Flowchart4 Automaton***************************************************
183

    
184
node Flowchart4_Flowchart4_node(idFlowchart4_Flowchart4_1:int;
185
	idFlowchart4_A_1:int;
186
	x_1:int)
187

    
188
returns (idFlowchart4_Flowchart4:int;
189
	idFlowchart4_A:int;
190
	x:int);
191

    
192

    
193
let
194

    
195
	 automaton flowchart4_flowchart4
196

    
197
	state POINTFlowchart4_Flowchart4:
198
	unless (idFlowchart4_Flowchart4_1=0) restart POINT__TO__FLOWCHART4_A_1
199

    
200

    
201

    
202
	unless (idFlowchart4_Flowchart4_1=798) restart FLOWCHART4_A_IDL
203

    
204
	let
205

    
206
		(idFlowchart4_Flowchart4, idFlowchart4_A, x) 
207
	= (idFlowchart4_Flowchart4_1, idFlowchart4_A_1, x_1);
208
	
209

    
210
	tel
211

    
212

    
213

    
214
	state POINT__TO__FLOWCHART4_A_1:
215

    
216
	 var 	idFlowchart4_Flowchart4_2:int;
217
	idFlowchart4_A_2:int;
218
	let
219

    
220
		-- transition trace :
221
	--POINT__To__Flowchart4_A_1
222
		(idFlowchart4_A_2, idFlowchart4_Flowchart4_2) 
223
	= Flowchart4_A_en(idFlowchart4_A_1, idFlowchart4_Flowchart4_1, false);
224
		
225

    
226
	(idFlowchart4_Flowchart4, idFlowchart4_A) 
227
	=  (idFlowchart4_Flowchart4_2, idFlowchart4_A_2);
228

    
229
	--add unused variables
230
	(x) 
231
	= (x_1);
232
	
233

    
234
	tel
235

    
236
	until true restart POINTFlowchart4_Flowchart4
237

    
238

    
239

    
240
	state FLOWCHART4_A_IDL:
241

    
242
	 var 	idFlowchart4_A_2:int;
243
	x_2:int;
244
	let
245

    
246
		
247
	(x_2) 
248
	= Flowchart4_A_du(x_1);
249

    
250
		
251

    
252
	(idFlowchart4_A_2) 
253
	= Flowchart4_A_node(idFlowchart4_A_1);
254

    
255
		
256

    
257

    
258
	(idFlowchart4_Flowchart4, idFlowchart4_A, x) 
259
	= (idFlowchart4_Flowchart4_1, idFlowchart4_A_2, x_2);
260
	
261

    
262
	tel
263

    
264
	until true restart POINTFlowchart4_Flowchart4
265

    
266

    
267

    
268
tel
269

    
270

    
271
--***************************************************State :Flowchart4_Flowchart4 Automaton***************************************************
272

    
273
node Flowchart4_Flowchart4(noInput :bool)
274

    
275
returns (x:int);
276

    
277

    
278
var x_1: int;
279

    
280
	idFlowchart4_Flowchart4, idFlowchart4_Flowchart4_1: int;
281

    
282
	idFlowchart4_A, idFlowchart4_A_1: int;
283

    
284
	let
285

    
286
	x_1 = 0 -> pre x;
287

    
288
	idFlowchart4_Flowchart4_1 = 0 -> pre idFlowchart4_Flowchart4;
289

    
290
	idFlowchart4_A_1 = 0 -> pre idFlowchart4_A;
291

    
292
	
293

    
294

    
295

    
296
	(idFlowchart4_Flowchart4, idFlowchart4_A, x)
297
	 = Flowchart4_Flowchart4_node(idFlowchart4_Flowchart4_1, idFlowchart4_A_1, x_1);
298

    
299

    
300
--unused outputs
301
	
302

    
303
tel
304

    
305

    
306

    
307
node Flowchart4 (i_virtual : real)
308
returns (Out1_1_1 : int); 
309
var
310
	Flowchart4_1_1 : int;
311
	i_virtual_local : real;
312
let 
313
	Flowchart4_1_1 =  Flowchart4_Flowchart4(true);
314
	Out1_1_1 = Flowchart4_1_1;
315
	i_virtual_local= 0.0 -> 1.0;
316
tel
317

    
(1-1/4)