Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (20.5 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_ARR1
7
#define _STEAM_BOILER_NO_ARR1
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 Verification_mem;
22
struct BoilerController_mem;
23
struct FEDGE2_mem;
24
struct FEDGE1_mem;
25
struct Valve_mem;
26
struct SteamDefect_mem;
27
struct PumpsStatus_mem;
28
struct PumpsOutput_mem;
29
struct PumpsDecision_mem;
30
struct PumpDefect_mem;
31
struct Operator_mem;
32
struct LevelDefect_mem;
33
struct Dynamics_mem;
34
struct ControlMode_mem;
35
struct REDGE_mem;
36
struct operate_pumps_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 stop, _Bool steam_boiler_waiting,
46
                      _Bool physical_units_ready, int level, int steam,
47
                      int pump_state_0, int pump_state_1, int pump_state_2,
48
                      int pump_state_3, _Bool pump_control_state_0,
49
                      _Bool pump_control_state_1, _Bool pump_control_state_2,
50
                      _Bool pump_control_state_3, _Bool pump_repaired_0,
51
                      _Bool pump_repaired_1, _Bool pump_repaired_2,
52
                      _Bool pump_repaired_3, _Bool pump_control_repaired_0,
53
                      _Bool pump_control_repaired_1,
54
                      _Bool pump_control_repaired_2,
55
                      _Bool pump_control_repaired_3, _Bool level_repaired,
56
                      _Bool steam_repaired,
57
                      _Bool pump_failure_acknowledgement_0,
58
                      _Bool pump_failure_acknowledgement_1,
59
                      _Bool pump_failure_acknowledgement_2,
60
                      _Bool pump_failure_acknowledgement_3,
61
                      _Bool pump_control_failure_acknowledgement_0,
62
                      _Bool pump_control_failure_acknowledgement_1,
63
                      _Bool pump_control_failure_acknowledgement_2,
64
                      _Bool pump_control_failure_acknowledgement_3,
65
                      _Bool level_failure_acknowledgement,
66
                      _Bool steam_failure_acknowledgement, 
67
                      _Bool (*OK),
68
                      struct top_mem *self);
69

    
70
extern void NOT_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
71
                      _Bool (*NOT_0), _Bool (*NOT_1), _Bool (*NOT_2),
72
                      _Bool (*NOT_3)
73
                      );
74

    
75
extern void Verification_reset (struct Verification_mem *self);
76

    
77
extern void Verification_init (struct Verification_mem *self);
78

    
79
extern void Verification_clear (struct Verification_mem *self);
80

    
81
extern void Verification_step (_Bool S1, _Bool S2, 
82
                               _Bool (*property_ok),
83
                               struct Verification_mem *self);
84

    
85
extern void BoilerController_reset (struct BoilerController_mem *self);
86

    
87
extern void BoilerController_init (struct BoilerController_mem *self);
88

    
89
extern void BoilerController_clear (struct BoilerController_mem *self);
90

    
91
extern void BoilerController_step (_Bool stop, _Bool steam_boiler_waiting,
92
                                   _Bool physical_units_ready, int level,
93
                                   int steam, int pump_state_0,
94
                                   int pump_state_1, int pump_state_2,
95
                                   int pump_state_3,
96
                                   _Bool pump_control_state_0,
97
                                   _Bool pump_control_state_1,
98
                                   _Bool pump_control_state_2,
99
                                   _Bool pump_control_state_3,
100
                                   _Bool pump_repaired_0,
101
                                   _Bool pump_repaired_1,
102
                                   _Bool pump_repaired_2,
103
                                   _Bool pump_repaired_3,
104
                                   _Bool pump_control_repaired_0,
105
                                   _Bool pump_control_repaired_1,
106
                                   _Bool pump_control_repaired_2,
107
                                   _Bool pump_control_repaired_3,
108
                                   _Bool level_repaired,
109
                                   _Bool steam_repaired,
110
                                   _Bool pump_failure_acknowledgement_0,
111
                                   _Bool pump_failure_acknowledgement_1,
112
                                   _Bool pump_failure_acknowledgement_2,
113
                                   _Bool pump_failure_acknowledgement_3,
114
                                   _Bool pump_control_failure_acknowledgement_0,
115
                                   _Bool pump_control_failure_acknowledgement_1,
116
                                   _Bool pump_control_failure_acknowledgement_2,
117
                                   _Bool pump_control_failure_acknowledgement_3,
118
                                   _Bool level_failure_acknowledgement,
119
                                   _Bool steam_failure_acknowledgement, 
120
                                   _Bool (*program_ready), int (*mode),
121
                                   _Bool (*valve), _Bool (*open_pump_0),
122
                                   _Bool (*open_pump_1),
123
                                   _Bool (*open_pump_2),
124
                                   _Bool (*open_pump_3),
125
                                   _Bool (*close_pump_0),
126
                                   _Bool (*close_pump_1),
127
                                   _Bool (*close_pump_2),
128
                                   _Bool (*close_pump_3),
129
                                   _Bool (*pump_failure_detection_0),
130
                                   _Bool (*pump_failure_detection_1),
131
                                   _Bool (*pump_failure_detection_2),
132
                                   _Bool (*pump_failure_detection_3),
133
                                   _Bool (*pump_control_failure_detection_0),
134
                                   _Bool (*pump_control_failure_detection_1),
135
                                   _Bool (*pump_control_failure_detection_2),
136
                                   _Bool (*pump_control_failure_detection_3),
137
                                   _Bool (*level_failure_detection),
138
                                   _Bool (*steam_outcome_failure_detection),
139
                                   _Bool (*pump_repaired_acknowledgement_0),
140
                                   _Bool (*pump_repaired_acknowledgement_1),
141
                                   _Bool (*pump_repaired_acknowledgement_2),
142
                                   _Bool (*pump_repaired_acknowledgement_3),
143
                                   _Bool (*pump_control_repaired_acknowledgement_0),
144
                                   _Bool (*pump_control_repaired_acknowledgement_1),
145
                                   _Bool (*pump_control_repaired_acknowledgement_2),
146
                                   _Bool (*pump_control_repaired_acknowledgement_3),
147
                                   _Bool (*level_repaired_acknowledgement),
148
                                   _Bool (*steam_outcome_repaired_acknowledgement),
149
                                   struct BoilerController_mem *self);
150

    
151
extern void FEDGE2_reset (struct FEDGE2_mem *self);
152

    
153
extern void FEDGE2_init (struct FEDGE2_mem *self);
154

    
155
extern void FEDGE2_clear (struct FEDGE2_mem *self);
156

    
157
extern void FEDGE2_step (_Bool S, 
158
                         _Bool (*FEDGE2),
159
                         struct FEDGE2_mem *self);
160

    
161
extern void FEDGE1_reset (struct FEDGE1_mem *self);
162

    
163
extern void FEDGE1_init (struct FEDGE1_mem *self);
164

    
165
extern void FEDGE1_clear (struct FEDGE1_mem *self);
166

    
167
extern void FEDGE1_step (_Bool S, 
168
                         _Bool (*FEDGE1),
169
                         struct FEDGE1_mem *self);
170

    
171
extern void Valve_reset (struct Valve_mem *self);
172

    
173
extern void Valve_init (struct Valve_mem *self);
174

    
175
extern void Valve_clear (struct Valve_mem *self);
176

    
177
extern void Valve_step (int op_mode, int q, 
178
                        _Bool (*valve), int (*valve_state),
179
                        struct Valve_mem *self);
180

    
181
extern void SteamOutput_step (int op_mode, int steam_defect,
182
                              _Bool steam_repaired, 
183
                              _Bool (*steam_outcome_failure_detection),
184
                              _Bool (*steam_outcome_repaired_acknowledgement)
185
                              );
186

    
187
extern void SteamDefect_reset (struct SteamDefect_mem *self);
188

    
189
extern void SteamDefect_init (struct SteamDefect_mem *self);
190

    
191
extern void SteamDefect_clear (struct SteamDefect_mem *self);
192

    
193
extern void SteamDefect_step (_Bool steam_failure_acknowledgement,
194
                              _Bool steam_repaired, int steam, 
195
                              int (*SteamDefect),
196
                              struct SteamDefect_mem *self);
197

    
198
extern void PumpsStatus_reset (struct PumpsStatus_mem *self);
199

    
200
extern void PumpsStatus_init (struct PumpsStatus_mem *self);
201

    
202
extern void PumpsStatus_clear (struct PumpsStatus_mem *self);
203

    
204
extern void PumpsStatus_step (int n_pumps, int pump_defect_0,
205
                              int pump_defect_1, int pump_defect_2,
206
                              int pump_defect_3, _Bool flow_0, _Bool flow_1,
207
                              _Bool flow_2, _Bool flow_3, 
208
                              int (*pump_status_0), int (*pump_status_1),
209
                              int (*pump_status_2), int (*pump_status_3),
210
                              struct PumpsStatus_mem *self);
211

    
212
extern void PumpsOutput_reset (struct PumpsOutput_mem *self);
213

    
214
extern void PumpsOutput_init (struct PumpsOutput_mem *self);
215

    
216
extern void PumpsOutput_clear (struct PumpsOutput_mem *self);
217

    
218
extern void PumpsOutput_step (int op_mode, int pump_status_0,
219
                              int pump_status_1, int pump_status_2,
220
                              int pump_status_3, int pump_defect_0,
221
                              int pump_defect_1, int pump_defect_2,
222
                              int pump_defect_3, int pump_control_defect_0,
223
                              int pump_control_defect_1,
224
                              int pump_control_defect_2,
225
                              int pump_control_defect_3,
226
                              _Bool pump_repaired_0, _Bool pump_repaired_1,
227
                              _Bool pump_repaired_2, _Bool pump_repaired_3,
228
                              _Bool pump_control_repaired_0,
229
                              _Bool pump_control_repaired_1,
230
                              _Bool pump_control_repaired_2,
231
                              _Bool pump_control_repaired_3, 
232
                              _Bool (*open_pump_0), _Bool (*open_pump_1),
233
                              _Bool (*open_pump_2), _Bool (*open_pump_3),
234
                              _Bool (*close_pump_0), _Bool (*close_pump_1),
235
                              _Bool (*close_pump_2), _Bool (*close_pump_3),
236
                              _Bool (*pump_failure_detection_0),
237
                              _Bool (*pump_failure_detection_1),
238
                              _Bool (*pump_failure_detection_2),
239
                              _Bool (*pump_failure_detection_3),
240
                              _Bool (*pump_repaired_acknowledgement_0),
241
                              _Bool (*pump_repaired_acknowledgement_1),
242
                              _Bool (*pump_repaired_acknowledgement_2),
243
                              _Bool (*pump_repaired_acknowledgement_3),
244
                              _Bool (*pump_control_failure_detection_0),
245
                              _Bool (*pump_control_failure_detection_1),
246
                              _Bool (*pump_control_failure_detection_2),
247
                              _Bool (*pump_control_failure_detection_3),
248
                              _Bool (*pump_control_repaired_acknowledgement_0),
249
                              _Bool (*pump_control_repaired_acknowledgement_1),
250
                              _Bool (*pump_control_repaired_acknowledgement_2),
251
                              _Bool (*pump_control_repaired_acknowledgement_3),
252
                              struct PumpsOutput_mem *self);
253

    
254
extern void PumpsDecision_reset (struct PumpsDecision_mem *self);
255

    
256
extern void PumpsDecision_init (struct PumpsDecision_mem *self);
257

    
258
extern void PumpsDecision_clear (struct PumpsDecision_mem *self);
259

    
260
extern void PumpsDecision_step (int q, int v, 
261
                                int (*n_pumps),
262
                                struct PumpsDecision_mem *self);
263

    
264
extern void PumpDefect_reset (struct PumpDefect_mem *self);
265

    
266
extern void PumpDefect_init (struct PumpDefect_mem *self);
267

    
268
extern void PumpDefect_clear (struct PumpDefect_mem *self);
269

    
270
extern void PumpDefect_step (_Bool pump_failure_acknowledgement,
271
                             _Bool pump_repaired,
272
                             _Bool pump_control_failure_acknowledgement,
273
                             _Bool pump_control_repaired, int pump_status,
274
                             int pump_state, _Bool pump_control_state, 
275
                             int (*PumpDefect), int (*PumpControlDefect),
276
                             _Bool (*Flow),
277
                             struct PumpDefect_mem *self);
278

    
279
extern void Operator_reset (struct Operator_mem *self);
280

    
281
extern void Operator_init (struct Operator_mem *self);
282

    
283
extern void Operator_clear (struct Operator_mem *self);
284

    
285
extern void Operator_step (_Bool stop, 
286
                           _Bool (*stop_request),
287
                           struct Operator_mem *self);
288

    
289
extern void LevelOutput_step (int op_mode, int level_defect,
290
                              _Bool level_repaired, 
291
                              _Bool (*level_outcome_failure_detection),
292
                              _Bool (*level_outcome_repaired_acknowledgement)
293
                              );
294

    
295
extern void LevelDefect_reset (struct LevelDefect_mem *self);
296

    
297
extern void LevelDefect_init (struct LevelDefect_mem *self);
298

    
299
extern void LevelDefect_clear (struct LevelDefect_mem *self);
300

    
301
extern void LevelDefect_step (_Bool level_failure_acknowledgement,
302
                              _Bool level_repaired, int level, 
303
                              int (*LevelDefect),
304
                              struct LevelDefect_mem *self);
305

    
306
extern void Dynamics_reset (struct Dynamics_mem *self);
307

    
308
extern void Dynamics_init (struct Dynamics_mem *self);
309

    
310
extern void Dynamics_clear (struct Dynamics_mem *self);
311

    
312
extern void Dynamics_step (int valve_state, int level, int steam,
313
                           int level_defect, int steam_defect, _Bool flow_0,
314
                           _Bool flow_1, _Bool flow_2, _Bool flow_3, 
315
                           int (*q), int (*v), int (*p_0), int (*p_1),
316
                           int (*p_2), int (*p_3),
317
                           struct Dynamics_mem *self);
318

    
319
extern void ControlOutput_step (int op_mode, int level, _Bool valve, 
320
                                _Bool (*program_ready), int (*mode)
321
                                );
322

    
323
extern void ControlMode_reset (struct ControlMode_mem *self);
324

    
325
extern void ControlMode_init (struct ControlMode_mem *self);
326

    
327
extern void ControlMode_clear (struct ControlMode_mem *self);
328

    
329
extern void ControlMode_step (_Bool steam_boiler_waiting,
330
                              _Bool physical_units_ready, _Bool stop_request,
331
                              int steam, int level_defect, int steam_defect,
332
                              int pump_defect_0, int pump_defect_1,
333
                              int pump_defect_2, int pump_defect_3,
334
                              int pump_control_defect_0,
335
                              int pump_control_defect_1,
336
                              int pump_control_defect_2,
337
                              int pump_control_defect_3, int q,
338
                              int pump_state_0, int pump_state_1,
339
                              int pump_state_2, int pump_state_3, 
340
                              int (*op_mode),
341
                              struct ControlMode_mem *self);
342

    
343
extern void REDGE_reset (struct REDGE_mem *self);
344

    
345
extern void REDGE_init (struct REDGE_mem *self);
346

    
347
extern void REDGE_clear (struct REDGE_mem *self);
348

    
349
extern void REDGE_step (_Bool S, 
350
                        _Bool (*REDGE),
351
                        struct REDGE_mem *self);
352

    
353
extern void steam_failure_detect_step (int steam, 
354
                                       _Bool (*steam_failure_detect)
355
                                       );
356

    
357
extern void operate_pumps_reset (struct operate_pumps_mem *self);
358

    
359
extern void operate_pumps_init (struct operate_pumps_mem *self);
360

    
361
extern void operate_pumps_clear (struct operate_pumps_mem *self);
362

    
363
extern void operate_pumps_step (int n, int n_pumps_to_open,
364
                                int pump_status_0, int pump_status_1,
365
                                int pump_status_2, int pump_status_3,
366
                                int pump_defect_0, int pump_defect_1,
367
                                int pump_defect_2, int pump_defect_3,
368
                                _Bool flow_0, _Bool flow_1, _Bool flow_2,
369
                                _Bool flow_3, 
370
                                int (*operate_pumps_0),
371
                                int (*operate_pumps_1),
372
                                int (*operate_pumps_2),
373
                                int (*operate_pumps_3),
374
                                struct operate_pumps_mem *self);
375

    
376
extern void pump_failure_detect_step (int pump_status, int pump_state,
377
                                      _Bool pump_control_state, 
378
                                      _Bool (*pump_failure_detect),
379
                                      _Bool (*pump_control_failure_detect),
380
                                      _Bool (*flow)
381
                                      );
382

    
383
extern void level_failure_detect_step (int level, 
384
                                       _Bool (*level_failure_detect)
385
                                       );
386

    
387
extern void Defect_step (int statein, _Bool fail_cond, _Bool ack_chan,
388
                         _Bool repair_chan, 
389
                         int (*stateout)
390
                         );
391

    
392
extern void sum_step (int a_0, int a_1, int a_2, int a_3, 
393
                      int (*sum)
394
                      );
395

    
396
extern void initialization_complete_step (int op_mode, int level,
397
                                          _Bool valve, 
398
                                          _Bool (*initialization_complete)
399
                                          );
400

    
401
extern void failure_step (int level_defect, int steam_defect,
402
                          int pump_defect_0, int pump_defect_1,
403
                          int pump_defect_2, int pump_defect_3,
404
                          int pump_control_defect_0,
405
                          int pump_control_defect_1,
406
                          int pump_control_defect_2,
407
                          int pump_control_defect_3, 
408
                          _Bool (*failure)
409
                          );
410

    
411
extern void critical_failure_step (int op_mode, int steam, int level_defect,
412
                                   int steam_defect, int pump_defect_0,
413
                                   int pump_defect_1, int pump_defect_2,
414
                                   int pump_defect_3, int q,
415
                                   int pump_state_0, int pump_state_1,
416
                                   int pump_state_2, int pump_state_3, 
417
                                   _Bool (*critical_failure)
418
                                   );
419

    
420
extern void pump_control_failure_step (int pump_defect, 
421
                                       _Bool (*pump_failure)
422
                                       );
423

    
424
extern void OR_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
425
                     _Bool (*OR)
426
                     );
427

    
428
extern void transmission_failure_step (int pump_state_0, int pump_state_1,
429
                                       int pump_state_2, int pump_state_3, 
430
                                       _Bool (*transmission_failure)
431
                                       );
432

    
433
extern void steam_failure_startup_step (int steam, 
434
                                        _Bool (*steam_failure_startup)
435
                                        );
436

    
437
extern void steam_failure_step (int steam_defect, 
438
                                _Bool (*steam_failure)
439
                                );
440

    
441
extern void pump_failure_step (int pump_defect, 
442
                               _Bool (*pump_failure)
443
                               );
444

    
445
extern void level_failure_step (int level_defect, 
446
                                _Bool (*level_failure)
447
                                );
448

    
449
extern void dangerous_level_step (int q, 
450
                                  _Bool (*dangerous_level)
451
                                  );
452

    
453
extern void AND_step (_Bool a_0, _Bool a_1, _Bool a_2, _Bool a_3, 
454
                      _Bool (*AND)
455
                      );
456

    
457

    
458
#endif
459