3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 06:15:46 +00:00

get rid of int*, use lambda scoping

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-09-20 15:18:37 -07:00
parent 7a74b099ba
commit 615aad7779
5 changed files with 55 additions and 56 deletions

View file

@ -31,13 +31,13 @@ class implied_bound {
// by lar_solver::add_term()
unsigned m_j;
bool m_is_lower_bound;
bool m_strict;
bool m_strict;
private:
std::function<u_dependency*(int *)> m_explain_bound = nullptr;
std::function<u_dependency*()> m_explain_bound = nullptr;
public:
// s is expected to be the pointer to lp_bound_propagator.
u_dependency* explain_implied(int * s) const { return m_explain_bound(s); }
void set_explain(std::function<u_dependency*(int *)> f) { m_explain_bound = f; }
u_dependency* explain_implied() const { return m_explain_bound(); }
void set_explain(std::function<u_dependency*()> f) { m_explain_bound = f; }
lconstraint_kind kind() const {
lconstraint_kind k = m_is_lower_bound? GE : LE;
if (m_strict)
@ -48,8 +48,8 @@ class implied_bound {
implied_bound(const mpq & a,
unsigned j,
bool is_lower_bound,
bool is_strict,
std::function<u_dependency*(int *)> get_dep):
bool is_strict,
std::function<u_dependency*()> get_dep):
m_bound(a),
m_j(j),
m_is_lower_bound(is_lower_bound),