File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include < util/byte_operators.h>
10
10
#include < util/cprover_prefix.h>
11
+ #include < util/expr_util.h>
11
12
12
13
#include < ansi-c/c_types.h>
13
14
@@ -35,6 +36,17 @@ void goto_symext::symex_assign_rec(
35
36
code_assignt deref_code=code;
36
37
37
38
clean_expr (deref_code.lhs (), state, true );
39
+ // make the structure of the lhs as simple as possible to avoid,
40
+ // e.g., (b ? s1 : s2).member=X resulting in
41
+ // (b ? s1 : s2)=(b ? s1 : s2) with member:=X and then
42
+ // s1=b ? ((b ? s1 : s2) with member:=X) : s1
43
+ // when all we need is
44
+ // s1=s1 with member:=X [and guard b]
45
+ // s2=s2 with member:=X [and guard !b]
46
+ do_simplify (deref_code.lhs ());
47
+ // make sure simplify has not re-introduced any dereferencing that
48
+ // had previously been cleaned away
49
+ assert (!has_subexpr (deref_code.lhs (), ID_dereference));
38
50
clean_expr (deref_code.rhs (), state, false );
39
51
40
52
symex_assign (state, deref_code);
You can’t perform that action at this time.
0 commit comments