File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ class ternary_exprt : public expr_protectedt
79
79
expr.operands ().size () == 3 ,
80
80
" ternary expression must have three operands" );
81
81
}
82
+
83
+ static void validate (
84
+ const exprt &expr,
85
+ const namespacet &,
86
+ const validation_modet vm = validation_modet::INVARIANT)
87
+ {
88
+ check (expr, vm);
89
+ }
82
90
};
83
91
84
92
// / \brief Cast an exprt to a \ref ternary_exprt
@@ -2294,6 +2302,21 @@ class if_exprt : public ternary_exprt
2294
2302
{
2295
2303
return op2 ();
2296
2304
}
2305
+
2306
+ static void check (
2307
+ const exprt &expr,
2308
+ const validation_modet vm = validation_modet::INVARIANT)
2309
+ {
2310
+ ternary_exprt::check (expr, vm);
2311
+ }
2312
+
2313
+ static void validate (
2314
+ const exprt &expr,
2315
+ const namespacet &ns,
2316
+ const validation_modet vm = validation_modet::INVARIANT)
2317
+ {
2318
+ ternary_exprt::validate (expr, ns, vm);
2319
+ }
2297
2320
};
2298
2321
2299
2322
template <>
@@ -2563,6 +2586,21 @@ class update_exprt : public ternary_exprt
2563
2586
{
2564
2587
return op2 ();
2565
2588
}
2589
+
2590
+ static void check (
2591
+ const exprt &expr,
2592
+ const validation_modet vm = validation_modet::INVARIANT)
2593
+ {
2594
+ ternary_exprt::check (expr, vm);
2595
+ }
2596
+
2597
+ static void validate (
2598
+ const exprt &expr,
2599
+ const namespacet &ns,
2600
+ const validation_modet vm = validation_modet::INVARIANT)
2601
+ {
2602
+ ternary_exprt::validate (expr, ns, vm);
2603
+ }
2566
2604
};
2567
2605
2568
2606
template <>
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Author: Daniel Poetzl
13
13
#include < iostream>
14
14
#endif
15
15
16
+ #include " bitvector_expr.h"
16
17
#include " pointer_expr.h"
17
18
#include " ssa_expr.h"
18
19
@@ -46,6 +47,22 @@ void call_on_expr(const exprt &expr, Args &&... args)
46
47
{
47
48
CALL_ON_EXPR (constant_exprt);
48
49
}
50
+ else if (expr.id () == ID_if)
51
+ {
52
+ CALL_ON_EXPR (if_exprt);
53
+ }
54
+ else if (expr.id () == ID_update)
55
+ {
56
+ CALL_ON_EXPR (update_exprt);
57
+ }
58
+ else if (expr.id () == ID_overflow_unary_minus)
59
+ {
60
+ CALL_ON_EXPR (unary_minus_overflow_exprt);
61
+ }
62
+ else if (expr.id () == ID_count_leading_zeros)
63
+ {
64
+ CALL_ON_EXPR (count_leading_zeros_exprt);
65
+ }
49
66
else
50
67
{
51
68
#ifdef REPORT_UNIMPLEMENTED_EXPRESSION_CHECKS
You can’t perform that action at this time.
0 commit comments