3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

fail gracefully on interpolation errors

This commit is contained in:
Ken McMillan 2015-07-10 14:39:11 -07:00
parent 1cf24f7cdc
commit e6516f549d
5 changed files with 74 additions and 16 deletions

View file

@ -562,7 +562,14 @@ namespace Duality {
opts.set("weak","1");
::ast *proof = m_solver->get_proof();
iz3interpolate(m(),proof,_assumptions,_parents,_interpolants,_theory,&opts);
try {
iz3interpolate(m(),proof,_assumptions,_parents,_interpolants,_theory,&opts);
}
// If there's an interpolation bug, throw a char *
// exception so duality can catch it and restart.
catch (const interpolation_failure &f) {
throw f.msg();
}
std::vector<expr> linearized_interpolants(_interpolants.size());
for(unsigned i = 0; i < _interpolants.size(); i++)