Skip to content

Commit

Permalink
Improve invariant message
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbrenguier committed Jun 18, 2018
1 parent 3c7a671 commit 645eda9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/solvers/refinement/string_refinement_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,15 @@ void string_dependenciest::for_each_dependency(
stack.emplace_back(if_expr->true_case());
stack.emplace_back(if_expr->false_case());
}
else if(const auto string_node = node_at(to_array_string_expr(current)))
f(*string_node);
else
UNREACHABLE;
{
const auto string_node = node_at(to_array_string_expr(current));
INVARIANT(
string_node,
"dependencies of the node should have been added to the graph at node creation "
+ current.get().pretty());
f(*string_node);
}
}
}
}
Expand Down

0 comments on commit 645eda9

Please sign in to comment.