mirror of
https://github.com/Z3Prover/z3
synced 2025-05-16 20:24:45 +00:00
fix APIs, add python API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0181f0f9df
commit
ff1543d700
12 changed files with 193 additions and 35 deletions
|
@ -219,7 +219,13 @@ namespace opt {
|
|||
}
|
||||
|
||||
for (unsigned i = 0; i < m_objs.size(); ++i) {
|
||||
m_vars.push_back(solver.add_objective(m_objs[i].get()));
|
||||
smt::theory_var v = solver.add_objective(m_objs[i].get());
|
||||
if (v == smt::null_theory_var) {
|
||||
std::ostringstream out;
|
||||
out << "Objective function '" << mk_pp(m_objs[i].get(), m) << "' is not supported";
|
||||
throw default_exception(out.str());
|
||||
}
|
||||
m_vars.push_back(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue