PIPS
complexity_ri.h
Go to the documentation of this file.
1 #ifndef _newgen_complexity_ri_included
2 #define _newgen_complexity_ri_included
3 #define _gen_complexity_ri_start 164
4 /*
5  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
6  *
7  * PLEASE DO NOT MODIFY IT.
8  */
9 
10 #if !defined(_newgen_statement_domain_defined_)
11 #define _newgen_statement_domain_defined_
12 #define STATEMENT_NEWGEN_DOMAIN (statement_domain)
13 #define statement_NEWGEN_DOMAIN (statement_domain)
15 #endif /* _newgen_statement_domain_defined_ */
16 
17 #if !defined(_newgen_Ppolynome_domain_defined_)
18 #define _newgen_Ppolynome_domain_defined_
19 #define newgen_Ppolynome(p) (p) /* old hack compatible */
20 #define PPOLYNOME_NEWGEN_EXTERNAL (_gen_complexity_ri_start+0)
21 #define PPOLYNOME_NEWGEN_DOMAIN (PPOLYNOME_NEWGEN_EXTERNAL)
22 #define Ppolynome_NEWGEN_DOMAIN (PPOLYNOME_NEWGEN_EXTERNAL)
23 #endif /* _newgen_Ppolynome_domain_defined_ */
24 
25 #define complexity_domain (_gen_complexity_ri_start+1)
26 #if !defined(_newgen_complexity_domain_defined_)
27 #define _newgen_complexity_domain_defined_
28 #define COMPLEXITY_NEWGEN_DOMAIN (complexity_domain)
29 #define complexity_NEWGEN_DOMAIN (complexity_domain)
31 #endif /* _newgen_complexity_domain_defined_ */
32 
33 #define ifcount_domain (_gen_complexity_ri_start+2)
34 #if !defined(_newgen_ifcount_domain_defined_)
35 #define _newgen_ifcount_domain_defined_
36 #define IFCOUNT_NEWGEN_DOMAIN (ifcount_domain)
37 #define ifcount_NEWGEN_DOMAIN (ifcount_domain)
39 #endif /* _newgen_ifcount_domain_defined_ */
40 
41 #define rangecount_domain (_gen_complexity_ri_start+3)
42 #if !defined(_newgen_rangecount_domain_defined_)
43 #define _newgen_rangecount_domain_defined_
44 #define RANGECOUNT_NEWGEN_DOMAIN (rangecount_domain)
45 #define rangecount_NEWGEN_DOMAIN (rangecount_domain)
47 #endif /* _newgen_rangecount_domain_defined_ */
48 
49 #define varcount_domain (_gen_complexity_ri_start+4)
50 #if !defined(_newgen_varcount_domain_defined_)
51 #define _newgen_varcount_domain_defined_
52 #define VARCOUNT_NEWGEN_DOMAIN (varcount_domain)
53 #define varcount_NEWGEN_DOMAIN (varcount_domain)
55 #endif /* _newgen_varcount_domain_defined_ */
56 
57 
58 /* COMPLEXITY
59  */
60 #define COMPLEXITY(x) ((complexity)((x).p))
61 #define complexity_CAST(x) COMPLEXITY(x)
62 #define COMPLEXITY_CAST(x) COMPLEXITY(x)
63 #define COMPLEXITY_(x) ((x).e)
64 #define COMPLEXITY_TYPE complexity
65 #define complexity_TYPE complexity
66 #define complexity_undefined ((complexity)gen_chunk_undefined)
67 #define complexity_undefined_p(x) ((x)==complexity_undefined)
68 
70 extern void free_complexity(complexity);
73 extern bool complexity_defined_p(complexity);
74 #define gen_COMPLEXITY_cons gen_complexity_cons
78 extern void write_complexity(FILE*, complexity);
79 extern complexity read_complexity(FILE*);
81 
84  Ppolynome _complexity_eval_; /* eval:Ppolynome */
85  varcount _complexity_varcount_; /* varcount:varcount */
86  rangecount _complexity_rangecount_; /* rangecount:rangecount */
87  ifcount _complexity_ifcount_; /* ifcount:ifcount */
88 };
89 
90 #define complexity_domain_number(x) ((x)->_type_)
91 #define complexity_eval_(x) complexity_eval(x) /* old hack compatible */
92 #define complexity_eval(x) ((x)->_complexity_eval_)
93 #define complexity_varcount_(x) complexity_varcount(x) /* old hack compatible */
94 #define complexity_varcount(x) ((x)->_complexity_varcount_)
95 #define complexity_rangecount_(x) complexity_rangecount(x) /* old hack compatible */
96 #define complexity_rangecount(x) ((x)->_complexity_rangecount_)
97 #define complexity_ifcount_(x) complexity_ifcount(x) /* old hack compatible */
98 #define complexity_ifcount(x) ((x)->_complexity_ifcount_)
99 
100 /* IFCOUNT
101  */
102 #define IFCOUNT(x) ((ifcount)((x).p))
103 #define ifcount_CAST(x) IFCOUNT(x)
104 #define IFCOUNT_CAST(x) IFCOUNT(x)
105 #define IFCOUNT_(x) ((x).e)
106 #define IFCOUNT_TYPE ifcount
107 #define ifcount_TYPE ifcount
108 #define ifcount_undefined ((ifcount)gen_chunk_undefined)
109 #define ifcount_undefined_p(x) ((x)==ifcount_undefined)
110 
112 extern void free_ifcount(ifcount);
114 extern bool ifcount_consistent_p(ifcount);
115 extern bool ifcount_defined_p(ifcount);
116 #define gen_IFCOUNT_cons gen_ifcount_cons
120 extern void write_ifcount(FILE*, ifcount);
121 extern ifcount read_ifcount(FILE*);
123 
126  intptr_t _ifcount_profiled_; /* profiled:int */
127  intptr_t _ifcount_computed_; /* computed:int */
128  intptr_t _ifcount_halfhalf_; /* halfhalf:int */
129 };
130 
131 #define ifcount_domain_number(x) ((x)->_type_)
132 #define ifcount_profiled_(x) ifcount_profiled(x) /* old hack compatible */
133 #define ifcount_profiled(x) ((x)->_ifcount_profiled_)
134 #define ifcount_computed_(x) ifcount_computed(x) /* old hack compatible */
135 #define ifcount_computed(x) ((x)->_ifcount_computed_)
136 #define ifcount_halfhalf_(x) ifcount_halfhalf(x) /* old hack compatible */
137 #define ifcount_halfhalf(x) ((x)->_ifcount_halfhalf_)
138 
139 /* RANGECOUNT
140  */
141 #define RANGECOUNT(x) ((rangecount)((x).p))
142 #define rangecount_CAST(x) RANGECOUNT(x)
143 #define RANGECOUNT_CAST(x) RANGECOUNT(x)
144 #define RANGECOUNT_(x) ((x).e)
145 #define RANGECOUNT_TYPE rangecount
146 #define rangecount_TYPE rangecount
147 #define rangecount_undefined ((rangecount)gen_chunk_undefined)
148 #define rangecount_undefined_p(x) ((x)==rangecount_undefined)
149 
151 extern void free_rangecount(rangecount);
154 extern bool rangecount_defined_p(rangecount);
155 #define gen_RANGECOUNT_cons gen_rangecount_cons
159 extern void write_rangecount(FILE*, rangecount);
160 extern rangecount read_rangecount(FILE*);
162 
165  intptr_t _rangecount_profiled_; /* profiled:int */
166  intptr_t _rangecount_guessed_; /* guessed:int */
167  intptr_t _rangecount_bounded_; /* bounded:int */
168  intptr_t _rangecount_unknown_; /* unknown:int */
169 };
170 
171 #define rangecount_domain_number(x) ((x)->_type_)
172 #define rangecount_profiled_(x) rangecount_profiled(x) /* old hack compatible */
173 #define rangecount_profiled(x) ((x)->_rangecount_profiled_)
174 #define rangecount_guessed_(x) rangecount_guessed(x) /* old hack compatible */
175 #define rangecount_guessed(x) ((x)->_rangecount_guessed_)
176 #define rangecount_bounded_(x) rangecount_bounded(x) /* old hack compatible */
177 #define rangecount_bounded(x) ((x)->_rangecount_bounded_)
178 #define rangecount_unknown_(x) rangecount_unknown(x) /* old hack compatible */
179 #define rangecount_unknown(x) ((x)->_rangecount_unknown_)
180 
181 /* VARCOUNT
182  */
183 #define VARCOUNT(x) ((varcount)((x).p))
184 #define varcount_CAST(x) VARCOUNT(x)
185 #define VARCOUNT_CAST(x) VARCOUNT(x)
186 #define VARCOUNT_(x) ((x).e)
187 #define VARCOUNT_TYPE varcount
188 #define varcount_TYPE varcount
189 #define varcount_undefined ((varcount)gen_chunk_undefined)
190 #define varcount_undefined_p(x) ((x)==varcount_undefined)
191 
193 extern void free_varcount(varcount);
195 extern bool varcount_consistent_p(varcount);
196 extern bool varcount_defined_p(varcount);
197 #define gen_VARCOUNT_cons gen_varcount_cons
201 extern void write_varcount(FILE*, varcount);
202 extern varcount read_varcount(FILE*);
204 
207  intptr_t _varcount_symbolic_; /* symbolic:int */
208  intptr_t _varcount_guessed_; /* guessed:int */
209  intptr_t _varcount_bounded_; /* bounded:int */
210  intptr_t _varcount_unknown_; /* unknown:int */
211 };
212 
213 #define varcount_domain_number(x) ((x)->_type_)
214 #define varcount_symbolic_(x) varcount_symbolic(x) /* old hack compatible */
215 #define varcount_symbolic(x) ((x)->_varcount_symbolic_)
216 #define varcount_guessed_(x) varcount_guessed(x) /* old hack compatible */
217 #define varcount_guessed(x) ((x)->_varcount_guessed_)
218 #define varcount_bounded_(x) varcount_bounded(x) /* old hack compatible */
219 #define varcount_bounded(x) ((x)->_varcount_bounded_)
220 #define varcount_unknown_(x) varcount_unknown(x) /* old hack compatible */
221 #define varcount_unknown(x) ((x)->_varcount_unknown_)
222 
223 #define complexity_ri_spec "\
224 --NEWGEN-START 164\n\
225 import statement from \"ri.newgen\";\n\
226 external Ppolynome;\n\
227 complexity = eval:Ppolynome x varcount:varcount x rangecount:rangecount x ifcount:ifcount;\n\
228 ifcount = profiled:int x computed:int x halfhalf:int;\n\
229 rangecount = profiled:int x guessed:int x bounded:int x unknown:int;\n\
230 varcount = symbolic:int x guessed:int x bounded:int x unknown:int;\n\
231 "
232 #endif
void complexity_assign_contents(complexity, complexity)
Definition: complexity_ri.c:37
complexity copy_complexity(complexity)
COMPLEXITY.
Definition: complexity_ri.c:18
void free_rangecount(rangecount)
void write_varcount(FILE *, varcount)
bool complexity_defined_p(complexity)
Definition: complexity_ri.c:31
varcount copy_varcount(varcount)
VARCOUNT.
struct _newgen_struct_ifcount_ * ifcount
Definition: complexity_ri.h:38
varcount make_varcount(intptr_t, intptr_t, intptr_t, intptr_t)
bool ifcount_defined_p(ifcount)
Definition: complexity_ri.c:73
void rangecount_assign_contents(rangecount, rangecount)
struct _newgen_struct_rangecount_ * rangecount
Definition: complexity_ri.h:46
ifcount make_ifcount(intptr_t, intptr_t, intptr_t)
Definition: complexity_ri.c:96
bool complexity_consistent_p(complexity)
Definition: complexity_ri.c:27
void write_rangecount(FILE *, rangecount)
struct _newgen_struct_statement_ * statement
Definition: complexity_ri.h:14
rangecount check_rangecount(rangecount)
void write_complexity(FILE *, complexity)
Definition: complexity_ri.c:48
bool rangecount_defined_p(rangecount)
void rangecount_non_recursive_free(rangecount)
void free_varcount(varcount)
void free_complexity(complexity)
Definition: complexity_ri.c:21
list gen_complexity_cons(complexity, list)
Definition: complexity_ri.c:34
void ifcount_non_recursive_free(ifcount)
Definition: complexity_ri.c:86
rangecount copy_rangecount(rangecount)
RANGECOUNT.
ifcount copy_ifcount(ifcount)
IFCOUNT.
Definition: complexity_ri.c:60
ifcount check_ifcount(ifcount)
Definition: complexity_ri.c:66
complexity make_complexity(Ppolynome, varcount, rangecount, ifcount)
Definition: complexity_ri.c:54
varcount read_varcount(FILE *)
bool rangecount_consistent_p(rangecount)
void ifcount_assign_contents(ifcount, ifcount)
Definition: complexity_ri.c:79
varcount check_varcount(varcount)
void write_ifcount(FILE *, ifcount)
Definition: complexity_ri.c:90
ifcount read_ifcount(FILE *)
Definition: complexity_ri.c:93
void varcount_non_recursive_free(varcount)
struct _newgen_struct_complexity_ * complexity
Definition: complexity_ri.h:30
void free_ifcount(ifcount)
Definition: complexity_ri.c:63
complexity check_complexity(complexity)
Definition: complexity_ri.c:24
list gen_varcount_cons(varcount, list)
rangecount make_rangecount(intptr_t, intptr_t, intptr_t, intptr_t)
bool varcount_defined_p(varcount)
bool varcount_consistent_p(varcount)
list gen_rangecount_cons(rangecount, list)
void complexity_non_recursive_free(complexity)
Definition: complexity_ri.c:44
bool ifcount_consistent_p(ifcount)
Definition: complexity_ri.c:69
rangecount read_rangecount(FILE *)
struct _newgen_struct_varcount_ * varcount
Definition: complexity_ri.h:54
complexity read_complexity(FILE *)
Definition: complexity_ri.c:51
list gen_ifcount_cons(ifcount, list)
Definition: complexity_ri.c:76
void varcount_assign_contents(varcount, varcount)
#define intptr_t
Definition: stdint.in.h:294
varcount _complexity_varcount_
eval:Ppolynome
Definition: complexity_ri.h:85
ifcount _complexity_ifcount_
rangecount:rangecount
Definition: complexity_ri.h:87
rangecount _complexity_rangecount_
varcount:varcount
Definition: complexity_ri.h:86
intptr_t _ifcount_halfhalf_
computed:int
intptr_t _ifcount_computed_
profiled:int
intptr_t _rangecount_guessed_
profiled:int
intptr_t _rangecount_bounded_
guessed:int
intptr_t _rangecount_unknown_
bounded:int
intptr_t _varcount_unknown_
bounded:int
intptr_t _varcount_guessed_
symbolic:int
intptr_t _varcount_bounded_
guessed:int
The structure used to build lists in NewGen.
Definition: newgen_list.h:41