ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
classify.c
Go to the documentation of this file.
1#include "classify.h"
2#include "internal.h"
3#include "print.h"
4
6
8 statistics *s = &solver->statistics_;
9 uint64_t clauses = s->clauses_binary + s->clauses_irredundant;
10 unsigned small_clauses_limit = GET_OPTION (smallclauses);
11 if (clauses <= small_clauses_limit) {
12 solver->classification.small = true;
13 solver->classification.bigbig = false;
14 } else {
15 solver->classification.small = false;
16 unsigned bigbigfraction = GET_OPTION (bigbigfraction);
17 double percent = bigbigfraction / 1000.0;
18 double actual = kissat_percent (s->clauses_binary, clauses);
19 if (actual >= percent)
20 solver->classification.bigbig = true;
21 else
22 solver->classification.bigbig = false;
23 }
25 solver, "formula classified as having a %s total number of clauses",
26 solver->classification.small ? "small" : "large");
28 solver, "formula classified to have a %s binary clauses fraction",
29 solver->classification.bigbig ? "large" : "small");
30}
31
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START void kissat_classify(struct kissat *solver)
Definition classify.c:7
#define solver
Definition kitten.c:211
#define GET_OPTION(N)
Definition options.h:295
#define kissat_very_verbose(...)
Definition print.h:52