PIPS
complexity_ri.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 * Ppolynome;
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include "genC.h"
13 #include "complexity_ri.h"
14 
15 
16 /* COMPLEXITY
17  */
19  return (complexity) 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 complexity",
42  memcpy(r, v, sizeof(struct _newgen_struct_complexity_));
43 }
45  // should clear up contents...
46  free(p);
47 }
48 void write_complexity(FILE* f, complexity p) {
49  gen_write(f, (gen_chunk*) p);
50 }
52  return (complexity) gen_read(f);
53 }
55  return (complexity) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, complexity_domain, a1, a2, a3, a4);
56 }
57 
58 /* IFCOUNT
59  */
61  return (ifcount) gen_copy_tree((gen_chunk*) p);
62 }
64  gen_free((gen_chunk*) p);
65 }
67  return (ifcount) gen_check((gen_chunk*) p, ifcount_domain);
68 }
70  check_ifcount(p);
71  return gen_consistent_p((gen_chunk*) p);
72 }
74  return gen_defined_p((gen_chunk*) p);
75 }
78 }
80  check_ifcount(r);
81  check_ifcount(v);
82  message_assert("defined references to domain ifcount",
84  memcpy(r, v, sizeof(struct _newgen_struct_ifcount_));
85 }
87  // should clear up contents...
88  free(p);
89 }
90 void write_ifcount(FILE* f, ifcount p) {
91  gen_write(f, (gen_chunk*) p);
92 }
94  return (ifcount) gen_read(f);
95 }
97  return (ifcount) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, ifcount_domain, a1, a2, a3);
98 }
99 
100 /* RANGECOUNT
101  */
103  return (rangecount) gen_copy_tree((gen_chunk*) p);
104 }
106  gen_free((gen_chunk*) p);
107 }
110 }
112  check_rangecount(p);
113  return gen_consistent_p((gen_chunk*) p);
114 }
116  return gen_defined_p((gen_chunk*) p);
117 }
120 }
122  check_rangecount(r);
123  check_rangecount(v);
124  message_assert("defined references to domain rangecount",
126  memcpy(r, v, sizeof(struct _newgen_struct_rangecount_));
127 }
129  // should clear up contents...
130  free(p);
131 }
132 void write_rangecount(FILE* f, rangecount p) {
133  gen_write(f, (gen_chunk*) p);
134 }
136  return (rangecount) gen_read(f);
137 }
139  return (rangecount) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, rangecount_domain, a1, a2, a3, a4);
140 }
141 
142 /* VARCOUNT
143  */
145  return (varcount) gen_copy_tree((gen_chunk*) p);
146 }
148  gen_free((gen_chunk*) p);
149 }
152 }
154  check_varcount(p);
155  return gen_consistent_p((gen_chunk*) p);
156 }
158  return gen_defined_p((gen_chunk*) p);
159 }
162 }
164  check_varcount(r);
165  check_varcount(v);
166  message_assert("defined references to domain varcount",
168  memcpy(r, v, sizeof(struct _newgen_struct_varcount_));
169 }
171  // should clear up contents...
172  free(p);
173 }
174 void write_varcount(FILE* f, varcount p) {
175  gen_write(f, (gen_chunk*) p);
176 }
178  return (varcount) gen_read(f);
179 }
181  return (varcount) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, varcount_domain, a1, a2, a3, a4);
182 }
183 
list gen_ifcount_cons(ifcount p, list l)
Definition: complexity_ri.c:76
bool complexity_defined_p(complexity p)
Definition: complexity_ri.c:31
void varcount_non_recursive_free(varcount p)
void free_varcount(varcount p)
void free_rangecount(rangecount p)
varcount copy_varcount(varcount p)
VARCOUNT.
rangecount make_rangecount(intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4)
void rangecount_assign_contents(rangecount r, rangecount v)
varcount check_varcount(varcount p)
void complexity_assign_contents(complexity r, complexity v)
Definition: complexity_ri.c:37
void complexity_non_recursive_free(complexity p)
Definition: complexity_ri.c:44
list gen_complexity_cons(complexity p, list l)
Definition: complexity_ri.c:34
void free_ifcount(ifcount p)
Definition: complexity_ri.c:63
void write_varcount(FILE *f, varcount p)
bool varcount_defined_p(varcount p)
rangecount read_rangecount(FILE *f)
varcount read_varcount(FILE *f)
varcount make_varcount(intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4)
bool ifcount_defined_p(ifcount p)
Definition: complexity_ri.c:73
bool ifcount_consistent_p(ifcount p)
Definition: complexity_ri.c:69
complexity read_complexity(FILE *f)
Definition: complexity_ri.c:51
rangecount check_rangecount(rangecount p)
list gen_rangecount_cons(rangecount p, list l)
void * Ppolynome
Definition: complexity_ri.c:7
void rangecount_non_recursive_free(rangecount p)
bool rangecount_defined_p(rangecount p)
complexity check_complexity(complexity p)
Definition: complexity_ri.c:24
void free_complexity(complexity p)
Definition: complexity_ri.c:21
rangecount copy_rangecount(rangecount p)
RANGECOUNT.
complexity copy_complexity(complexity p)
COMPLEXITY.
Definition: complexity_ri.c:18
void write_ifcount(FILE *f, ifcount p)
Definition: complexity_ri.c:90
ifcount read_ifcount(FILE *f)
Definition: complexity_ri.c:93
void varcount_assign_contents(varcount r, varcount v)
void write_complexity(FILE *f, complexity p)
Definition: complexity_ri.c:48
void ifcount_assign_contents(ifcount r, ifcount v)
Definition: complexity_ri.c:79
void write_rangecount(FILE *f, rangecount p)
bool rangecount_consistent_p(rangecount p)
ifcount make_ifcount(intptr_t a1, intptr_t a2, intptr_t a3)
Definition: complexity_ri.c:96
complexity make_complexity(Ppolynome a1, varcount a2, rangecount a3, ifcount a4)
Definition: complexity_ri.c:54
bool varcount_consistent_p(varcount p)
ifcount check_ifcount(ifcount p)
Definition: complexity_ri.c:66
void ifcount_non_recursive_free(ifcount p)
Definition: complexity_ri.c:86
bool complexity_consistent_p(complexity p)
Definition: complexity_ri.c:27
ifcount copy_ifcount(ifcount p)
IFCOUNT.
Definition: complexity_ri.c:60
list gen_varcount_cons(varcount p, list l)
#define complexity_domain
newgen_Ppolynome_domain_defined
Definition: complexity_ri.h:25
#define VARCOUNT_NEWGEN_DOMAIN
Definition: complexity_ri.h:52
#define rangecount_domain
newgen_ifcount_domain_defined
Definition: complexity_ri.h:41
#define COMPLEXITY_NEWGEN_DOMAIN
Definition: complexity_ri.h:28
#define RANGECOUNT_NEWGEN_DOMAIN
Definition: complexity_ri.h:44
#define IFCOUNT_NEWGEN_DOMAIN
Definition: complexity_ri.h:36
#define ifcount_domain
newgen_complexity_domain_defined
Definition: complexity_ri.h:33
#define varcount_domain
newgen_rangecount_domain_defined
Definition: complexity_ri.h:49
#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 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
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