PIPS
reductions_private.h
Go to the documentation of this file.
1 #ifndef _newgen_reductions_private_included
2 #define _newgen_reductions_private_included
3 #define _gen_reductions_private_start 100
4 /*
5  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
6  *
7  * PLEASE DO NOT MODIFY IT.
8  */
9 
10 #if !defined(_newgen_reference_domain_defined_)
11 #define _newgen_reference_domain_defined_
12 #define REFERENCE_NEWGEN_DOMAIN (reference_domain)
13 #define reference_NEWGEN_DOMAIN (reference_domain)
15 #endif /* _newgen_reference_domain_defined_ */
16 
17 #if !defined(_newgen_preference_domain_defined_)
18 #define _newgen_preference_domain_defined_
19 #define PREFERENCE_NEWGEN_DOMAIN (preference_domain)
20 #define preference_NEWGEN_DOMAIN (preference_domain)
22 #endif /* _newgen_preference_domain_defined_ */
23 
24 #if !defined(_newgen_entity_domain_defined_)
25 #define _newgen_entity_domain_defined_
26 #define ENTITY_NEWGEN_DOMAIN (entity_domain)
27 #define entity_NEWGEN_DOMAIN (entity_domain)
28 typedef struct _newgen_struct_entity_ * entity;
29 #endif /* _newgen_entity_domain_defined_ */
30 
31 #if !defined(_newgen_statement_domain_defined_)
32 #define _newgen_statement_domain_defined_
33 #define STATEMENT_NEWGEN_DOMAIN (statement_domain)
34 #define statement_NEWGEN_DOMAIN (statement_domain)
36 #endif /* _newgen_statement_domain_defined_ */
37 
38 #define pstatement_reductions_domain (_gen_reductions_private_start+0)
39 #if !defined(_newgen_pstatement_reductions_domain_defined_)
40 #define _newgen_pstatement_reductions_domain_defined_
41 #define PSTATEMENT_REDUCTIONS_NEWGEN_DOMAIN (pstatement_reductions_domain)
42 #define pstatement_reductions_NEWGEN_DOMAIN (pstatement_reductions_domain)
44 #endif /* _newgen_pstatement_reductions_domain_defined_ */
45 
46 #define reduction_operator_domain (_gen_reductions_private_start+1)
47 #if !defined(_newgen_reduction_operator_domain_defined_)
48 #define _newgen_reduction_operator_domain_defined_
49 #define REDUCTION_OPERATOR_NEWGEN_DOMAIN (reduction_operator_domain)
50 #define reduction_operator_NEWGEN_DOMAIN (reduction_operator_domain)
52 #endif /* _newgen_reduction_operator_domain_defined_ */
53 
54 #define reduction_domain (_gen_reductions_private_start+2)
55 #if !defined(_newgen_reduction_domain_defined_)
56 #define _newgen_reduction_domain_defined_
57 #define REDUCTION_NEWGEN_DOMAIN (reduction_domain)
58 #define reduction_NEWGEN_DOMAIN (reduction_domain)
60 #endif /* _newgen_reduction_domain_defined_ */
61 
62 #define reductions_domain (_gen_reductions_private_start+3)
63 #if !defined(_newgen_reductions_domain_defined_)
64 #define _newgen_reductions_domain_defined_
65 #define REDUCTIONS_NEWGEN_DOMAIN (reductions_domain)
66 #define reductions_NEWGEN_DOMAIN (reductions_domain)
68 #endif /* _newgen_reductions_domain_defined_ */
69 
70 /* PSTATEMENT_REDUCTIONS
71  */
72 #define PSTATEMENT_REDUCTIONS(x) ((pstatement_reductions)((x).p))
73 #define pstatement_reductions_CAST(x) PSTATEMENT_REDUCTIONS(x)
74 #define PSTATEMENT_REDUCTIONS_CAST(x) PSTATEMENT_REDUCTIONS(x)
75 #define PSTATEMENT_REDUCTIONS_(x) ((x).e)
76 #define PSTATEMENT_REDUCTIONS_TYPE pstatement_reductions
77 #define pstatement_reductions_TYPE pstatement_reductions
78 #define pstatement_reductions_undefined ((pstatement_reductions)gen_chunk_undefined)
79 #define pstatement_reductions_undefined_p(x) ((x)==pstatement_reductions_undefined)
80 
86 #define gen_PSTATEMENT_REDUCTIONS_cons gen_pstatement_reductions_cons
93 
97 };
98 
99 #define pstatement_reductions_domain_number(x) ((x)->_type_)
100 #define pstatement_reductions_hash_table(x) ((x)->_pstatement_reductions_holder_)
101 #define pstatement_reductions_key_type statement
102 #define pstatement_reductions_value_type reductions
103 #define PSTATEMENT_REDUCTIONS_MAP(k,v,c,f) FUNCTION_MAP(pstatement_reductions,p,p,k,v,c,f)
104 #define PSTATEMENT_REDUCTIONS_FOREACH(k,v,f) FUNCTION_FOREACH(pstatement_reductions,p,p,k,v,f)
110 
111 /* REDUCTION_OPERATOR
112  */
113 #define REDUCTION_OPERATOR(x) ((reduction_operator)((x).p))
114 #define reduction_operator_CAST(x) REDUCTION_OPERATOR(x)
115 #define REDUCTION_OPERATOR_CAST(x) REDUCTION_OPERATOR(x)
116 #define REDUCTION_OPERATOR_(x) ((x).e)
117 #define REDUCTION_OPERATOR_TYPE reduction_operator
118 #define reduction_operator_TYPE reduction_operator
119 #define reduction_operator_undefined ((reduction_operator)gen_chunk_undefined)
120 #define reduction_operator_undefined_p(x) ((x)==reduction_operator_undefined)
121 
127 #define gen_REDUCTION_OPERATOR_cons gen_reduction_operator_cons
131 extern void write_reduction_operator(FILE*, reduction_operator);
147 };
163 
167  union {
182 };
183 
184 #define reduction_operator_domain_number(x) ((x)->_type_)
185 #define reduction_operator_tag(x) ((x)->_reduction_operator_tag__)
186 #define reduction_operator_none_p(x) (reduction_operator_tag(x)==is_reduction_operator_none)
187 #define reduction_operator_none_(x) reduction_operator_none(x) /* old hack compatible */
188 #define reduction_operator_none(x) ((x)->_reduction_operator_union_._reduction_operator_none_.u)
189 #define reduction_operator_min_p(x) (reduction_operator_tag(x)==is_reduction_operator_min)
190 #define reduction_operator_min_(x) reduction_operator_min(x) /* old hack compatible */
191 #define reduction_operator_min(x) ((x)->_reduction_operator_union_._reduction_operator_min_.u)
192 #define reduction_operator_max_p(x) (reduction_operator_tag(x)==is_reduction_operator_max)
193 #define reduction_operator_max_(x) reduction_operator_max(x) /* old hack compatible */
194 #define reduction_operator_max(x) ((x)->_reduction_operator_union_._reduction_operator_max_.u)
195 #define reduction_operator_sum_p(x) (reduction_operator_tag(x)==is_reduction_operator_sum)
196 #define reduction_operator_sum_(x) reduction_operator_sum(x) /* old hack compatible */
197 #define reduction_operator_sum(x) ((x)->_reduction_operator_union_._reduction_operator_sum_.u)
198 #define reduction_operator_csum_p(x) (reduction_operator_tag(x)==is_reduction_operator_csum)
199 #define reduction_operator_csum_(x) reduction_operator_csum(x) /* old hack compatible */
200 #define reduction_operator_csum(x) ((x)->_reduction_operator_union_._reduction_operator_csum_.u)
201 #define reduction_operator_prod_p(x) (reduction_operator_tag(x)==is_reduction_operator_prod)
202 #define reduction_operator_prod_(x) reduction_operator_prod(x) /* old hack compatible */
203 #define reduction_operator_prod(x) ((x)->_reduction_operator_union_._reduction_operator_prod_.u)
204 #define reduction_operator_and_p(x) (reduction_operator_tag(x)==is_reduction_operator_and)
205 #define reduction_operator_and_(x) reduction_operator_and(x) /* old hack compatible */
206 #define reduction_operator_and(x) ((x)->_reduction_operator_union_._reduction_operator_and_.u)
207 #define reduction_operator_or_p(x) (reduction_operator_tag(x)==is_reduction_operator_or)
208 #define reduction_operator_or_(x) reduction_operator_or(x) /* old hack compatible */
209 #define reduction_operator_or(x) ((x)->_reduction_operator_union_._reduction_operator_or_.u)
210 #define reduction_operator_bitwise_and_p(x) (reduction_operator_tag(x)==is_reduction_operator_bitwise_and)
211 #define reduction_operator_bitwise_and_(x) reduction_operator_bitwise_and(x) /* old hack compatible */
212 #define reduction_operator_bitwise_and(x) ((x)->_reduction_operator_union_._reduction_operator_bitwise_and_.u)
213 #define reduction_operator_bitwise_or_p(x) (reduction_operator_tag(x)==is_reduction_operator_bitwise_or)
214 #define reduction_operator_bitwise_or_(x) reduction_operator_bitwise_or(x) /* old hack compatible */
215 #define reduction_operator_bitwise_or(x) ((x)->_reduction_operator_union_._reduction_operator_bitwise_or_.u)
216 #define reduction_operator_bitwise_xor_p(x) (reduction_operator_tag(x)==is_reduction_operator_bitwise_xor)
217 #define reduction_operator_bitwise_xor_(x) reduction_operator_bitwise_xor(x) /* old hack compatible */
218 #define reduction_operator_bitwise_xor(x) ((x)->_reduction_operator_union_._reduction_operator_bitwise_xor_.u)
219 #define reduction_operator_eqv_p(x) (reduction_operator_tag(x)==is_reduction_operator_eqv)
220 #define reduction_operator_eqv_(x) reduction_operator_eqv(x) /* old hack compatible */
221 #define reduction_operator_eqv(x) ((x)->_reduction_operator_union_._reduction_operator_eqv_.u)
222 #define reduction_operator_neqv_p(x) (reduction_operator_tag(x)==is_reduction_operator_neqv)
223 #define reduction_operator_neqv_(x) reduction_operator_neqv(x) /* old hack compatible */
224 #define reduction_operator_neqv(x) ((x)->_reduction_operator_union_._reduction_operator_neqv_.u)
225 
226 /* REDUCTION
227  */
228 #define REDUCTION(x) ((reduction)((x).p))
229 #define reduction_CAST(x) REDUCTION(x)
230 #define REDUCTION_CAST(x) REDUCTION(x)
231 #define REDUCTION_(x) ((x).e)
232 #define REDUCTION_TYPE reduction
233 #define reduction_TYPE reduction
234 #define reduction_undefined ((reduction)gen_chunk_undefined)
235 #define reduction_undefined_p(x) ((x)==reduction_undefined)
236 
238 extern void free_reduction(reduction);
240 extern bool reduction_consistent_p(reduction);
241 extern bool reduction_defined_p(reduction);
242 #define gen_REDUCTION_cons gen_reduction_cons
246 extern void write_reduction(FILE*, reduction);
247 extern reduction read_reduction(FILE*);
249 
252  reference _reduction_reference_; /* reference:reference */
253  reduction_operator _reduction_op_; /* op:reduction_operator */
254  list _reduction_dependences_; /* dependences:entity* */
255  list _reduction_trusted_; /* trusted:preference* */
256 };
257 
258 #define reduction_domain_number(x) ((x)->_type_)
259 #define reduction_reference_(x) reduction_reference(x) /* old hack compatible */
260 #define reduction_reference(x) ((x)->_reduction_reference_)
261 #define reduction_op_(x) reduction_op(x) /* old hack compatible */
262 #define reduction_op(x) ((x)->_reduction_op_)
263 #define reduction_dependences_(x) reduction_dependences(x) /* old hack compatible */
264 #define reduction_dependences(x) ((x)->_reduction_dependences_)
265 #define reduction_trusted_(x) reduction_trusted(x) /* old hack compatible */
266 #define reduction_trusted(x) ((x)->_reduction_trusted_)
267 
268 /* REDUCTIONS
269  */
270 #define REDUCTIONS(x) ((reductions)((x).p))
271 #define reductions_CAST(x) REDUCTIONS(x)
272 #define REDUCTIONS_CAST(x) REDUCTIONS(x)
273 #define REDUCTIONS_(x) ((x).e)
274 #define REDUCTIONS_TYPE reductions
275 #define reductions_TYPE reductions
276 #define reductions_undefined ((reductions)gen_chunk_undefined)
277 #define reductions_undefined_p(x) ((x)==reductions_undefined)
278 
280 extern void free_reductions(reductions);
283 extern bool reductions_defined_p(reductions);
284 #define gen_REDUCTIONS_cons gen_reductions_cons
288 extern void write_reductions(FILE*, reductions);
289 extern reductions read_reductions(FILE*);
291 
295 };
296 
297 #define reductions_domain_number(x) ((x)->_type_)
298 #define reductions_list(x) ((x)->_reductions_holder_)
299 
300 #define reductions_private_spec "\
301 --NEWGEN-START 100\n\
302 import reference from \"ri.newgen\";\n\
303 import preference from \"ri.newgen\";\n\
304 import entity from \"ri.newgen\";\n\
305 import statement from \"ri.newgen\";\n\
306 pstatement_reductions = persistant statement:statement -> reductions:reductions;\n\
307 reduction_operator = none:unit + min:unit + max:unit + sum:unit + csum:unit + prod:unit + and:unit + or:unit + bitwise_and:unit + bitwise_or:unit + bitwise_xor:unit + eqv:unit + neqv:unit;\n\
308 reduction = reference:reference x op:reduction_operator x dependences:entity* x trusted:preference*;\n\
309 reductions = list:reduction*;\n\
310 "
311 #endif
struct _newgen_struct_reductions_ * reductions
reduction_operator make_reduction_operator_or(void)
reduction read_reduction(FILE *)
void free_reduction_operator(reduction_operator)
struct _newgen_struct_reference_ * reference
void reductions_non_recursive_free(reductions)
reductions make_reductions(list)
reduction_operator read_reduction_operator(FILE *)
struct _newgen_struct_statement_ * statement
void update_pstatement_reductions(pstatement_reductions, statement, reductions)
void pstatement_reductions_non_recursive_free(pstatement_reductions)
reduction_operator make_reduction_operator_csum(void)
reduction_operator copy_reduction_operator(reduction_operator)
REDUCTION_OPERATOR.
reduction_operator_utype
@ is_reduction_operator_bitwise_xor
@ is_reduction_operator_none
@ is_reduction_operator_min
@ is_reduction_operator_bitwise_and
@ is_reduction_operator_neqv
@ is_reduction_operator_max
@ is_reduction_operator_bitwise_or
@ is_reduction_operator_csum
@ is_reduction_operator_eqv
@ is_reduction_operator_prod
@ is_reduction_operator_or
@ is_reduction_operator_and
@ is_reduction_operator_sum
reduction check_reduction(reduction)
reduction_operator make_reduction_operator_max(void)
pstatement_reductions read_pstatement_reductions(FILE *)
reduction_operator make_reduction_operator(enum reduction_operator_utype, void *)
void free_reductions(reductions)
pstatement_reductions make_pstatement_reductions(void)
void extend_pstatement_reductions(pstatement_reductions, statement, reductions)
struct _newgen_struct_reduction_ * reduction
bool pstatement_reductions_consistent_p(pstatement_reductions)
reductions read_reductions(FILE *)
reductions delete_pstatement_reductions(pstatement_reductions, statement)
reduction copy_reduction(reduction)
REDUCTION.
struct _newgen_struct_pstatement_reductions_ * pstatement_reductions
bool pstatement_reductions_defined_p(pstatement_reductions)
list gen_reduction_operator_cons(reduction_operator, list)
reduction_operator make_reduction_operator_and(void)
bool reduction_consistent_p(reduction)
reduction_operator make_reduction_operator_eqv(void)
reduction make_reduction(reference, reduction_operator, list, list)
void reduction_non_recursive_free(reduction)
reduction_operator make_reduction_operator_prod(void)
void reduction_operator_non_recursive_free(reduction_operator)
reduction_operator make_reduction_operator_none(void)
bool bound_pstatement_reductions_p(pstatement_reductions, statement)
bool reduction_operator_consistent_p(reduction_operator)
pstatement_reductions copy_pstatement_reductions(pstatement_reductions)
PSTATEMENT_REDUCTIONS.
reduction_operator make_reduction_operator_bitwise_or(void)
void reduction_assign_contents(reduction, reduction)
reduction_operator check_reduction_operator(reduction_operator)
struct _newgen_struct_reduction_operator_ * reduction_operator
reduction_operator make_reduction_operator_bitwise_xor(void)
reduction_operator make_reduction_operator_sum(void)
void free_pstatement_reductions(pstatement_reductions)
void pstatement_reductions_assign_contents(pstatement_reductions, pstatement_reductions)
void reduction_operator_assign_contents(reduction_operator, reduction_operator)
void reductions_assign_contents(reductions, reductions)
reduction_operator make_reduction_operator_bitwise_and(void)
reductions apply_pstatement_reductions(pstatement_reductions, statement)
bool reductions_defined_p(reductions)
list gen_reduction_cons(reduction, list)
reductions check_reductions(reductions)
list gen_pstatement_reductions_cons(pstatement_reductions, list)
string reduction_operator_tag_as_string(enum reduction_operator_utype)
void write_reduction_operator(FILE *, reduction_operator)
struct _newgen_struct_entity_ * entity
void free_reduction(reduction)
list gen_reductions_cons(reductions, list)
reduction_operator make_reduction_operator_min(void)
pstatement_reductions check_pstatement_reductions(pstatement_reductions)
reduction_operator make_reduction_operator_neqv(void)
void write_reduction(FILE *, reduction)
void write_pstatement_reductions(FILE *, pstatement_reductions)
struct _newgen_struct_preference_ * preference
bool reduction_defined_p(reduction)
reductions copy_reductions(reductions)
REDUCTIONS.
bool reduction_operator_defined_p(reduction_operator)
bool reductions_consistent_p(reductions)
void write_reductions(FILE *, reductions)
#define intptr_t
Definition: stdint.in.h:294
list _reduction_dependences_
op:reduction_operator
list _reduction_trusted_
dependences:entity*
reduction_operator _reduction_op_
reference:reference
gen_chunk _reduction_operator_bitwise_or_
bitwise_and:unit
enum reduction_operator_utype _reduction_operator_tag__
union _newgen_struct_reduction_operator_::@60 _reduction_operator_union_
gen_chunk _reduction_operator_bitwise_xor_
bitwise_or:unit
gen_chunk _reduction_operator_eqv_
bitwise_xor:unit
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