mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
mbi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
39f73fa595
commit
4ff940a29e
6 changed files with 86 additions and 22 deletions
|
@ -1166,7 +1166,13 @@ namespace opt {
|
|||
out << mk_pp(term, m);
|
||||
app* q = m.mk_fresh_const(out.str().c_str(), m.get_sort(term));
|
||||
if (!fm) fm = alloc(generic_model_converter, m, "opt");
|
||||
m_hard_constraints.push_back(m.mk_eq(q, term));
|
||||
if (m_arith.is_int_real(term)) {
|
||||
m_hard_constraints.push_back(m_arith.mk_ge(q, term));
|
||||
m_hard_constraints.push_back(m_arith.mk_le(q, term));
|
||||
}
|
||||
else {
|
||||
m_hard_constraints.push_back(m.mk_eq(q, term));
|
||||
}
|
||||
fm->hide(q);
|
||||
return q;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue