File tree 1 file changed +12
-3
lines changed 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 26
26
#include < util/ieee_float.h>
27
27
#include < util/invariant.h>
28
28
#include < util/make_unique.h>
29
+ #include < util/mathematical_expr.h>
29
30
#include < util/message.h>
30
31
#include < util/options.h>
31
32
#include < util/pointer_expr.h>
@@ -1795,11 +1796,19 @@ void goto_check_ct::check_rec_arithmetic_op(
1795
1796
1796
1797
void goto_check_ct::check_rec (const exprt &expr, const guardt &guard)
1797
1798
{
1798
- // we don't look into quantifiers
1799
1799
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);
1801
1803
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)
1803
1812
{
1804
1813
check_rec_address (to_address_of_expr (expr).object (), guard);
1805
1814
return ;
You can’t perform that action at this time.
0 commit comments