PIPS
compsec.c
Go to the documentation of this file.
1 /*
2  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
3  *
4  * PLEASE DO NOT MODIFY IT.
5  */
6 
7 typedef void * Pvecteur;
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include "genC.h"
13 #include "compsec.h"
14 
15 
16 /* BOUND_PAIR
17  */
19  return (bound_pair) gen_copy_tree((gen_chunk*) p);
20 }
22  gen_free((gen_chunk*) p);
23 }
26 }
29  return gen_consistent_p((gen_chunk*) p);
30 }
32  return gen_defined_p((gen_chunk*) p);
33 }
36 }
40  message_assert("defined references to domain bound_pair",
42  memcpy(r, v, sizeof(struct _newgen_struct_bound_pair_));
43 }
45  // should clear up contents...
46  free(p);
47 }
48 void write_bound_pair(FILE* f, bound_pair p) {
49  gen_write(f, (gen_chunk*) p);
50 }
52  return (bound_pair) gen_read(f);
53 }
55  return (bound_pair) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, bound_pair_domain, a1, a2, a3);
56 }
57 
58 /* COMP_DESC
59  */
61  return (comp_desc) gen_copy_tree((gen_chunk*) p);
62 }
64  gen_free((gen_chunk*) p);
65 }
68 }
70  check_comp_desc(p);
71  return gen_consistent_p((gen_chunk*) p);
72 }
74  return gen_defined_p((gen_chunk*) p);
75 }
78 }
80  check_comp_desc(r);
81  check_comp_desc(v);
82  message_assert("defined references to domain comp_desc",
84  memcpy(r, v, sizeof(struct _newgen_struct_comp_desc_));
85 }
87  // should clear up contents...
88  free(p);
89 }
90 void write_comp_desc(FILE* f, comp_desc p) {
91  gen_write(f, (gen_chunk*) p);
92 }
94  return (comp_desc) gen_read(f);
95 }
97  return (comp_desc) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, comp_desc_domain, a1, a2, a3);
98 }
99 
100 /* COMP_DESC_SET
101  */
103  return (comp_desc_set) gen_copy_tree((gen_chunk*) p);
104 }
106  gen_free((gen_chunk*) p);
107 }
110 }
113  return gen_consistent_p((gen_chunk*) p);
114 }
116  return gen_defined_p((gen_chunk*) p);
117 }
120 }
124  message_assert("defined references to domain comp_desc_set",
126  memcpy(r, v, sizeof(struct _newgen_struct_comp_desc_set_));
127 }
129  // should clear up contents...
130  free(p);
131 }
133  gen_write(f, (gen_chunk*) p);
134 }
136  return (comp_desc_set) gen_read(f);
137 }
140 }
141 
142 /* COMP_SEC
143  */
145  return (comp_sec) gen_copy_tree((gen_chunk*) p);
146 }
148  gen_free((gen_chunk*) p);
149 }
152 }
154  check_comp_sec(p);
155  return gen_consistent_p((gen_chunk*) p);
156 }
158  return gen_defined_p((gen_chunk*) p);
159 }
162 }
164  check_comp_sec(r);
165  check_comp_sec(v);
166  message_assert("defined references to domain comp_sec",
168  memcpy(r, v, sizeof(struct _newgen_struct_comp_sec_));
169 }
171  // should clear up contents...
172  free(p);
173 }
174 void write_comp_sec(FILE* f, comp_sec p) {
175  gen_write(f, (gen_chunk*) p);
176 }
178  return (comp_sec) gen_read(f);
179 }
181  return (comp_sec) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, comp_sec_domain, a1, a2);
182 }
183 
184 /* CONTEXT_INFO
185  */
187  return (context_info) gen_copy_tree((gen_chunk*) p);
188 }
190  gen_free((gen_chunk*) p);
191 }
194 }
197  return gen_consistent_p((gen_chunk*) p);
198 }
200  return gen_defined_p((gen_chunk*) p);
201 }
204 }
208  message_assert("defined references to domain context_info",
210  memcpy(r, v, sizeof(struct _newgen_struct_context_info_));
211 }
213  // should clear up contents...
214  free(p);
215 }
217  gen_write(f, (gen_chunk*) p);
218 }
220  return (context_info) gen_read(f);
221 }
223  return (context_info) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, context_info_domain, a1, a2, a3);
224 }
225 
226 /* DAD_STRUCT
227  */
229  return (dad_struct) gen_copy_tree((gen_chunk*) p);
230 }
232  gen_free((gen_chunk*) p);
233 }
236 }
238  check_dad_struct(p);
239  return gen_consistent_p((gen_chunk*) p);
240 }
242  return gen_defined_p((gen_chunk*) p);
243 }
246 }
248  check_dad_struct(r);
249  check_dad_struct(v);
250  message_assert("defined references to domain dad_struct",
252  memcpy(r, v, sizeof(struct _newgen_struct_dad_struct_));
253 }
255  // should clear up contents...
256  free(p);
257 }
258 void write_dad_struct(FILE* f, dad_struct p) {
259  gen_write(f, (gen_chunk*) p);
260 }
262  return (dad_struct) gen_read(f);
263 }
265  return (dad_struct) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, dad_struct_domain, a1, a2);
266 }
267 
268 /* REF_TEMP
269  */
271  return (ref_temp) gen_copy_tree((gen_chunk*) p);
272 }
274  gen_free((gen_chunk*) p);
275 }
278 }
280  check_ref_temp(p);
281  return gen_consistent_p((gen_chunk*) p);
282 }
284  return gen_defined_p((gen_chunk*) p);
285 }
288 }
290  check_ref_temp(r);
291  check_ref_temp(v);
292  message_assert("defined references to domain ref_temp",
294  memcpy(r, v, sizeof(struct _newgen_struct_ref_temp_));
295 }
297  // should clear up contents...
298  free(p);
299 }
300 void write_ref_temp(FILE* f, ref_temp p) {
301  gen_write(f, (gen_chunk*) p);
302 }
304  return (ref_temp) gen_read(f);
305 }
307  return (ref_temp) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, ref_temp_domain, a1, a2);
308 }
309 
310 /* RTYPE
311  */
313  return (rtype) gen_copy_tree((gen_chunk*) p);
314 }
315 void free_rtype(rtype p) {
316  gen_free((gen_chunk*) p);
317 }
319  return (rtype) gen_check((gen_chunk*) p, rtype_domain);
320 }
322  check_rtype(p);
323  return gen_consistent_p((gen_chunk*) p);
324 }
326  return gen_defined_p((gen_chunk*) p);
327 }
329  return gen_typed_cons(RTYPE_NEWGEN_DOMAIN, p, l);
330 }
332  check_rtype(r);
333  check_rtype(v);
334  message_assert("defined references to domain rtype",
336  memcpy(r, v, sizeof(struct _newgen_struct_rtype_));
337 }
339  // should clear up contents...
340  free(p);
341 }
342 void write_rtype(FILE* f, rtype p) {
343  gen_write(f, (gen_chunk*) p);
344 }
346  return (rtype) gen_read(f);
347 }
349  switch (tag) {
350  case is_rtype_nonlinear: return "nonlinear";
351  case is_rtype_linvariant: return "linvariant";
352  case is_rtype_lininvariant: return "lininvariant";
353  default: return string_undefined;
354  }
355 }
356 rtype make_rtype(enum rtype_utype tag, void * val) {
357  return (rtype) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, rtype_domain, tag, val);
358 }
361 }
364 }
367 }
368 
369 /* SIMPLE_SECTION
370  */
372  return (simple_section) gen_copy_tree((gen_chunk*) p);
373 }
375  gen_free((gen_chunk*) p);
376 }
379 }
382  return gen_consistent_p((gen_chunk*) p);
383 }
385  return gen_defined_p((gen_chunk*) p);
386 }
389 }
393  message_assert("defined references to domain simple_section",
395  memcpy(r, v, sizeof(struct _newgen_struct_simple_section_));
396 }
398  // should clear up contents...
399  free(p);
400 }
402  gen_write(f, (gen_chunk*) p);
403 }
405  return (simple_section) gen_read(f);
406 }
409 }
410 
rtype copy_rtype(rtype p)
RTYPE.
Definition: compsec.c:312
rtype check_rtype(rtype p)
Definition: compsec.c:318
bool rtype_consistent_p(rtype p)
Definition: compsec.c:321
bool context_info_defined_p(context_info p)
Definition: compsec.c:199
void rtype_non_recursive_free(rtype p)
Definition: compsec.c:338
ref_temp make_ref_temp(intptr_t a1, rtype a2)
Definition: compsec.c:306
list gen_comp_desc_set_cons(comp_desc_set p, list l)
Definition: compsec.c:118
void * Pvecteur
Definition: compsec.c:7
bool comp_desc_set_defined_p(comp_desc_set p)
Definition: compsec.c:115
bool ref_temp_consistent_p(ref_temp p)
Definition: compsec.c:279
rtype make_rtype(enum rtype_utype tag, void *val)
Definition: compsec.c:356
rtype read_rtype(FILE *f)
Definition: compsec.c:345
list gen_comp_desc_cons(comp_desc p, list l)
Definition: compsec.c:76
void context_info_assign_contents(context_info r, context_info v)
Definition: compsec.c:205
bound_pair check_bound_pair(bound_pair p)
Definition: compsec.c:24
void comp_sec_assign_contents(comp_sec r, comp_sec v)
Definition: compsec.c:163
bool simple_section_consistent_p(simple_section p)
Definition: compsec.c:380
void free_context_info(context_info p)
Definition: compsec.c:189
comp_desc check_comp_desc(comp_desc p)
Definition: compsec.c:66
context_info read_context_info(FILE *f)
Definition: compsec.c:219
void comp_desc_non_recursive_free(comp_desc p)
Definition: compsec.c:86
list gen_bound_pair_cons(bound_pair p, list l)
Definition: compsec.c:34
void write_comp_desc_set(FILE *f, comp_desc_set p)
Definition: compsec.c:132
rtype make_rtype_nonlinear(void)
Definition: compsec.c:359
void simple_section_assign_contents(simple_section r, simple_section v)
Definition: compsec.c:390
comp_desc_set check_comp_desc_set(comp_desc_set p)
Definition: compsec.c:108
bool comp_sec_defined_p(comp_sec p)
Definition: compsec.c:157
bool rtype_defined_p(rtype p)
Definition: compsec.c:325
list gen_dad_struct_cons(dad_struct p, list l)
Definition: compsec.c:244
context_info check_context_info(context_info p)
Definition: compsec.c:192
rtype make_rtype_linvariant(void)
Definition: compsec.c:362
void write_comp_desc(FILE *f, comp_desc p)
Definition: compsec.c:90
void write_dad_struct(FILE *f, dad_struct p)
Definition: compsec.c:258
context_info copy_context_info(context_info p)
CONTEXT_INFO.
Definition: compsec.c:186
bound_pair make_bound_pair(intptr_t a1, Pvecteur a2, Pvecteur a3)
Definition: compsec.c:54
comp_sec check_comp_sec(comp_sec p)
Definition: compsec.c:150
bool bound_pair_consistent_p(bound_pair p)
Definition: compsec.c:27
bool comp_desc_consistent_p(comp_desc p)
Definition: compsec.c:69
void write_rtype(FILE *f, rtype p)
Definition: compsec.c:342
ref_temp read_ref_temp(FILE *f)
Definition: compsec.c:303
list gen_comp_sec_cons(comp_sec p, list l)
Definition: compsec.c:160
bool comp_desc_defined_p(comp_desc p)
Definition: compsec.c:73
void write_bound_pair(FILE *f, bound_pair p)
Definition: compsec.c:48
void rtype_assign_contents(rtype r, rtype v)
Definition: compsec.c:331
void comp_desc_assign_contents(comp_desc r, comp_desc v)
Definition: compsec.c:79
void free_dad_struct(dad_struct p)
Definition: compsec.c:231
bool bound_pair_defined_p(bound_pair p)
Definition: compsec.c:31
comp_desc_set read_comp_desc_set(FILE *f)
Definition: compsec.c:135
comp_desc make_comp_desc(reference a1, action a2, comp_sec a3)
Definition: compsec.c:96
comp_sec read_comp_sec(FILE *f)
Definition: compsec.c:177
ref_temp copy_ref_temp(ref_temp p)
REF_TEMP.
Definition: compsec.c:270
bool comp_sec_consistent_p(comp_sec p)
Definition: compsec.c:153
list gen_rtype_cons(rtype p, list l)
Definition: compsec.c:328
void free_ref_temp(ref_temp p)
Definition: compsec.c:273
list gen_simple_section_cons(simple_section p, list l)
Definition: compsec.c:387
bool simple_section_defined_p(simple_section p)
Definition: compsec.c:384
simple_section copy_simple_section(simple_section p)
SIMPLE_SECTION.
Definition: compsec.c:371
simple_section check_simple_section(simple_section p)
Definition: compsec.c:377
void write_simple_section(FILE *f, simple_section p)
Definition: compsec.c:401
comp_sec copy_comp_sec(comp_sec p)
COMP_SEC.
Definition: compsec.c:144
simple_section make_simple_section(context_info a1, dad_struct a2)
Definition: compsec.c:407
context_info make_context_info(intptr_t a1, intptr_t a2, intptr_t a3)
Definition: compsec.c:222
comp_desc_set make_comp_desc_set(list a)
Definition: compsec.c:138
void bound_pair_non_recursive_free(bound_pair p)
Definition: compsec.c:44
bound_pair read_bound_pair(FILE *f)
Definition: compsec.c:51
bool dad_struct_defined_p(dad_struct p)
Definition: compsec.c:241
list gen_context_info_cons(context_info p, list l)
Definition: compsec.c:202
void write_comp_sec(FILE *f, comp_sec p)
Definition: compsec.c:174
void dad_struct_non_recursive_free(dad_struct p)
Definition: compsec.c:254
bool comp_desc_set_consistent_p(comp_desc_set p)
Definition: compsec.c:111
void free_bound_pair(bound_pair p)
Definition: compsec.c:21
void comp_sec_non_recursive_free(comp_sec p)
Definition: compsec.c:170
void write_ref_temp(FILE *f, ref_temp p)
Definition: compsec.c:300
bool dad_struct_consistent_p(dad_struct p)
Definition: compsec.c:237
comp_desc copy_comp_desc(comp_desc p)
COMP_DESC.
Definition: compsec.c:60
void write_context_info(FILE *f, context_info p)
Definition: compsec.c:216
void free_comp_desc(comp_desc p)
Definition: compsec.c:63
void ref_temp_assign_contents(ref_temp r, ref_temp v)
Definition: compsec.c:289
bool context_info_consistent_p(context_info p)
Definition: compsec.c:195
dad_struct make_dad_struct(list a1, list a2)
Definition: compsec.c:264
void context_info_non_recursive_free(context_info p)
Definition: compsec.c:212
void bound_pair_assign_contents(bound_pair r, bound_pair v)
Definition: compsec.c:37
bound_pair copy_bound_pair(bound_pair p)
BOUND_PAIR.
Definition: compsec.c:18
void comp_desc_set_non_recursive_free(comp_desc_set p)
Definition: compsec.c:128
list gen_ref_temp_cons(ref_temp p, list l)
Definition: compsec.c:286
bool ref_temp_defined_p(ref_temp p)
Definition: compsec.c:283
void free_rtype(rtype p)
Definition: compsec.c:315
void comp_desc_set_assign_contents(comp_desc_set r, comp_desc_set v)
Definition: compsec.c:121
void free_comp_desc_set(comp_desc_set p)
Definition: compsec.c:105
string rtype_tag_as_string(enum rtype_utype tag)
Definition: compsec.c:348
comp_sec make_comp_sec(simple_section a1, list a2)
Definition: compsec.c:180
void ref_temp_non_recursive_free(ref_temp p)
Definition: compsec.c:296
comp_desc read_comp_desc(FILE *f)
Definition: compsec.c:93
dad_struct copy_dad_struct(dad_struct p)
DAD_STRUCT.
Definition: compsec.c:228
void free_comp_sec(comp_sec p)
Definition: compsec.c:147
void dad_struct_assign_contents(dad_struct r, dad_struct v)
Definition: compsec.c:247
dad_struct read_dad_struct(FILE *f)
Definition: compsec.c:261
ref_temp check_ref_temp(ref_temp p)
Definition: compsec.c:276
simple_section read_simple_section(FILE *f)
Definition: compsec.c:404
void simple_section_non_recursive_free(simple_section p)
Definition: compsec.c:397
comp_desc_set copy_comp_desc_set(comp_desc_set p)
COMP_DESC_SET.
Definition: compsec.c:102
rtype make_rtype_lininvariant(void)
Definition: compsec.c:365
dad_struct check_dad_struct(dad_struct p)
Definition: compsec.c:234
void free_simple_section(simple_section p)
Definition: compsec.c:374
#define BOUND_PAIR_NEWGEN_DOMAIN
Definition: compsec.h:35
#define CONTEXT_INFO_NEWGEN_DOMAIN
Definition: compsec.h:67
#define RTYPE_NEWGEN_DOMAIN
Definition: compsec.h:91
#define ref_temp_domain
newgen_dad_struct_domain_defined
Definition: compsec.h:80
#define REF_TEMP_NEWGEN_DOMAIN
Definition: compsec.h:83
#define COMP_DESC_SET_NEWGEN_DOMAIN
Definition: compsec.h:51
#define comp_sec_domain
newgen_comp_desc_set_domain_defined
Definition: compsec.h:56
#define comp_desc_domain
newgen_bound_pair_domain_defined
Definition: compsec.h:40
#define context_info_domain
newgen_comp_sec_domain_defined
Definition: compsec.h:64
#define rtype_domain
newgen_ref_temp_domain_defined
Definition: compsec.h:88
#define DAD_STRUCT_NEWGEN_DOMAIN
Definition: compsec.h:75
#define COMP_DESC_NEWGEN_DOMAIN
Definition: compsec.h:43
#define SIMPLE_SECTION_NEWGEN_DOMAIN
Definition: compsec.h:99
#define simple_section_domain
newgen_rtype_domain_defined
Definition: compsec.h:96
#define comp_desc_set_domain
newgen_comp_desc_domain_defined
Definition: compsec.h:48
#define bound_pair_domain
newgen_Pvecteur_domain_defined
Definition: compsec.h:32
rtype_utype
Definition: compsec.h:384
@ is_rtype_nonlinear
Definition: compsec.h:385
@ is_rtype_lininvariant
Definition: compsec.h:387
@ is_rtype_linvariant
Definition: compsec.h:386
#define dad_struct_domain
newgen_context_info_domain_defined
Definition: compsec.h:72
#define COMP_SEC_NEWGEN_DOMAIN
Definition: compsec.h:59
#define GEN_CHECK_ALLOC
Definition: genC.h:307
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745
void free(void *)
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define message_assert(msg, ex)
Definition: newgen_assert.h:47
int tag
TAG.
Definition: newgen_types.h:92
#define string_undefined
Definition: newgen_types.h:40
#define UU
Definition: newgen_types.h:98
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define intptr_t
Definition: stdint.in.h:294
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
A gen_chunk is used to store every object.
Definition: genC.h:58