1#ifndef _profiles_h_INCLUDED
2#define _profiles_h_INCLUDED
45#define MROFILE PROFILE
51 PROFILE (analyze, 3) \
52 MROFILE (analyzestable, 4) \
53 MROFILE (analyzeunstable, 4) \
54 PROFILE (backward, 3) \
57 PROFILE (checking, 2) \
59 PROFILE (collect, 3) \
60 PROFILE (compact, 3) \
61 PROFILE (condition, 2) \
62 PROFILE (congruence, 2) \
63 PROFILE (congruencemerge, 4) \
64 PROFILE (congruencematching, 4) \
65 PROFILE (connect, 3) \
69 PROFILE (decompose, 3) \
70 PROFILE (definition, 2) \
73 PROFILE (fastelim, 2) \
75 PROFILE (extract, 3) \
76 PROFILE (extractands, 4) \
77 PROFILE (extractbinaries, 4) \
78 PROFILE (extractites, 4) \
79 PROFILE (extractxors, 4) \
80 PROFILE (instantiate, 2) \
82 PROFILE (lookahead, 2) \
83 PROFILE (minimize, 4) \
87 PROFILE (deduplicate, 3) \
88 PROFILE (propagate, 4) \
89 MROFILE (propstable, 4) \
90 MROFILE (propunstable, 4) \
92 PROFILE (restart, 3) \
93 PROFILE (restore, 2) \
98 PROFILE (sweepbackbone, 3) \
99 PROFILE (sweepequivalences, 3) \
100 PROFILE (sweepflip, 4) \
101 PROFILE (sweepimplicant, 4) \
102 PROFILE (sweepsolve, 4) \
103 PROFILE (preprocess, 2) \
104 PROFILE (simplify, 1) \
105 PROFILE (subsume, 2) \
106 PROFILE (ternary, 2) \
107 PROFILE (transred, 3) \
108 PROFILE (unstable, 2) \
109 PROFILE (vivify, 2) \
124 Profile (
const char *n,
int l)
130#define PROFILE(NAME, LEVEL) Profile NAME;
133 Profiles (Internal *);
138#define NON_CADICAL_QUIET_PROFILE_CODE(CODE) CODE
142#define NON_CADICAL_QUIET_PROFILE_CODE(CODE)
152 NON_CADICAL_QUIET_PROFILE_CODE ( \
153 if (internal->profiles.P.level <= internal->opts.profile) \
154 internal->start_profiling (internal->profiles.P, \
155 internal->time ());) \
160 NON_CADICAL_QUIET_PROFILE_CODE ( \
161 if (internal->profiles.P.level <= internal->opts.profile) \
162 internal->stop_profiling (internal->profiles.P, \
163 internal->time ());) \
166#define PROFILE_ACTIVE(P) \
167 ((internal->profiles.P.level <= internal->opts.profile) && \
168 (internal->profiles.P.active))
172#define START_SIMPLIFIER(S, M) \
174 NON_CADICAL_QUIET_PROFILE_CODE (const double N = time (); \
175 const int L = internal->opts.profile;) \
176 if (!preprocessing && !lookingahead) { \
177 NON_CADICAL_QUIET_PROFILE_CODE ( \
178 if (stable && internal->profiles.stable.level <= L) \
179 internal->stop_profiling (internal->profiles.stable, N); \
180 if (!stable && internal->profiles.unstable.level <= L) \
181 internal->stop_profiling (internal->profiles.unstable, N); \
182 if (internal->profiles.search.level <= L) \
183 internal->stop_profiling (internal->profiles.search, N);) \
184 reset_mode (SEARCH); \
186 NON_CADICAL_QUIET_PROFILE_CODE ( \
187 if (internal->profiles.simplify.level <= L) \
188 internal->start_profiling (internal->profiles.simplify, N); \
189 if (internal->profiles.S.level <= L) \
190 internal->start_profiling (internal->profiles.S, N);) \
191 set_mode (SIMPLIFY); \
197#define STOP_SIMPLIFIER(S, M) \
199 NON_CADICAL_QUIET_PROFILE_CODE ( \
200 const double N = time (); const int L = internal->opts.profile; \
201 if (internal->profiles.S.level <= L) \
202 internal->stop_profiling (internal->profiles.S, N); \
203 if (internal->profiles.simplify.level <= L) \
204 internal->stop_profiling (internal->profiles.simplify, N);) \
206 reset_mode (SIMPLIFY); \
207 if (!preprocessing && !lookingahead) { \
208 NON_CADICAL_QUIET_PROFILE_CODE ( \
209 if (internal->profiles.search.level <= L) \
210 internal->start_profiling (internal->profiles.search, N); \
211 if (stable && internal->profiles.stable.level <= L) \
212 internal->start_profiling (internal->profiles.stable, N); \
213 if (!stable && internal->profiles.unstable.level <= L) \
214 internal->start_profiling (internal->profiles.unstable, N);) \
222#define START_INNER_WALK() \
224 require_mode (SEARCH); \
225 CADICAL_assert (!preprocessing); \
226 NON_CADICAL_QUIET_PROFILE_CODE ( \
227 const double N = time (); const int L = internal->opts.profile; \
228 if (stable && internal->profiles.stable.level <= L) \
229 internal->stop_profiling (internal->profiles.stable, N); \
230 if (!stable && internal->profiles.unstable.level <= L) \
231 internal->stop_profiling (internal->profiles.unstable, N); \
232 if (internal->profiles.walk.level <= L) \
233 internal->start_profiling (internal->profiles.walk, N);) \
240#define STOP_INNER_WALK() \
242 require_mode (SEARCH); \
243 CADICAL_assert (!preprocessing); \
245 NON_CADICAL_QUIET_PROFILE_CODE ( \
246 const double N = time (); const int L = internal->opts.profile; \
247 if (internal->profiles.walk.level <= L) \
248 internal->stop_profiling (internal->profiles.walk, N); \
249 if (stable && internal->profiles.stable.level <= L) \
250 internal->start_profiling (internal->profiles.stable, N); \
251 if (!stable && internal->profiles.unstable.level <= L) \
252 internal->start_profiling (internal->profiles.unstable, N); \
253 internal->profiles.walk.started = (N);) \
259#define START_OUTER_WALK() \
261 require_mode (SEARCH); \
262 CADICAL_assert (!preprocessing); \
263 NON_CADICAL_QUIET_PROFILE_CODE (START (walk);) \
270#define STOP_OUTER_WALK() \
272 require_mode (SEARCH); \
273 CADICAL_assert (!preprocessing); \
275 NON_CADICAL_QUIET_PROFILE_CODE (STOP (walk);) \
#define ABC_NAMESPACE_CXX_HEADER_START
#define ABC_NAMESPACE_CXX_HEADER_END
ABC_NAMESPACE_IMPL_START typedef signed char value