aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/lustrev6-convertible/convertible_main.h
blob: 6be30a78d019fe2202ef91ae85fa6a4d190031e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
/* This file was generated by lus2lic version master.668 (35901e970a0c377cc36d6437dcbc61beb8001b54). */
/*  lus2lic -2c convertible.lus -n main */
/* on ovaz the 27/10/2016 at 11:39:07 */

#include <stdlib.h>
#include <string.h>

#include "lustre_types.h"
#include "lustre_consts.h"

#ifndef _convertible_main_H_FILE
#define _convertible_main_H_FILE
// Memoryless soc ctx typedef 
// Memoryfull soc ctx typedef 
/* Lustre_pre_ctx */
typedef struct {
   /*Memory cell*/
   convertible_hood_state _memory ;
} Lustre_pre_ctx_type;

/* Lustre_arrow_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_ctx_type;

/* Lustre_pre_2_ctx */
typedef struct {
   /*Memory cell*/
   convertible_hood_speed_state _memory ;
} Lustre_pre_2_ctx_type;

/* Lustre_arrow_2_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_2_ctx_type;

/* Lustre_pre_3_ctx */
typedef struct {
   /*Memory cell*/
   _real _memory ;
} Lustre_pre_3_ctx_type;

/* Lustre_arrow_3_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_3_ctx_type;

/* convertible_hood_speed_ctx */
typedef struct {
   /*INSTANCES*/
   Lustre_pre_2_ctx_type Lustre_pre_2_ctx_tab[1];
   Lustre_pre_3_ctx_type Lustre_pre_3_ctx_tab[2];
   Lustre_arrow_2_ctx_type Lustre_arrow_2_ctx_tab[1];
   Lustre_arrow_3_ctx_type Lustre_arrow_3_ctx_tab[2];
} convertible_hood_speed_ctx_type;

/* convertible_hood_ctx */
typedef struct {
   /*INSTANCES*/
   convertible_hood_speed_ctx_type convertible_hood_speed_ctx_tab[1];
   Lustre_pre_ctx_type Lustre_pre_ctx_tab[1];
   Lustre_arrow_ctx_type Lustre_arrow_ctx_tab[1];
} convertible_hood_ctx_type;

/* Lustre_arrow_4_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_4_ctx_type;

/* Lustre_pre_4_ctx */
typedef struct {
   /*Memory cell*/
   _integer _memory ;
} Lustre_pre_4_ctx_type;

/* Lustre_pre_5_ctx */
typedef struct {
   /*Memory cell*/
   _real _memory[50] ;
} Lustre_pre_5_ctx_type;

/* Lustre_arrow_5_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_5_ctx_type;

/* sum_50_0d0_ctx */
typedef struct {
   /*INSTANCES*/
   Lustre_pre_5_ctx_type Lustre_pre_5_ctx_tab[1];
   Lustre_pre_4_ctx_type Lustre_pre_4_ctx_tab[1];
   Lustre_arrow_5_ctx_type Lustre_arrow_5_ctx_tab[1];
   Lustre_arrow_4_ctx_type Lustre_arrow_4_ctx_tab[1];
} sum_50_0d0_ctx_type;

/* sum_50_0d1_ctx */
typedef struct {
   /*INSTANCES*/
   Lustre_pre_5_ctx_type Lustre_pre_5_ctx_tab[1];
   Lustre_pre_4_ctx_type Lustre_pre_4_ctx_tab[1];
   Lustre_arrow_5_ctx_type Lustre_arrow_5_ctx_tab[1];
   Lustre_arrow_4_ctx_type Lustre_arrow_4_ctx_tab[1];
} sum_50_0d1_ctx_type;

/* convertible_speed_kmh_ctx */
typedef struct {
   /*INSTANCES*/
   sum_50_0d1_ctx_type sum_50_0d1_ctx_tab[1];
   sum_50_0d0_ctx_type sum_50_0d0_ctx_tab[1];
   Lustre_pre_3_ctx_type Lustre_pre_3_ctx_tab[3];
   Lustre_arrow_3_ctx_type Lustre_arrow_3_ctx_tab[3];
} convertible_speed_kmh_ctx_type;

/* Lustre_pre_6_ctx */
typedef struct {
   /*Memory cell*/
   convertible_vehicle_state _memory ;
} Lustre_pre_6_ctx_type;

/* Lustre_arrow_6_ctx */
typedef struct {
   /*Memory cell*/
   _boolean _memory ;
} Lustre_arrow_6_ctx_type;

/* convertible_vehicle_ctx */
typedef struct {
   /*INSTANCES*/
   Lustre_pre_6_ctx_type Lustre_pre_6_ctx_tab[1];
   Lustre_arrow_6_ctx_type Lustre_arrow_6_ctx_tab[1];
} convertible_vehicle_ctx_type;

/* convertible_may_collide_ctx */
typedef struct {
   /*INSTANCES*/
   Lustre_pre_3_ctx_type Lustre_pre_3_ctx_tab[1];
   Lustre_arrow_3_ctx_type Lustre_arrow_3_ctx_tab[1];
} convertible_may_collide_ctx_type;

/* convertible_main_ctx */
typedef struct {
   /*INSTANCES*/
   convertible_vehicle_ctx_type convertible_vehicle_ctx_tab[1];
   convertible_speed_kmh_ctx_type convertible_speed_kmh_ctx_tab[1];
   convertible_may_collide_ctx_type convertible_may_collide_ctx_tab[1];
   convertible_hood_ctx_type convertible_hood_ctx_tab[1];
} convertible_main_ctx_type;

void Lustre_arrow_4_ctx_reset(Lustre_arrow_4_ctx_type* ctx);
Lustre_arrow_4_ctx_type* Lustre_arrow_4_ctx_new_ctx();
void Lustre_arrow_4_step(_integer ,_integer ,_integer *,Lustre_arrow_4_ctx_type*);

void Lustre_arrow_3_ctx_reset(Lustre_arrow_3_ctx_type* ctx);
Lustre_arrow_3_ctx_type* Lustre_arrow_3_ctx_new_ctx();
void Lustre_arrow_3_step(_real ,_real ,_real *,Lustre_arrow_3_ctx_type*);

void Lustre_arrow_2_ctx_reset(Lustre_arrow_2_ctx_type* ctx);
Lustre_arrow_2_ctx_type* Lustre_arrow_2_ctx_new_ctx();
void Lustre_arrow_2_step(convertible_hood_speed_state ,convertible_hood_speed_state ,convertible_hood_speed_state *,Lustre_arrow_2_ctx_type*);

void Lustre_arrow_ctx_reset(Lustre_arrow_ctx_type* ctx);
Lustre_arrow_ctx_type* Lustre_arrow_ctx_new_ctx();
void Lustre_arrow_step(convertible_hood_state ,convertible_hood_state ,convertible_hood_state *,Lustre_arrow_ctx_type*);

void Lustre_arrow_6_ctx_reset(Lustre_arrow_6_ctx_type* ctx);
Lustre_arrow_6_ctx_type* Lustre_arrow_6_ctx_new_ctx();
void Lustre_arrow_6_step(convertible_vehicle_state ,convertible_vehicle_state ,convertible_vehicle_state *,Lustre_arrow_6_ctx_type*);

void Lustre_arrow_5_ctx_reset(Lustre_arrow_5_ctx_type* ctx);
Lustre_arrow_5_ctx_type* Lustre_arrow_5_ctx_new_ctx();
void Lustre_arrow_5_step(_real [50],_real [50],_real [50]/*out*/,Lustre_arrow_5_ctx_type*);

void Lustre_eq_step(_integer ,_integer ,_boolean *);

void Lustre_eq_2_step(_real ,_real ,_boolean *);

void Lustre_eq_3_step(convertible_hood_state ,convertible_hood_state ,_boolean *);

void Lustre_hat_step(_real ,_real [50]/*out*/);

void Lustre_pre_4_ctx_reset(Lustre_pre_4_ctx_type* ctx);
Lustre_pre_4_ctx_type* Lustre_pre_4_ctx_new_ctx();
void Lustre_pre_4_get(_integer *,Lustre_pre_4_ctx_type*);

void Lustre_pre_4_set(_integer ,Lustre_pre_4_ctx_type*);

void Lustre_pre_3_ctx_reset(Lustre_pre_3_ctx_type* ctx);
Lustre_pre_3_ctx_type* Lustre_pre_3_ctx_new_ctx();
void Lustre_pre_3_get(_real *,Lustre_pre_3_ctx_type*);

void Lustre_pre_3_set(_real ,Lustre_pre_3_ctx_type*);

void Lustre_pre_2_ctx_reset(Lustre_pre_2_ctx_type* ctx);
Lustre_pre_2_ctx_type* Lustre_pre_2_ctx_new_ctx();
void Lustre_pre_2_get(convertible_hood_speed_state *,Lustre_pre_2_ctx_type*);

void Lustre_pre_2_set(convertible_hood_speed_state ,Lustre_pre_2_ctx_type*);

void Lustre_pre_ctx_reset(Lustre_pre_ctx_type* ctx);
Lustre_pre_ctx_type* Lustre_pre_ctx_new_ctx();
void Lustre_pre_get(convertible_hood_state *,Lustre_pre_ctx_type*);

void Lustre_pre_set(convertible_hood_state ,Lustre_pre_ctx_type*);

void Lustre_pre_6_ctx_reset(Lustre_pre_6_ctx_type* ctx);
Lustre_pre_6_ctx_type* Lustre_pre_6_ctx_new_ctx();
void Lustre_pre_6_get(convertible_vehicle_state *,Lustre_pre_6_ctx_type*);

void Lustre_pre_6_set(convertible_vehicle_state ,Lustre_pre_6_ctx_type*);

void Lustre_pre_5_ctx_reset(Lustre_pre_5_ctx_type* ctx);
Lustre_pre_5_ctx_type* Lustre_pre_5_ctx_new_ctx();
void Lustre_pre_5_get(_real [50]/*out*/,Lustre_pre_5_ctx_type*);

void Lustre_pre_5_set(_real [50],Lustre_pre_5_ctx_type*);

void Lustre_slash_step(_real ,_real ,_real *);

void assign_50_step(_real ,_integer ,_real [50],_real [50]/*out*/);

void convertible_abs_step(_real ,_real *);

void convertible_braking_time_step(_real ,_real *);

void convertible_hood_ctx_reset(convertible_hood_ctx_type* ctx);
convertible_hood_ctx_type* convertible_hood_ctx_new_ctx();
void convertible_hood_step(_boolean ,_boolean ,_boolean ,_boolean ,_boolean *,_real *,convertible_hood_ctx_type*);

void convertible_hood_speed_ctx_reset(convertible_hood_speed_ctx_type* ctx);
convertible_hood_speed_ctx_type* convertible_hood_speed_ctx_new_ctx();
void convertible_hood_speed_step(_boolean ,_real *,convertible_hood_speed_ctx_type*);

void convertible_main_ctx_reset(convertible_main_ctx_type* ctx);
convertible_main_ctx_type* convertible_main_ctx_new_ctx();
void convertible_main_step(_boolean ,_boolean ,_boolean ,_boolean ,_boolean ,_boolean ,_real ,_boolean *,_boolean *,_real *,_real *,convertible_main_ctx_type*);

void convertible_maxr_step(_real ,_real ,_real *);

void convertible_may_collide_ctx_reset(convertible_may_collide_ctx_type* ctx);
convertible_may_collide_ctx_type* convertible_may_collide_ctx_new_ctx();
void convertible_may_collide_step(_real ,_real ,_boolean *,convertible_may_collide_ctx_type*);

void convertible_ms_to_kmh_step(_real ,_real *);

void convertible_solve_eq_d2_step(_real ,_real ,_real ,_real *);

void convertible_speed_kmh_ctx_reset(convertible_speed_kmh_ctx_type* ctx);
convertible_speed_kmh_ctx_type* convertible_speed_kmh_ctx_new_ctx();
void convertible_speed_kmh_step(_boolean ,_boolean ,_real *,convertible_speed_kmh_ctx_type*);

void convertible_sqrt_step(_real ,_real *);

void convertible_vehicle_ctx_reset(convertible_vehicle_ctx_type* ctx);
convertible_vehicle_ctx_type* convertible_vehicle_ctx_new_ctx();
void convertible_vehicle_step(_boolean ,_boolean ,_real ,_real ,convertible_vehicle_state *,convertible_vehicle_ctx_type*);

void fillred_update_cell_do_50_step(convertible_update_acc ,_real [50],convertible_update_acc *,_real [50]/*out*/);

void red_rplus_50_real_step(_real ,_real [50],_real *);

void squareR_1_step(_real ,_real ,_real *);

void squareR_2_step(_real ,_real ,_real *);

void squareR_3_step(_real ,_real ,_real *);

void squareR_4_step(_real ,_real ,_real *);

void squareR_5_step(_real ,_real ,_real *);

void sum_50_0d0_ctx_reset(sum_50_0d0_ctx_type* ctx);
sum_50_0d0_ctx_type* sum_50_0d0_ctx_new_ctx();
void sum_50_0d0_step(_real ,_real *,sum_50_0d0_ctx_type*);

void sum_50_0d1_ctx_reset(sum_50_0d1_ctx_type* ctx);
sum_50_0d1_ctx_type* sum_50_0d1_ctx_new_ctx();
void sum_50_0d1_step(_real ,_real *,sum_50_0d1_ctx_type*);

void update_cell_do_50_step(convertible_update_acc ,_real ,convertible_update_acc *,_real *);

/////////////////////////////////////////////////
#endif