Skip to content

Commit

Permalink
fix #4637
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Aug 23, 2020
1 parent 666e835 commit 84475ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
5 changes: 4 additions & 1 deletion src/api/c++/z3++.h
Original file line number Diff line number Diff line change
Expand Up @@ -2864,7 +2864,10 @@ namespace z3 {
assert(e.is_bool());
Z3_optimize_assert_and_track(ctx(), m_opt, e, t);
}

void add(expr const& e, char const* p) {
assert(e.is_bool());
add(e, ctx().bool_const(p));
}
handle add_soft(expr const& e, unsigned weight) {
assert(e.is_bool());
auto str = std::to_string(weight);
Expand Down
23 changes: 10 additions & 13 deletions src/smt/user_propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ Module Name:

User-propagator plugin.
Adds user plugins to propagate based on
terms receiving fixed values.
terms receiving fixed values or equalities.

Author:

Nikolaj Bjorner (nbjorner) 2020-08-17

Notes:

- could also be complemented with disequalities to fixed values to narrow range of variables.


--*/

Expand Down Expand Up @@ -49,16 +47,15 @@ namespace smt {
void reset() { memset(this, 0, sizeof(*this)); }
};

void* m_user_context;
solver::push_eh_t m_push_eh;
solver::pop_eh_t m_pop_eh;
solver::fresh_eh_t m_fresh_eh;
solver::final_eh_t m_final_eh;
solver::fixed_eh_t m_fixed_eh;
solver::eq_eh_t m_eq_eh;
solver::eq_eh_t m_diseq_eh;
void* m_user_context;
solver::push_eh_t m_push_eh;
solver::pop_eh_t m_pop_eh;
solver::fresh_eh_t m_fresh_eh;
solver::final_eh_t m_final_eh;
solver::fixed_eh_t m_fixed_eh;
solver::eq_eh_t m_eq_eh;
solver::eq_eh_t m_diseq_eh;
solver::context_obj* m_api_context { nullptr };

unsigned m_qhead { 0 };
vector<prop_info> m_prop;
unsigned_vector m_prop_lim;
Expand All @@ -78,7 +75,7 @@ namespace smt {
* \brief initial setup for user propagator.
*/
void add(
void* ctx,
void* ctx,
solver::push_eh_t& push_eh,
solver::pop_eh_t& pop_eh,
solver::fresh_eh_t& fresh_eh) {
Expand Down

0 comments on commit 84475ff

Please sign in to comment.