File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,17 @@ void goto_symext::vcc(
100100
101101void goto_symext::symex_assume (statet &state, const exprt &cond)
102102{
103- exprt simplified_cond=cond;
103+ guardt cond_guard (guard_manager);
104+ cond_guard.from_expr (cond);
104105
105- do_simplify (simplified_cond);
106-
107- if (simplified_cond.is_true ())
106+ if (cond_guard.is_true ())
108107 return ;
109108
110109 if (state.threads .size ()==1 )
111110 {
112- exprt tmp=simplified_cond;
111+ exprt tmp = cond_guard.as_expr ();
112+ // Using state.guard.implies(cond_guard) is not correct here for some hidden
113+ // reasons
113114 state.guard .guard_expr (tmp);
114115 target.assumption (state.guard .as_expr (), tmp, state.source );
115116 }
@@ -120,7 +121,7 @@ void goto_symext::symex_assume(statet &state, const exprt &cond)
120121 // x=0; assume(x==1);
121122 // assert(x!=42); x=42;
122123 else
123- state.guard .add (simplified_cond );
124+ state.guard .append (cond_guard );
124125
125126 if (state.atomic_section_id !=0 &&
126127 state.guard .is_false ())
You can’t perform that action at this time.
0 commit comments