fix(library/unifier): catch type error when checking is_def_eq of type incorrect expressions

This commit is contained in:
Leonardo de Moura 2014-09-09 08:43:16 -07:00
parent fd85d4702e
commit a5698a55ec

View file

@ -485,13 +485,18 @@ struct unifier_fn {
\remark If relax is true then opaque definitions from the main module are treated as transparent. \remark If relax is true then opaque definitions from the main module are treated as transparent.
*/ */
bool is_def_eq(expr const & t1, expr const & t2, justification const & j, bool relax) { bool is_def_eq(expr const & t1, expr const & t2, justification const & j, bool relax) {
auto dcs = m_tc[relax]->is_def_eq(t1, t2, j); try {
if (!dcs.first) { auto dcs = m_tc[relax]->is_def_eq(t1, t2, j);
// std::cout << "conflict: " << t1 << " =?= " << t2 << "\n"; if (!dcs.first) {
// std::cout << "conflict: " << t1 << " =?= " << t2 << "\n";
set_conflict(j);
return false;
} else {
return process_constraints(dcs.second);
}
} catch (exception&) {
set_conflict(j); set_conflict(j);
return false; return false;
} else {
return process_constraints(dcs.second);
} }
} }