1 #ifndef _newgen_reductions_private_included
2 #define _newgen_reductions_private_included
3 #define _gen_reductions_private_start 100
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)
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)
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)
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)
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)
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)
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)
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)
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)
86 #define gen_PSTATEMENT_REDUCTIONS_cons gen_pstatement_reductions_cons
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)
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)
127 #define gen_REDUCTION_OPERATOR_cons gen_reduction_operator_cons
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
224 #define reduction_operator_neqv(x) ((x)->_reduction_operator_union_._reduction_operator_neqv_.u)
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)
242 #define gen_REDUCTION_cons gen_reduction_cons
258 #define reduction_domain_number(x) ((x)->_type_)
259 #define reduction_reference_(x) reduction_reference(x)
260 #define reduction_reference(x) ((x)->_reduction_reference_)
261 #define reduction_op_(x) reduction_op(x)
262 #define reduction_op(x) ((x)->_reduction_op_)
263 #define reduction_dependences_(x) reduction_dependences(x)
264 #define reduction_dependences(x) ((x)->_reduction_dependences_)
265 #define reduction_trusted_(x) reduction_trusted(x)
266 #define reduction_trusted(x) ((x)->_reduction_trusted_)
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)
284 #define gen_REDUCTIONS_cons gen_reductions_cons
297 #define reductions_domain_number(x) ((x)->_type_)
298 #define reductions_list(x) ((x)->_reductions_holder_)
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\
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.
@ 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)
hash_table _pstatement_reductions_holder_
list _reduction_dependences_
op:reduction_operator
list _reduction_trusted_
dependences:entity*
reference _reduction_reference_
reduction_operator _reduction_op_
reference:reference
gen_chunk _reduction_operator_max_
min:unit
gen_chunk _reduction_operator_bitwise_and_
or:unit
gen_chunk _reduction_operator_bitwise_or_
bitwise_and:unit
gen_chunk _reduction_operator_none_
gen_chunk _reduction_operator_neqv_
eqv:unit
gen_chunk _reduction_operator_or_
and:unit
gen_chunk _reduction_operator_and_
prod:unit
gen_chunk _reduction_operator_prod_
csum:unit
gen_chunk _reduction_operator_sum_
max:unit
gen_chunk _reduction_operator_csum_
sum:unit
enum reduction_operator_utype _reduction_operator_tag__
union _newgen_struct_reduction_operator_::@60 _reduction_operator_union_
gen_chunk _reduction_operator_min_
none:unit
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.
A gen_chunk is used to store every object.