3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 15:25:26 +00:00
z3/src/sat/sat_cleaner.h
Nikolaj Bjorner d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00

52 lines
892 B
C++

/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
sat_cleaner.h
Abstract:
Eliminate satisfied clauses, and literals assigned to false.
Author:
Leonardo de Moura (leonardo) 2011-05-24.
Revision History:
--*/
#pragma once
#include "sat/sat_types.h"
#include "util/statistics.h"
namespace sat {
class cleaner {
struct report;
solver & s;
unsigned m_last_num_units;
int m_cleanup_counter;
// stats
unsigned m_elim_clauses;
unsigned m_elim_literals;
void cleanup_watches();
void cleanup_clauses(clause_vector & cs);
public:
cleaner(solver & s);
bool is_clean() const;
bool operator()(bool force = false);
void collect_statistics(statistics & st) const;
void reset_statistics();
void dec() { m_cleanup_counter--; }
};
};