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

66 lines
1.5 KiB
C++

/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
sat_scc.h
Abstract:
Use binary clauses to compute strongly connected components.
Author:
Leonardo de Moura (leonardo) 2011-05-26.
Revision History:
--*/
#pragma once
#include "util/statistics.h"
#include "util/params.h"
#include "sat/sat_types.h"
#include "sat/sat_big.h"
namespace sat {
class solver;
class scc {
struct report;
solver & m_solver;
// config
bool m_scc;
bool m_scc_tr;
// stats
unsigned m_num_elim;
unsigned m_num_elim_bin;
big m_big;
void reduce_tr();
unsigned reduce_tr(bool learned);
public:
scc(solver & s, params_ref const & p);
unsigned operator()();
void updt_params(params_ref const & p);
static void collect_param_descrs(param_descrs & d);
void collect_statistics(statistics & st) const;
void reset_statistics();
/*
\brief create binary implication graph and associated data-structures to check transitivity.
*/
void init_big(bool learned) { m_big.init(m_solver, learned); }
void ensure_big(bool learned) { m_big.ensure_big(m_solver, learned); }
int get_left(literal l) const { return m_big.get_left(l); }
int get_right(literal l) const { return m_big.get_right(l); }
bool connected(literal u, literal v) const { return m_big.connected(u, v); }
};
};