File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ Author: Daniel Kroening, kroening@kroening.com
2626#include < util/ieee_float.h>
2727#include < util/invariant.h>
2828#include < util/make_unique.h>
29+ #include < util/mathematical_expr.h>
2930#include < util/message.h>
3031#include < util/options.h>
3132#include < util/pointer_expr.h>
@@ -1795,11 +1796,19 @@ void goto_check_ct::check_rec_arithmetic_op(
17951796
17961797void goto_check_ct::check_rec (const exprt &expr, const guardt &guard)
17971798{
1798- // we don't look into quantifiers
17991799 if (expr.id () == ID_exists || expr.id () == ID_forall)
1800- return ;
1800+ {
1801+ // the scoped variables may be used in the assertion
1802+ const auto &quantifier_expr = to_quantifier_expr (expr);
18011803
1802- if (expr.id () == ID_address_of)
1804+ auto new_guard = [&guard, &quantifier_expr](exprt expr) {
1805+ return guard (forall_exprt (quantifier_expr.symbol (), expr));
1806+ };
1807+
1808+ check_rec (quantifier_expr.where (), new_guard);
1809+ return ;
1810+ }
1811+ else if (expr.id () == ID_address_of)
18031812 {
18041813 check_rec_address (to_address_of_expr (expr).object (), guard);
18051814 return ;
You can’t perform that action at this time.
0 commit comments