Project

General

Profile

Revision b58cc410 regression_tests/lustre_files/success/Simulink/src_many_files/if_multi_test_PP.LUSTREC.lus

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/if_multi_test_PP.LUSTREC.lus
1 1
-- This file has been generated by CoCoSim2.
2 2

  
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:06:06
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 19-Mar-2019 21:17:11
5 5
(*
6 6
Original block name: if_multi_test_PP/IfActionSubsystem4
7 7
*)
8
node  IfActionSubsystem4_74_009_automaton(In2_1 : real;
8
node  IfActionSubsystem4_9_015_condExecSS(In2_1 : real;
9 9
	In2_2 : real;
10 10
	In2_3 : real;
11 11
	In3_1 : bool;
......
30 30
	pre_Out4_1 : bool;
31 31
	pre_Out4_2 : bool;
32 32
	pre_Out4_3 : bool;
33
	_isEnabled_clock : bool clock;
33 34
let
34 35
	pre_Out2_1 = if (__nb_step > 0) then
35 36
		(pre Out2_1)
......
42 43
	    else false;
43 44
	pre_Out3_1 = if (__nb_step > 0) then
44 45
		(pre Out3_1)
45
	    else 0.000000000000000;
46
	    else 0.0;
46 47
	pre_Out3_2 = if (__nb_step > 0) then
47 48
		(pre Out3_2)
48
	    else 0.000000000000000;
49
	    else 0.0;
49 50
	pre_Out3_3 = if (__nb_step > 0) then
50 51
		(pre Out3_3)
51
	    else 0.000000000000000;
52
	    else 0.0;
52 53
	pre_Out4_1 = if (__nb_step > 0) then
53 54
		(pre Out4_1)
54 55
	    else false;
......
58 59
	pre_Out4_3 = if (__nb_step > 0) then
59 60
		(pre Out4_3)
60 61
	    else false;
61
	automaton enabled_IfActionSubsystem4_74_009
62
	state Active_IfActionSubsystem4_74_009:
63
	unless (not _isEnabled) restart Inactive_IfActionSubsystem4_74_009
64
	let
65
		(Out2_1, Out2_2, Out2_3, Out3_1, Out3_2, Out3_3, Out4_1, Out4_2, Out4_3) = IfActionSubsystem4_74_009(In2_1, In2_2, In2_3, In3_1, __time_step, __nb_step);
66
	tel
67

  
68
	state Inactive_IfActionSubsystem4_74_009:
69
	unless _isEnabled resume Active_IfActionSubsystem4_74_009
70
	let
71
		Out2_1 = pre_Out2_1;
72
		Out2_2 = pre_Out2_2;
73
		Out2_3 = pre_Out2_3;
74
		Out3_1 = pre_Out3_1;
75
		Out3_2 = pre_Out3_2;
76
		Out3_3 = pre_Out3_3;
77
		Out4_1 = pre_Out4_1;
78
		Out4_2 = pre_Out4_2;
79
		Out4_3 = pre_Out4_3;
80
	tel
81

  
82

  
62
	_isEnabled_clock = _isEnabled;
63
	(Out2_1, Out2_2, Out2_3, Out3_1, Out3_2, Out3_3, Out4_1, Out4_2, Out4_3) = (merge _isEnabled_clock 
64
		(true -> IfActionSubsystem4_9_015((In2_1 when _isEnabled_clock), (In2_2 when _isEnabled_clock), (In2_3 when _isEnabled_clock), (In3_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
65
		(false -> (pre_Out2_1, pre_Out2_2, pre_Out2_3, pre_Out3_1, pre_Out3_2, pre_Out3_3, pre_Out4_1, pre_Out4_2, pre_Out4_3) when false(_isEnabled_clock)));
83 66
tel
84 67

  
85 68
(*
86 69
Original block name: if_multi_test_PP/IfActionSubsystem4
87 70
*)
88
node  IfActionSubsystem4_74_009(In2_1 : real;
71
node  IfActionSubsystem4_9_015(In2_1 : real;
89 72
	In2_2 : real;
90 73
	In2_3 : real;
91 74
	In3_1 : bool;
......
127 110
(*
128 111
Original block name: if_multi_test_PP/IfActionSubsystem5
129 112
*)
130
node  IfActionSubsystem5_93_008_automaton(In1_1 : real;
113
node  IfActionSubsystem5_28_018_condExecSS(In1_1 : real;
131 114
	In1_2 : real;
132 115
	In1_3 : real;
133 116
	_isEnabled : bool;
......
139 122
var pre_Out1_1 : real;
140 123
	pre_Out1_2 : real;
141 124
	pre_Out1_3 : real;
125
	_isEnabled_clock : bool clock;
142 126
let
143 127
	pre_Out1_1 = if (__nb_step > 0) then
144 128
		(pre Out1_1)
145
	    else 0.000000000000000;
129
	    else 0.0;
146 130
	pre_Out1_2 = if (__nb_step > 0) then
147 131
		(pre Out1_2)
148
	    else 0.000000000000000;
132
	    else 0.0;
149 133
	pre_Out1_3 = if (__nb_step > 0) then
150 134
		(pre Out1_3)
151
	    else 0.000000000000000;
152
	automaton enabled_IfActionSubsystem5_93_008
153
	state Active_IfActionSubsystem5_93_008:
154
	unless (not _isEnabled) restart Inactive_IfActionSubsystem5_93_008
155
	let
156
		(Out1_1, Out1_2, Out1_3) = IfActionSubsystem5_93_008(In1_1, In1_2, In1_3, __time_step, __nb_step);
157
	tel
158

  
159
	state Inactive_IfActionSubsystem5_93_008:
160
	unless _isEnabled resume Active_IfActionSubsystem5_93_008
161
	let
162
		Out1_1 = pre_Out1_1;
163
		Out1_2 = pre_Out1_2;
164
		Out1_3 = pre_Out1_3;
165
	tel
166

  
167

  
135
	    else 0.0;
136
	_isEnabled_clock = _isEnabled;
137
	(Out1_1, Out1_2, Out1_3) = (merge _isEnabled_clock 
138
		(true -> IfActionSubsystem5_28_018((In1_1 when _isEnabled_clock), (In1_2 when _isEnabled_clock), (In1_3 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
139
		(false -> (pre_Out1_1, pre_Out1_2, pre_Out1_3) when false(_isEnabled_clock)));
168 140
tel
169 141

  
170 142
(*
171 143
Original block name: if_multi_test_PP/IfActionSubsystem5
172 144
*)
173
node  IfActionSubsystem5_93_008(In1_1 : real;
145
node  IfActionSubsystem5_28_018(In1_1 : real;
174 146
	In1_2 : real;
175 147
	In1_3 : real;
176 148
	__time_step : real;
......
187 159
(*
188 160
Original block name: if_multi_test_PP/IfActionSubsystem6
189 161
*)
190
node  IfActionSubsystem6_98_007_automaton(In1_1 : bool;
162
node  IfActionSubsystem6_33_026_condExecSS(In1_1 : bool;
191 163
	_isEnabled : bool;
192 164
	__time_step : real;
193 165
	__nb_step : int;)
194 166
returns(Out1_1 : bool;);
195 167
var pre_Out1_1 : bool;
168
	_isEnabled_clock : bool clock;
196 169
let
197 170
	pre_Out1_1 = if (__nb_step > 0) then
198 171
		(pre Out1_1)
199 172
	    else false;
200
	automaton enabled_IfActionSubsystem6_98_007
201
	state Active_IfActionSubsystem6_98_007:
202
	unless (not _isEnabled) restart Inactive_IfActionSubsystem6_98_007
203
	let
204
		Out1_1 = IfActionSubsystem6_98_007(In1_1, __time_step, __nb_step);
205
	tel
206

  
207
	state Inactive_IfActionSubsystem6_98_007:
208
	unless _isEnabled resume Active_IfActionSubsystem6_98_007
209
	let
210
		Out1_1 = pre_Out1_1;
211
	tel
212

  
213

  
173
	_isEnabled_clock = _isEnabled;
174
	Out1_1 = (merge _isEnabled_clock 
175
		(true -> IfActionSubsystem6_33_026((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
176
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
214 177
tel
215 178

  
216 179
(*
217 180
Original block name: if_multi_test_PP/IfActionSubsystem6
218 181
*)
219
node  IfActionSubsystem6_98_007(In1_1 : bool;
182
node  IfActionSubsystem6_33_026(In1_1 : bool;
220 183
	__time_step : real;
221 184
	__nb_step : int;)
222 185
returns(Out1_1 : bool;);
......
227 190
(*
228 191
Original block name: if_multi_test_PP/IfActionSubsystem7
229 192
*)
230
node  IfActionSubsystem7_103_007_automaton(In1_1 : real;
193
node  IfActionSubsystem7_38_022_condExecSS(In1_1 : real;
231 194
	In1_2 : real;
232 195
	In1_3 : real;
233 196
	In1_4 : real;
......
242 205
	pre_Out1_2 : real;
243 206
	pre_Out1_3 : real;
244 207
	pre_Out1_4 : real;
208
	_isEnabled_clock : bool clock;
245 209
let
246 210
	pre_Out1_1 = if (__nb_step > 0) then
247 211
		(pre Out1_1)
248
	    else 0.000000000000000;
212
	    else 0.0;
249 213
	pre_Out1_2 = if (__nb_step > 0) then
250 214
		(pre Out1_2)
251
	    else 0.000000000000000;
215
	    else 0.0;
252 216
	pre_Out1_3 = if (__nb_step > 0) then
253 217
		(pre Out1_3)
254
	    else 0.000000000000000;
218
	    else 0.0;
255 219
	pre_Out1_4 = if (__nb_step > 0) then
256 220
		(pre Out1_4)
257
	    else 0.000000000000000;
258
	automaton enabled_IfActionSubsystem7_103_007
259
	state Active_IfActionSubsystem7_103_007:
260
	unless (not _isEnabled) restart Inactive_IfActionSubsystem7_103_007
261
	let
262
		(Out1_1, Out1_2, Out1_3, Out1_4) = IfActionSubsystem7_103_007(In1_1, In1_2, In1_3, In1_4, __time_step, __nb_step);
263
	tel
264

  
265
	state Inactive_IfActionSubsystem7_103_007:
266
	unless _isEnabled resume Active_IfActionSubsystem7_103_007
267
	let
268
		Out1_1 = pre_Out1_1;
269
		Out1_2 = pre_Out1_2;
270
		Out1_3 = pre_Out1_3;
271
		Out1_4 = pre_Out1_4;
272
	tel
273

  
274

  
221
	    else 0.0;
222
	_isEnabled_clock = _isEnabled;
223
	(Out1_1, Out1_2, Out1_3, Out1_4) = (merge _isEnabled_clock 
224
		(true -> IfActionSubsystem7_38_022((In1_1 when _isEnabled_clock), (In1_2 when _isEnabled_clock), (In1_3 when _isEnabled_clock), (In1_4 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
225
		(false -> (pre_Out1_1, pre_Out1_2, pre_Out1_3, pre_Out1_4) when false(_isEnabled_clock)));
275 226
tel
276 227

  
277 228
(*
278 229
Original block name: if_multi_test_PP/IfActionSubsystem7
279 230
*)
280
node  IfActionSubsystem7_103_007(In1_1 : real;
231
node  IfActionSubsystem7_38_022(In1_1 : real;
281 232
	In1_2 : real;
282 233
	In1_3 : real;
283 234
	In1_4 : real;
......
326 277
	If1_2 : bool;
327 278
	If1_3 : bool;
328 279
	If1_4 : bool;
329
	ExecutionCond_of_IfActionSubsystem4_74_009 : bool;
280
	ExecutionCond_of_IfActionSubsystem4_9_015 : bool;
330 281
	IfActionSubsystem4_1 : bool;
331 282
	IfActionSubsystem4_2 : bool;
332 283
	IfActionSubsystem4_3 : bool;
......
336 287
	IfActionSubsystem4_7 : bool;
337 288
	IfActionSubsystem4_8 : bool;
338 289
	IfActionSubsystem4_9 : bool;
339
	ExecutionCond_of_IfActionSubsystem5_93_008 : bool;
290
	ExecutionCond_of_IfActionSubsystem5_28_018 : bool;
340 291
	IfActionSubsystem5_1 : real;
341 292
	IfActionSubsystem5_2 : real;
342 293
	IfActionSubsystem5_3 : real;
343
	ExecutionCond_of_IfActionSubsystem6_98_007 : bool;
294
	ExecutionCond_of_IfActionSubsystem6_33_026 : bool;
344 295
	IfActionSubsystem6_1 : bool;
345
	ExecutionCond_of_IfActionSubsystem7_103_007 : bool;
296
	ExecutionCond_of_IfActionSubsystem7_38_022 : bool;
346 297
	IfActionSubsystem7_1 : real;
347 298
	IfActionSubsystem7_2 : real;
348 299
	IfActionSubsystem7_3 : real;
......
350 301
	__time_step : real;
351 302
	__nb_step : int;
352 303
let
353
	(If1_1, If1_2, If1_3, If1_4) = if In3_2 = 0.000000000000000 then
304
	(If1_1, If1_2, If1_3, If1_4) = if In3_2 = 0.0 then
354 305
		(true, false, false, false)
355
	    else if In5_2 < 3.000000000000000 then
306
	    else if In5_2 < 3.0 then
356 307
		(false, true, false, false)
357
	    else if ( - In5_1 > In3_3 ) and In5_2 > 0.000000000000000 then
308
	    else if ( - In5_1 > In3_3 ) and In5_2 > 0.0 then
358 309
		(false, false, true, false)
359 310
	    else (false, false, false, true);
360
	ExecutionCond_of_IfActionSubsystem4_74_009 = If1_1;
361
	(IfActionSubsystem4_1, IfActionSubsystem4_2, IfActionSubsystem4_3, IfActionSubsystem4_4, IfActionSubsystem4_5, IfActionSubsystem4_6, IfActionSubsystem4_7, IfActionSubsystem4_8, IfActionSubsystem4_9) = IfActionSubsystem4_74_009_automaton(In3_1, In3_2, In3_3, In4_1, ExecutionCond_of_IfActionSubsystem4_74_009, __time_step, __nb_step);
362
	ExecutionCond_of_IfActionSubsystem5_93_008 = If1_4;
363
	(IfActionSubsystem5_1, IfActionSubsystem5_2, IfActionSubsystem5_3) = IfActionSubsystem5_93_008_automaton(In3_1, In3_2, In3_3, ExecutionCond_of_IfActionSubsystem5_93_008, __time_step, __nb_step);
364
	ExecutionCond_of_IfActionSubsystem6_98_007 = If1_2;
365
	IfActionSubsystem6_1 = IfActionSubsystem6_98_007_automaton(In4_1, ExecutionCond_of_IfActionSubsystem6_98_007, __time_step, __nb_step);
366
	ExecutionCond_of_IfActionSubsystem7_103_007 = If1_3;
367
	(IfActionSubsystem7_1, IfActionSubsystem7_2, IfActionSubsystem7_3, IfActionSubsystem7_4) = IfActionSubsystem7_103_007_automaton(In5_1, In5_2, In5_3, In5_4, ExecutionCond_of_IfActionSubsystem7_103_007, __time_step, __nb_step);
311
	ExecutionCond_of_IfActionSubsystem4_9_015 = If1_1;
312
	(IfActionSubsystem4_1, IfActionSubsystem4_2, IfActionSubsystem4_3, IfActionSubsystem4_4, IfActionSubsystem4_5, IfActionSubsystem4_6, IfActionSubsystem4_7, IfActionSubsystem4_8, IfActionSubsystem4_9) = IfActionSubsystem4_9_015_condExecSS(In3_1, In3_2, In3_3, In4_1, ExecutionCond_of_IfActionSubsystem4_9_015, __time_step, __nb_step);
313
	ExecutionCond_of_IfActionSubsystem5_28_018 = If1_4;
314
	(IfActionSubsystem5_1, IfActionSubsystem5_2, IfActionSubsystem5_3) = IfActionSubsystem5_28_018_condExecSS(In3_1, In3_2, In3_3, ExecutionCond_of_IfActionSubsystem5_28_018, __time_step, __nb_step);
315
	ExecutionCond_of_IfActionSubsystem6_33_026 = If1_2;
316
	IfActionSubsystem6_1 = IfActionSubsystem6_33_026_condExecSS(In4_1, ExecutionCond_of_IfActionSubsystem6_33_026, __time_step, __nb_step);
317
	ExecutionCond_of_IfActionSubsystem7_38_022 = If1_3;
318
	(IfActionSubsystem7_1, IfActionSubsystem7_2, IfActionSubsystem7_3, IfActionSubsystem7_4) = IfActionSubsystem7_38_022_condExecSS(In5_1, In5_2, In5_3, In5_4, ExecutionCond_of_IfActionSubsystem7_38_022, __time_step, __nb_step);
368 319
	Out5_1 = IfActionSubsystem4_1;
369 320
	Out5_2 = IfActionSubsystem4_2;
370 321
	Out5_3 = IfActionSubsystem4_3;
......
382 333
	Out10_2 = IfActionSubsystem7_2;
383 334
	Out10_3 = IfActionSubsystem7_3;
384 335
	Out10_4 = IfActionSubsystem7_4;
385
	__time_step = (0.0 -> ((pre __time_step) + 0.020000000000000));
336
	__time_step = (0.0 -> ((pre __time_step) + 0.020));
386 337
	__nb_step = (0 -> ((pre __nb_step) + 1));
387 338
tel
388 339

  

Also available in: Unified diff