3
0
Fork 0
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:
Nikolaj Bjorner 2014-03-23 21:28:11 -07:00
parent 0181f0f9df
commit ff1543d700
12 changed files with 193 additions and 35 deletions

View file

@ -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);
}
}