3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 17:30:23 +00:00

Add initial value setting for variables in Z3 API, solver, and optimize modules

This commit is contained in:
Nikolaj Bjorner 2024-09-18 16:13:15 +03:00
parent 0ba306e7b3
commit 48712b4f60
31 changed files with 297 additions and 9 deletions

View file

@ -2249,6 +2249,21 @@ namespace smt {
return false;
}
template<typename Ext>
void theory_arith<Ext>::initialize_value(expr* var, expr* value) {
theory_var v = expr2var(var);
rational r;
if (!m_util.is_numeral(value, r)) {
IF_VERBOSE(5, verbose_stream() << "numeric constant expected in initialization " << mk_pp(var, m) << " := " << mk_pp(value, m) << "\n");
return;
}
if (v == null_theory_var)
return;
if (is_base(v))
return;
update_value(v, inf_numeral(r));
}
#if 0
/**