Project

General

Profile

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

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/enable_test1_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:35:01
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:43:36
5 5
(*
6 6
Original block name: enable_test1_PP/Enabledheld
7 7
*)
8
node  Enabledheld_70_296_automaton(In1_1 : real;
8
node  Enabledheld_33_566_condExecSS(In1_1 : real;
9 9
	_isEnabled : bool;
10 10
	__time_step : real;
11 11
	__nb_step : int;)
12 12
returns(Out1_1 : real;);
13 13
var pre_Out1_1 : real;
14
	_isEnabled_clock : bool clock;
14 15
let
15 16
	pre_Out1_1 = if (__nb_step > 0) then
16 17
		(pre Out1_1)
17
	    else 0.000000000000000;
18
	automaton enabled_Enabledheld_70_296
19
	state Active_Enabledheld_70_296:
20
	unless (not _isEnabled) restart Inactive_Enabledheld_70_296
21
	let
22
		Out1_1 = Enabledheld_70_296(In1_1, __time_step, __nb_step);
23
	tel
24

  
25
	state Inactive_Enabledheld_70_296:
26
	unless _isEnabled resume Active_Enabledheld_70_296
27
	let
28
		Out1_1 = pre_Out1_1;
29
	tel
30

  
31

  
18
	    else 0.0;
19
	_isEnabled_clock = _isEnabled;
20
	Out1_1 = (merge _isEnabled_clock 
21
		(true -> Enabledheld_33_566((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
22
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
32 23
tel
33 24

  
34 25
(*
35 26
Original block name: enable_test1_PP/Enabledheld
36 27
*)
37
node  Enabledheld_70_296(In1_1 : real;
28
node  Enabledheld_33_566(In1_1 : real;
38 29
	__time_step : real;
39 30
	__nb_step : int;)
40 31
returns(Out1_1 : real;);
......
45 36
(*
46 37
Original block name: enable_test1_PP/Enabledheld2
47 38
*)
48
node  Enabledheld2_76_056_automaton(In1_1 : real;
39
node  Enabledheld2_48_394_condExecSS(In1_1 : real;
49 40
	In1_2 : real;
50 41
	_isEnabled : bool;
51 42
	__time_step : real;
......
54 45
	Out1_2 : real;);
55 46
var pre_Out1_1 : real;
56 47
	pre_Out1_2 : real;
48
	_isEnabled_clock : bool clock;
57 49
let
58 50
	pre_Out1_1 = if (__nb_step > 0) then
59 51
		(pre Out1_1)
60
	    else 0.000000000000000;
52
	    else 0.0;
61 53
	pre_Out1_2 = if (__nb_step > 0) then
62 54
		(pre Out1_2)
63
	    else 0.000000000000000;
64
	automaton enabled_Enabledheld2_76_056
65
	state Active_Enabledheld2_76_056:
66
	unless (not _isEnabled) restart Inactive_Enabledheld2_76_056
67
	let
68
		(Out1_1, Out1_2) = Enabledheld2_76_056(In1_1, In1_2, __time_step, __nb_step);
69
	tel
70

  
71
	state Inactive_Enabledheld2_76_056:
72
	unless _isEnabled resume Active_Enabledheld2_76_056
73
	let
74
		Out1_1 = pre_Out1_1;
75
		Out1_2 = pre_Out1_2;
76
	tel
77

  
78

  
55
	    else 0.0;
56
	_isEnabled_clock = _isEnabled;
57
	(Out1_1, Out1_2) = (merge _isEnabled_clock 
58
		(true -> Enabledheld2_48_394((In1_1 when _isEnabled_clock), (In1_2 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
59
		(false -> (pre_Out1_1, pre_Out1_2) when false(_isEnabled_clock)));
79 60
tel
80 61

  
81 62
(*
82 63
Original block name: enable_test1_PP/Enabledheld2
83 64
*)
84
node  Enabledheld2_76_056(In1_1 : real;
65
node  Enabledheld2_48_394(In1_1 : real;
85 66
	In1_2 : real;
86 67
	__time_step : real;
87 68
	__nb_step : int;)
......
95 76
(*
96 77
Original block name: enable_test1_PP/Enabledreset
97 78
*)
98
node  Enabledreset_81_945_automaton(In1_1 : real;
79
node  Enabledreset_60_518_condExecSS(In1_1 : real;
99 80
	_isEnabled : bool;
100 81
	__time_step : real;
101 82
	__nb_step : int;)
102 83
returns(Out1_1 : real;);
103 84
var pre_Out1_1 : real;
85
	_isEnabled_clock : bool clock;
104 86
let
105 87
	pre_Out1_1 = if (__nb_step > 0) then
106 88
		(pre Out1_1)
107
	    else 0.000000000000000;
108
	automaton enabled_Enabledreset_81_945
109
	state Active_Enabledreset_81_945:
110
	unless (not _isEnabled) restart Inactive_Enabledreset_81_945
111
	let
112
		Out1_1 = Enabledreset_81_945(In1_1, __time_step, __nb_step);
113
	tel
114

  
115
	state Inactive_Enabledreset_81_945:
116
	unless _isEnabled restart Active_Enabledreset_81_945
117
	let
118
		Out1_1 = pre_Out1_1;
119
	tel
120

  
121

  
89
	    else 0.0;
90
	_isEnabled_clock = _isEnabled;
91
	Out1_1 = (merge _isEnabled_clock 
92
		(true -> (Enabledreset_60_518((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
93
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
122 94
tel
123 95

  
124 96
(*
125 97
Original block name: enable_test1_PP/Enabledreset
126 98
*)
127
node  Enabledreset_81_945(In1_1 : real;
99
node  Enabledreset_60_518(In1_1 : real;
128 100
	__time_step : real;
129 101
	__nb_step : int;)
130 102
returns(Out1_1 : real;);
......
135 107
(*
136 108
Original block name: enable_test1_PP/Enabledreset2
137 109
*)
138
node  Enabledreset2_86_270_automaton(In1_1 : real;
110
node  Enabledreset2_70_790_condExecSS(In1_1 : real;
139 111
	In1_2 : real;
140 112
	_isEnabled : bool;
141 113
	__time_step : real;
......
144 116
	Out1_2 : real;);
145 117
var pre_Out1_1 : real;
146 118
	pre_Out1_2 : real;
119
	_isEnabled_clock : bool clock;
147 120
let
148 121
	pre_Out1_1 = if (__nb_step > 0) then
149 122
		(pre Out1_1)
150
	    else 0.000000000000000;
123
	    else 0.0;
151 124
	pre_Out1_2 = if (__nb_step > 0) then
152 125
		(pre Out1_2)
153
	    else 0.000000000000000;
154
	automaton enabled_Enabledreset2_86_270
155
	state Active_Enabledreset2_86_270:
156
	unless (not _isEnabled) restart Inactive_Enabledreset2_86_270
157
	let
158
		(Out1_1, Out1_2) = Enabledreset2_86_270(In1_1, In1_2, __time_step, __nb_step);
159
	tel
160

  
161
	state Inactive_Enabledreset2_86_270:
162
	unless _isEnabled restart Active_Enabledreset2_86_270
163
	let
164
		Out1_1 = pre_Out1_1;
165
		Out1_2 = pre_Out1_2;
166
	tel
167

  
168

  
126
	    else 0.0;
127
	_isEnabled_clock = _isEnabled;
128
	(Out1_1, Out1_2) = (merge _isEnabled_clock 
129
		(true -> (Enabledreset2_70_790((In1_1 when _isEnabled_clock), (In1_2 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
130
		(false -> (pre_Out1_1, pre_Out1_2) when false(_isEnabled_clock)));
169 131
tel
170 132

  
171 133
(*
172 134
Original block name: enable_test1_PP/Enabledreset2
173 135
*)
174
node  Enabledreset2_86_270(In1_1 : real;
136
node  Enabledreset2_70_790(In1_1 : real;
175 137
	In1_2 : real;
176 138
	__time_step : real;
177 139
	__nb_step : int;)
......
201 163
	Out2_1 : real;
202 164
	Out4_1 : real;
203 165
	Out4_2 : real;);
204
var ExecutionCond_of_Enabledheld_70_296 : bool;
166
var ExecutionCond_of_Enabledheld_33_566 : bool;
205 167
	Enabledheld_1 : real;
206
	ExecutionCond_of_Enabledheld2_76_056 : bool;
168
	ExecutionCond_of_Enabledheld2_48_394 : bool;
207 169
	Enabledheld2_1 : real;
208 170
	Enabledheld2_2 : real;
209
	ExecutionCond_of_Enabledreset_81_945 : bool;
171
	ExecutionCond_of_Enabledreset_60_518 : bool;
210 172
	Enabledreset_1 : real;
211
	ExecutionCond_of_Enabledreset2_86_270 : bool;
173
	ExecutionCond_of_Enabledreset2_70_790 : bool;
212 174
	Enabledreset2_1 : real;
213 175
	Enabledreset2_2 : real;
214 176
	__time_step : real;
215 177
	__nb_step : int;
216 178
let
217
	ExecutionCond_of_Enabledheld_70_296 = In2_1;
218
	Enabledheld_1 = Enabledheld_70_296_automaton(In1_1, ExecutionCond_of_Enabledheld_70_296, __time_step, __nb_step);
219
	ExecutionCond_of_Enabledheld2_76_056 = In3_1;
220
	(Enabledheld2_1, Enabledheld2_2) = Enabledheld2_76_056_automaton(In4_1, In4_2, ExecutionCond_of_Enabledheld2_76_056, __time_step, __nb_step);
221
	ExecutionCond_of_Enabledreset_81_945 = In5_1;
222
	Enabledreset_1 = Enabledreset_81_945_automaton(In6_1, ExecutionCond_of_Enabledreset_81_945, __time_step, __nb_step);
223
	ExecutionCond_of_Enabledreset2_86_270 = (In7_1 > 0);
224
	(Enabledreset2_1, Enabledreset2_2) = Enabledreset2_86_270_automaton(In8_1, In8_2, ExecutionCond_of_Enabledreset2_86_270, __time_step, __nb_step);
179
	ExecutionCond_of_Enabledheld_33_566 = In2_1;
180
	Enabledheld_1 = Enabledheld_33_566_condExecSS(In1_1, ExecutionCond_of_Enabledheld_33_566, __time_step, __nb_step);
181
	ExecutionCond_of_Enabledheld2_48_394 = In3_1;
182
	(Enabledheld2_1, Enabledheld2_2) = Enabledheld2_48_394_condExecSS(In4_1, In4_2, ExecutionCond_of_Enabledheld2_48_394, __time_step, __nb_step);
183
	ExecutionCond_of_Enabledreset_60_518 = In5_1;
184
	Enabledreset_1 = Enabledreset_60_518_condExecSS(In6_1, ExecutionCond_of_Enabledreset_60_518, __time_step, __nb_step);
185
	ExecutionCond_of_Enabledreset2_70_790 = (In7_1 > 0);
186
	(Enabledreset2_1, Enabledreset2_2) = Enabledreset2_70_790_condExecSS(In8_1, In8_2, ExecutionCond_of_Enabledreset2_70_790, __time_step, __nb_step);
225 187
	Out3_1 = Enabledheld_1;
226 188
	Out1_1 = Enabledheld2_1;
227 189
	Out1_2 = Enabledheld2_2;
228 190
	Out2_1 = Enabledreset_1;
229 191
	Out4_1 = Enabledreset2_1;
230 192
	Out4_2 = Enabledreset2_2;
231
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
193
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
232 194
	__nb_step = (0 -> ((pre __nb_step) + 1));
233 195
tel
234 196

  

Also available in: Unified diff