Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / large / src / BROKEN / steam_boiler_no_arr2.h @ fa9e78e5

History | View | Annotate | Download (19.7 KB)

1
/* C code generated by lustrec
2
   Version number 1.3-458
3
   Code is C99 compliant
4
   Using (double) floating-point numbers */
5
   
6
#ifndef _STEAM_BOILER_NO_ARR2
7
#define _STEAM_BOILER_NO_ARR2
8

    
9
/* Imports standard library */
10
#include "/usr/local/include/lustrec/arrow.h"
11

    
12

    
13
/* Import dependencies */
14

    
15
/* Types definitions */
16

    
17
/* Global constant (declarations, definitions are in C file) */
18

    
19
/* Structs declarations */
20
struct top_mem;
21
struct BoilerController_mem;
22
struct Verification_mem;
23
struct Valve_mem;
24
struct SteamDefect_mem;
25
struct PumpsStatus_mem;
26
struct PumpsOutput_mem;
27
struct PumpsDecision_mem;
28
struct PumpDefect_mem;
29
struct Operator_mem;
30
struct LevelDefect_mem;
31
struct Dynamics_mem;
32
struct ControlMode_mem;
33
struct FEDGE2_mem;
34
struct FEDGE1_mem;
35
struct operate_pumps_mem;
36
struct REDGE_mem;
37

    
38
/* Nodes declarations */
39
extern void top_reset (struct top_mem *self);
40

    
41
extern void top_init (struct top_mem *self);
42

    
43
extern void top_clear (struct top_mem *self);
44

    
45
extern void top_step (_Bool steam_boiler_waiting, _Bool physical_units_ready,
46
                      _Bool stop_request, int steam, int level_defect,
47
                      int steam_defect, int pump_defect_0, int pump_defect_1,
48
                      int pump_defect_2, int pump_defect_3,
49
                      int pump_control_defect_0, int pump_control_defect_1,
50
                      int pump_control_defect_2, int pump_control_defect_3,
51
                      int q, int pump_state_0, int pump_state_1,
52
                      int pump_state_2, int pump_state_3, 
53
                      _Bool (*OK),
54
                      struct top_mem *self);
55

    
56
extern void NOT_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
57
                      _Bool (*NOT_0), _Bool (*NOT_1), _Bool (*NOT_2),
58
                      _Bool (*NOT_3)
59
                      );
60

    
61
extern void BoilerController_reset (struct BoilerController_mem *self);
62

    
63
extern void BoilerController_init (struct BoilerController_mem *self);
64

    
65
extern void BoilerController_clear (struct BoilerController_mem *self);
66

    
67
extern void BoilerController_step (_Bool stop, _Bool steam_boiler_waiting,
68
                                   _Bool physical_units_ready, int level,
69
                                   int steam, int pump_state_0,
70
                                   int pump_state_1, int pump_state_2,
71
                                   int pump_state_3,
72
                                   _Bool pump_control_state_0,
73
                                   _Bool pump_control_state_1,
74
                                   _Bool pump_control_state_2,
75
                                   _Bool pump_control_state_3,
76
                                   _Bool pump_repaired_0,
77
                                   _Bool pump_repaired_1,
78
                                   _Bool pump_repaired_2,
79
                                   _Bool pump_repaired_3,
80
                                   _Bool pump_control_repaired_0,
81
                                   _Bool pump_control_repaired_1,
82
                                   _Bool pump_control_repaired_2,
83
                                   _Bool pump_control_repaired_3,
84
                                   _Bool level_repaired,
85
                                   _Bool steam_repaired,
86
                                   _Bool pump_failure_acknowledgement_0,
87
                                   _Bool pump_failure_acknowledgement_1,
88
                                   _Bool pump_failure_acknowledgement_2,
89
                                   _Bool pump_failure_acknowledgement_3,
90
                                   _Bool pump_control_failure_acknowledgement_0,
91
                                   _Bool pump_control_failure_acknowledgement_1,
92
                                   _Bool pump_control_failure_acknowledgement_2,
93
                                   _Bool pump_control_failure_acknowledgement_3,
94
                                   _Bool level_failure_acknowledgement,
95
                                   _Bool steam_failure_acknowledgement, 
96
                                   _Bool (*program_ready), int (*mode),
97
                                   _Bool (*valve), _Bool (*open_pump_0),
98
                                   _Bool (*open_pump_1),
99
                                   _Bool (*open_pump_2),
100
                                   _Bool (*open_pump_3),
101
                                   _Bool (*close_pump_0),
102
                                   _Bool (*close_pump_1),
103
                                   _Bool (*close_pump_2),
104
                                   _Bool (*close_pump_3),
105
                                   _Bool (*pump_failure_detection_0),
106
                                   _Bool (*pump_failure_detection_1),
107
                                   _Bool (*pump_failure_detection_2),
108
                                   _Bool (*pump_failure_detection_3),
109
                                   _Bool (*pump_control_failure_detection_0),
110
                                   _Bool (*pump_control_failure_detection_1),
111
                                   _Bool (*pump_control_failure_detection_2),
112
                                   _Bool (*pump_control_failure_detection_3),
113
                                   _Bool (*level_failure_detection),
114
                                   _Bool (*steam_outcome_failure_detection),
115
                                   _Bool (*pump_repaired_acknowledgement_0),
116
                                   _Bool (*pump_repaired_acknowledgement_1),
117
                                   _Bool (*pump_repaired_acknowledgement_2),
118
                                   _Bool (*pump_repaired_acknowledgement_3),
119
                                   _Bool (*pump_control_repaired_acknowledgement_0),
120
                                   _Bool (*pump_control_repaired_acknowledgement_1),
121
                                   _Bool (*pump_control_repaired_acknowledgement_2),
122
                                   _Bool (*pump_control_repaired_acknowledgement_3),
123
                                   _Bool (*level_repaired_acknowledgement),
124
                                   _Bool (*steam_outcome_repaired_acknowledgement),
125
                                   struct BoilerController_mem *self);
126

    
127
extern void Verification_reset (struct Verification_mem *self);
128

    
129
extern void Verification_init (struct Verification_mem *self);
130

    
131
extern void Verification_clear (struct Verification_mem *self);
132

    
133
extern void Verification_step (_Bool S1, _Bool S2, 
134
                               _Bool (*property_ok),
135
                               struct Verification_mem *self);
136

    
137
extern void Valve_reset (struct Valve_mem *self);
138

    
139
extern void Valve_init (struct Valve_mem *self);
140

    
141
extern void Valve_clear (struct Valve_mem *self);
142

    
143
extern void Valve_step (int op_mode, int q, 
144
                        _Bool (*valve), int (*valve_state),
145
                        struct Valve_mem *self);
146

    
147
extern void SteamOutput_step (int op_mode, int steam_defect,
148
                              _Bool steam_repaired, 
149
                              _Bool (*steam_outcome_failure_detection),
150
                              _Bool (*steam_outcome_repaired_acknowledgement)
151
                              );
152

    
153
extern void SteamDefect_reset (struct SteamDefect_mem *self);
154

    
155
extern void SteamDefect_init (struct SteamDefect_mem *self);
156

    
157
extern void SteamDefect_clear (struct SteamDefect_mem *self);
158

    
159
extern void SteamDefect_step (_Bool steam_failure_acknowledgement,
160
                              _Bool steam_repaired, int steam, 
161
                              int (*SteamDefect),
162
                              struct SteamDefect_mem *self);
163

    
164
extern void PumpsStatus_reset (struct PumpsStatus_mem *self);
165

    
166
extern void PumpsStatus_init (struct PumpsStatus_mem *self);
167

    
168
extern void PumpsStatus_clear (struct PumpsStatus_mem *self);
169

    
170
extern void PumpsStatus_step (int n_pumps, int pump_defect_0,
171
                              int pump_defect_1, int pump_defect_2,
172
                              int pump_defect_3, _Bool flow_0, _Bool flow_1,
173
                              _Bool flow_2, _Bool flow_3, 
174
                              int (*pump_status_0), int (*pump_status_1),
175
                              int (*pump_status_2), int (*pump_status_3),
176
                              struct PumpsStatus_mem *self);
177

    
178
extern void PumpsOutput_reset (struct PumpsOutput_mem *self);
179

    
180
extern void PumpsOutput_init (struct PumpsOutput_mem *self);
181

    
182
extern void PumpsOutput_clear (struct PumpsOutput_mem *self);
183

    
184
extern void PumpsOutput_step (int op_mode, int pump_status_0,
185
                              int pump_status_1, int pump_status_2,
186
                              int pump_status_3, int pump_defect_0,
187
                              int pump_defect_1, int pump_defect_2,
188
                              int pump_defect_3, int pump_control_defect_0,
189
                              int pump_control_defect_1,
190
                              int pump_control_defect_2,
191
                              int pump_control_defect_3,
192
                              _Bool pump_repaired_0, _Bool pump_repaired_1,
193
                              _Bool pump_repaired_2, _Bool pump_repaired_3,
194
                              _Bool pump_control_repaired_0,
195
                              _Bool pump_control_repaired_1,
196
                              _Bool pump_control_repaired_2,
197
                              _Bool pump_control_repaired_3, 
198
                              _Bool (*open_pump_0), _Bool (*open_pump_1),
199
                              _Bool (*open_pump_2), _Bool (*open_pump_3),
200
                              _Bool (*close_pump_0), _Bool (*close_pump_1),
201
                              _Bool (*close_pump_2), _Bool (*close_pump_3),
202
                              _Bool (*pump_failure_detection_0),
203
                              _Bool (*pump_failure_detection_1),
204
                              _Bool (*pump_failure_detection_2),
205
                              _Bool (*pump_failure_detection_3),
206
                              _Bool (*pump_repaired_acknowledgement_0),
207
                              _Bool (*pump_repaired_acknowledgement_1),
208
                              _Bool (*pump_repaired_acknowledgement_2),
209
                              _Bool (*pump_repaired_acknowledgement_3),
210
                              _Bool (*pump_control_failure_detection_0),
211
                              _Bool (*pump_control_failure_detection_1),
212
                              _Bool (*pump_control_failure_detection_2),
213
                              _Bool (*pump_control_failure_detection_3),
214
                              _Bool (*pump_control_repaired_acknowledgement_0),
215
                              _Bool (*pump_control_repaired_acknowledgement_1),
216
                              _Bool (*pump_control_repaired_acknowledgement_2),
217
                              _Bool (*pump_control_repaired_acknowledgement_3),
218
                              struct PumpsOutput_mem *self);
219

    
220
extern void PumpsDecision_reset (struct PumpsDecision_mem *self);
221

    
222
extern void PumpsDecision_init (struct PumpsDecision_mem *self);
223

    
224
extern void PumpsDecision_clear (struct PumpsDecision_mem *self);
225

    
226
extern void PumpsDecision_step (int q, int v, 
227
                                int (*n_pumps),
228
                                struct PumpsDecision_mem *self);
229

    
230
extern void PumpDefect_reset (struct PumpDefect_mem *self);
231

    
232
extern void PumpDefect_init (struct PumpDefect_mem *self);
233

    
234
extern void PumpDefect_clear (struct PumpDefect_mem *self);
235

    
236
extern void PumpDefect_step (_Bool pump_failure_acknowledgement,
237
                             _Bool pump_repaired,
238
                             _Bool pump_control_failure_acknowledgement,
239
                             _Bool pump_control_repaired, int pump_status,
240
                             int pump_state, _Bool pump_control_state, 
241
                             int (*PumpDefect), int (*PumpControlDefect),
242
                             _Bool (*Flow),
243
                             struct PumpDefect_mem *self);
244

    
245
extern void Operator_reset (struct Operator_mem *self);
246

    
247
extern void Operator_init (struct Operator_mem *self);
248

    
249
extern void Operator_clear (struct Operator_mem *self);
250

    
251
extern void Operator_step (_Bool stop, 
252
                           _Bool (*stop_request),
253
                           struct Operator_mem *self);
254

    
255
extern void LevelOutput_step (int op_mode, int level_defect,
256
                              _Bool level_repaired, 
257
                              _Bool (*level_outcome_failure_detection),
258
                              _Bool (*level_outcome_repaired_acknowledgement)
259
                              );
260

    
261
extern void LevelDefect_reset (struct LevelDefect_mem *self);
262

    
263
extern void LevelDefect_init (struct LevelDefect_mem *self);
264

    
265
extern void LevelDefect_clear (struct LevelDefect_mem *self);
266

    
267
extern void LevelDefect_step (_Bool level_failure_acknowledgement,
268
                              _Bool level_repaired, int level, 
269
                              int (*LevelDefect),
270
                              struct LevelDefect_mem *self);
271

    
272
extern void Dynamics_reset (struct Dynamics_mem *self);
273

    
274
extern void Dynamics_init (struct Dynamics_mem *self);
275

    
276
extern void Dynamics_clear (struct Dynamics_mem *self);
277

    
278
extern void Dynamics_step (int valve_state, int level, int steam,
279
                           int level_defect, int steam_defect, _Bool flow_0,
280
                           _Bool flow_1, _Bool flow_2, _Bool flow_3, 
281
                           int (*q), int (*v), int (*p_0), int (*p_1),
282
                           int (*p_2), int (*p_3),
283
                           struct Dynamics_mem *self);
284

    
285
extern void ControlOutput_step (int op_mode, int level, _Bool valve, 
286
                                _Bool (*program_ready), int (*mode)
287
                                );
288

    
289
extern void ControlMode_reset (struct ControlMode_mem *self);
290

    
291
extern void ControlMode_init (struct ControlMode_mem *self);
292

    
293
extern void ControlMode_clear (struct ControlMode_mem *self);
294

    
295
extern void ControlMode_step (_Bool steam_boiler_waiting,
296
                              _Bool physical_units_ready, _Bool stop_request,
297
                              int steam, int level_defect, int steam_defect,
298
                              int pump_defect_0, int pump_defect_1,
299
                              int pump_defect_2, int pump_defect_3,
300
                              int pump_control_defect_0,
301
                              int pump_control_defect_1,
302
                              int pump_control_defect_2,
303
                              int pump_control_defect_3, int q,
304
                              int pump_state_0, int pump_state_1,
305
                              int pump_state_2, int pump_state_3, 
306
                              int (*op_mode),
307
                              struct ControlMode_mem *self);
308

    
309
extern void FEDGE2_reset (struct FEDGE2_mem *self);
310

    
311
extern void FEDGE2_init (struct FEDGE2_mem *self);
312

    
313
extern void FEDGE2_clear (struct FEDGE2_mem *self);
314

    
315
extern void FEDGE2_step (_Bool S, 
316
                         _Bool (*FEDGE2),
317
                         struct FEDGE2_mem *self);
318

    
319
extern void FEDGE1_reset (struct FEDGE1_mem *self);
320

    
321
extern void FEDGE1_init (struct FEDGE1_mem *self);
322

    
323
extern void FEDGE1_clear (struct FEDGE1_mem *self);
324

    
325
extern void FEDGE1_step (_Bool S, 
326
                         _Bool (*FEDGE1),
327
                         struct FEDGE1_mem *self);
328

    
329
extern void steam_failure_detect_step (int steam, 
330
                                       _Bool (*steam_failure_detect)
331
                                       );
332

    
333
extern void operate_pumps_reset (struct operate_pumps_mem *self);
334

    
335
extern void operate_pumps_init (struct operate_pumps_mem *self);
336

    
337
extern void operate_pumps_clear (struct operate_pumps_mem *self);
338

    
339
extern void operate_pumps_step (int n, int n_pumps_to_open,
340
                                int pump_status_0, int pump_status_1,
341
                                int pump_status_2, int pump_status_3,
342
                                int pump_defect_0, int pump_defect_1,
343
                                int pump_defect_2, int pump_defect_3,
344
                                _Bool flow_0, _Bool flow_1, _Bool flow_2,
345
                                _Bool flow_3, 
346
                                int (*operate_pumps_0),
347
                                int (*operate_pumps_1),
348
                                int (*operate_pumps_2),
349
                                int (*operate_pumps_3),
350
                                struct operate_pumps_mem *self);
351

    
352
extern void pump_failure_detect_step (int pump_status, int pump_state,
353
                                      _Bool pump_control_state, 
354
                                      _Bool (*pump_failure_detect),
355
                                      _Bool (*pump_control_failure_detect),
356
                                      _Bool (*flow)
357
                                      );
358

    
359
extern void level_failure_detect_step (int level, 
360
                                       _Bool (*level_failure_detect)
361
                                       );
362

    
363
extern void Defect_step (int statein, _Bool fail_cond, _Bool ack_chan,
364
                         _Bool repair_chan, 
365
                         int (*stateout)
366
                         );
367

    
368
extern void sum_step (int a_0, int a_1, int a_2, int a_3, 
369
                      int (*sum)
370
                      );
371

    
372
extern void initialization_complete_step (int op_mode, int level,
373
                                          _Bool valve, 
374
                                          _Bool (*initialization_complete)
375
                                          );
376

    
377
extern void failure_step (int level_defect, int steam_defect,
378
                          int pump_defect_0, int pump_defect_1,
379
                          int pump_defect_2, int pump_defect_3,
380
                          int pump_control_defect_0,
381
                          int pump_control_defect_1,
382
                          int pump_control_defect_2,
383
                          int pump_control_defect_3, 
384
                          _Bool (*failure)
385
                          );
386

    
387
extern void critical_failure_step (int op_mode, int steam, int level_defect,
388
                                   int steam_defect, int pump_defect_0,
389
                                   int pump_defect_1, int pump_defect_2,
390
                                   int pump_defect_3, int q,
391
                                   int pump_state_0, int pump_state_1,
392
                                   int pump_state_2, int pump_state_3, 
393
                                   _Bool (*critical_failure)
394
                                   );
395

    
396
extern void REDGE_reset (struct REDGE_mem *self);
397

    
398
extern void REDGE_init (struct REDGE_mem *self);
399

    
400
extern void REDGE_clear (struct REDGE_mem *self);
401

    
402
extern void REDGE_step (_Bool S, 
403
                        _Bool (*REDGE),
404
                        struct REDGE_mem *self);
405

    
406
extern void pump_control_failure_step (int pump_defect, 
407
                                       _Bool (*pump_failure)
408
                                       );
409

    
410
extern void OR_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
411
                     _Bool (*OR)
412
                     );
413

    
414
extern void transmission_failure_step (int pump_state_0, int pump_state_1,
415
                                       int pump_state_2, int pump_state_3, 
416
                                       _Bool (*transmission_failure)
417
                                       );
418

    
419
extern void steam_failure_startup_step (int steam, 
420
                                        _Bool (*steam_failure_startup)
421
                                        );
422

    
423
extern void steam_failure_step (int steam_defect, 
424
                                _Bool (*steam_failure)
425
                                );
426

    
427
extern void pump_failure_step (int pump_defect, 
428
                               _Bool (*pump_failure)
429
                               );
430

    
431
extern void level_failure_step (int level_defect, 
432
                                _Bool (*level_failure)
433
                                );
434

    
435
extern void dangerous_level_step (int q, 
436
                                  _Bool (*dangerous_level)
437
                                  );
438

    
439
extern void AND_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
440
                      _Bool (*AND)
441
                      );
442

    
443

    
444
#endif
445