File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -211,26 +211,23 @@ void goto_symext::symex_goto(statet &state)
211
211
framet::goto_state_listt &goto_state_list =
212
212
state.call_stack ().top ().goto_state_map [new_state_pc];
213
213
214
- // If the guard is true (and the alternative branch unreachable) we can move
215
- // the state in this case as it'll never be accessed on the alternate branch.
214
+ // If the guard is unconditionally true it means the alternative branch is
215
+ // unreachable. In that case, move the state onto the state list, transition,
216
+ // and set the current guard to false.
216
217
if (new_guard.is_true ())
217
218
{
218
219
goto_state_list.emplace_back (state, true );
219
- }
220
- else
221
- {
222
- goto_state_list.emplace_back (state);
223
- }
224
220
225
- symex_transition (state, state_pc, backward);
221
+ symex_transition (state, state_pc, backward);
226
222
227
- // adjust guards
228
- if (new_guard.is_true ())
229
- {
230
223
state.guard = guardt (false_exprt ());
231
224
}
232
225
else
233
226
{
227
+ goto_state_list.emplace_back (state);
228
+
229
+ symex_transition (state, state_pc, backward);
230
+
234
231
// produce new guard symbol
235
232
exprt guard_expr;
236
233
You can’t perform that action at this time.
0 commit comments