3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-03 14:33:56 +00:00

Add support for initializing variable values in solver and optimize contexts in Z3

This commit is contained in:
Nikolaj Bjorner 2024-09-19 22:44:16 +03:00
parent 342dccdc02
commit 0c48a50d59
12 changed files with 98 additions and 9 deletions

View file

@ -703,7 +703,14 @@ public:
}
void user_propagate_initialize_value(expr* var, expr* value) override {
ensure_euf()->user_propagate_initialize_value(var, value);
expr_ref _var(var, m), _value(value, m);
if (m_mcs.back())
m_mcs.back()->convert_initialize_value(_var, _value);
sat::bool_var b = m_map.to_bool_var(_var);
if (b != sat::null_bool_var)
m_solver.set_phase(sat::literal(b, m.is_false(_value)));
else if (get_euf())
ensure_euf()->user_propagate_initialize_value(_var, _value);
}