12 : internal (i), file (f), binary (b)
15 added (0), deleted (0)
23 file->connect_internal (internal);
24 LOG (
"DRAT TRACER connected to internal");
28 LOG (
"DRAT TRACER delete");
34inline void DratTracer::put_binary_zero () {
37 file->put ((
unsigned char) 0);
40inline void DratTracer::put_binary_lit (
int lit) {
44 unsigned idx = abs (
lit);
46 unsigned x = 2u * idx + (
lit < 0);
49 ch = (x & 0x7f) | 0x80;
59void DratTracer::drat_add_clause (
const vector<int> &
clause) {
62 for (
const auto &external_lit :
clause)
64 put_binary_lit (external_lit);
66 file->put (external_lit), file->put (
' ');
72void DratTracer::drat_delete_clause (
const vector<int> &
clause) {
77 for (
const auto &external_lit :
clause)
79 put_binary_lit (external_lit);
81 file->put (external_lit), file->put (
' ');
95 LOG (
"DRAT TRACER tracing addition of derived clause");
105 LOG (
"DRAT TRACER tracing deletion of clause");
106 drat_delete_clause (
clause);
118void DratTracer::print_statistics () {
120 uint64_t total = added + deleted;
121 MSG (
"DRAT %" PRId64
" added clauses %.2f%%", added,
123 MSG (
"DRAT %" PRId64
" deleted clauses %.2f%%", deleted,
125 MSG (
"DRAT %" PRId64
" bytes (%.2f MB)", bytes,
126 bytes / (
double) (1 << 20));
136 MSG (
"DRAT proof file '%s' closed", file->name ());
149 MSG (
"DRAT proof file '%s' flushed", file->name ());
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
DratTracer(Internal *, File *file, bool binary)
void connect_internal(Internal *i) override
void flush(bool) override
void delete_clause(int64_t, bool, const vector< int > &) override
void add_derived_clause(int64_t, bool, const vector< int > &, const vector< int64_t > &) override
void close(bool) override
double percent(double a, double b)
struct clause_t clause
STRUCTURE DEFINITIONS ///.