mirror of
https://github.com/Z3Prover/z3
synced 2025-08-27 21:48:56 +00:00
fix transitive reduction bug, eliminate blocked tag on binary clauses, separate BIG structure from scc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
71c52396cb
26 changed files with 572 additions and 355 deletions
55
src/sat/sat_big.h
Normal file
55
src/sat/sat_big.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*++
|
||||
Copyright (c) 2017 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
sat_big.h
|
||||
|
||||
Abstract:
|
||||
|
||||
binary implication graph structure.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2017-12-13.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef SAT_BIG_H_
|
||||
#define SAT_BIG_H_
|
||||
|
||||
#include "sat/sat_types.h"
|
||||
#include "util/statistics.h"
|
||||
#include "util/params.h"
|
||||
|
||||
namespace sat {
|
||||
class solver;
|
||||
|
||||
class big {
|
||||
random_gen m_rand;
|
||||
unsigned m_num_vars;
|
||||
vector<literal_vector> m_dag;
|
||||
svector<bool> m_roots;
|
||||
svector<int> m_left, m_right;
|
||||
literal_vector m_root, m_parent;
|
||||
|
||||
void init_dfs_num(bool learned);
|
||||
struct pframe;
|
||||
|
||||
public:
|
||||
|
||||
big();
|
||||
void init_big(solver& s, bool learned);
|
||||
void ensure_big(solver& s, bool learned) { if (m_left.empty()) init_big(s, learned); }
|
||||
int get_left(literal l) const { return m_left[l.index()]; }
|
||||
int get_right(literal l) const { return m_right[l.index()]; }
|
||||
literal get_parent(literal l) const { return m_parent[l.index()]; }
|
||||
literal get_root(literal l) const { return m_root[l.index()]; }
|
||||
bool reaches(literal u, literal v) const { return m_left[u.index()] < m_left[v.index()] && m_right[v.index()] < m_right[u.index()]; }
|
||||
bool connected(literal u, literal v) const { return reaches(u, v) || reaches(~v, ~u); }
|
||||
void display(std::ostream& out) const;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue