Skip to content

Commit

Permalink
skip SMT simplification of unsupported expressions, and continue
Browse files Browse the repository at this point in the history
We were aborting SMT simplification whenever we hit an unsupported expression.
This was unnecessarily conservative as one unsupported expression does not mean
that every later expression in the model will be unsupported. Note that we still
*do* need to abort on unsupported definitions and similar constructs while
traversing the model because skipping these can affect the correctness of later
simplification decisions.

Github: related to #130 "interact with SMT solver"
  • Loading branch information
Smattr committed Jun 26, 2019
1 parent 16ddf49 commit 2f96793
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rumur/src/smt/simplify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,14 @@ namespace { class Simplifier : public BaseTraversal {
if (!e->is_boolean())
return;

const std::string claim = translate(*e);
std::string claim;
try {
claim = translate(*e);
} catch (Unsupported&) {
*info << "skipping SMT simplification of unsupported expression \""
<< e->to_string() << "\"\n";
return;
}

if (solver->is_true(claim)) {
*info << "simplifying \"" << e->to_string() << "\" to true\n";
Expand Down

0 comments on commit 2f96793

Please sign in to comment.