mirror of
https://github.com/Z3Prover/z3
synced 2025-09-06 18:01:07 +00:00
Merge remote-tracking branch 'Z3Prover/polysat' into polysat
This commit is contained in:
commit
74ec28201e
41 changed files with 2206 additions and 661 deletions
|
@ -51,7 +51,7 @@ namespace polysat {
|
|||
/** The boolean variable associated to this constraint */
|
||||
sat::bool_var m_bvar = sat::null_bool_var;
|
||||
|
||||
constraint(constraint_manager& m, ckind_t k): m_kind(k) {}
|
||||
constraint(ckind_t k): m_kind(k) {}
|
||||
|
||||
public:
|
||||
virtual ~constraint() {}
|
||||
|
@ -115,9 +115,11 @@ namespace polysat {
|
|||
bool is_pwatched() const { return m_is_pwatched; }
|
||||
void set_pwatched(bool f) { m_is_pwatched = f; }
|
||||
|
||||
/// Assuming the constraint is univariate under the current assignment of 's',
|
||||
/// adds the constraint to the univariate solver 'us'.
|
||||
virtual void add_to_univariate_solver(solver& s, univariate_solver& us, unsigned dep, bool is_positive) const = 0;
|
||||
/**
|
||||
* If the constraint is univariate in variable 'v' under the current assignment of 's',
|
||||
* add the constraint to the univariate solver 'us'.
|
||||
*/
|
||||
virtual void add_to_univariate_solver(pvar v, solver& s, univariate_solver& us, unsigned dep, bool is_positive) const = 0;
|
||||
};
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& out, constraint const& c) { return c.display(out); }
|
||||
|
@ -162,7 +164,7 @@ namespace polysat {
|
|||
void narrow(solver& s, bool first) { get()->narrow(s, is_positive(), first); }
|
||||
clause_ref produce_lemma(solver& s, assignment const& a) { return get()->produce_lemma(s, a, is_positive()); }
|
||||
|
||||
void add_to_univariate_solver(solver& s, univariate_solver& us, unsigned dep) const { get()->add_to_univariate_solver(s, us, dep, is_positive()); }
|
||||
void add_to_univariate_solver(pvar v, solver& s, univariate_solver& us, unsigned dep) const { get()->add_to_univariate_solver(v, s, us, dep, is_positive()); }
|
||||
|
||||
unsigned_vector const& vars() const { return m_constraint->vars(); }
|
||||
unsigned var(unsigned idx) const { return m_constraint->var(idx); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue