mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
54 lines
886 B
C++
54 lines
886 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:
|
|
|
|
--*/
|
|
#ifndef _SAT_CLEANER_H_
|
|
#define _SAT_CLEANER_H_
|
|
|
|
#include"sat_types.h"
|
|
#include"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 operator()(bool force = false);
|
|
|
|
void collect_statistics(statistics & st);
|
|
void reset_statistics();
|
|
|
|
void dec() { m_cleanup_counter--; }
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|