mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
add outline for ule constraints, change bit to var constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5706c7a93b
commit
9df7e9a029
12 changed files with 224 additions and 113 deletions
42
src/math/polysat/var_constraint.h
Normal file
42
src/math/polysat/var_constraint.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*++
|
||||
Copyright (c) 2021 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
polysat var_constraint
|
||||
|
||||
Abstract:
|
||||
|
||||
Var constraints restrict viable values.
|
||||
|
||||
The main way var-constraints interact with the solver is to
|
||||
narrow m_viable during initialization.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2021-03-19
|
||||
Jakob Rath 2021-04-6
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
#include "math/dd/dd_bdd.h"
|
||||
#include "math/polysat/constraint.h"
|
||||
|
||||
|
||||
namespace polysat {
|
||||
|
||||
class var_constraint : public constraint {
|
||||
pvar m_var;
|
||||
bdd m_viable;
|
||||
public:
|
||||
var_constraint(unsigned lvl, pvar v, bdd const & b, p_dependency_ref& dep):
|
||||
constraint(lvl, dep, ckind_t::bit_t), m_var(v), m_viable(b) {}
|
||||
~var_constraint() override {}
|
||||
std::ostream& display(std::ostream& out) const override;
|
||||
bool propagate(solver& s, pvar v) override;
|
||||
constraint* resolve(solver& s, pvar v) override;
|
||||
void narrow(solver& s) override;
|
||||
bool is_always_false() override;
|
||||
bool is_currently_false(solver& s) override;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue