Skip to content

Commit 021e195

Browse files
author
Owen
committed
Pass original guard to apply_goto_condition
This is in preparation for calling try_filter_value_sets inside apply_goto_condition
1 parent 4ded7d7 commit 021e195

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/goto-symex/goto_symex.h

+2
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,14 @@ class goto_symext
322322
/// \param current_state: state prior to the GOTO instruction
323323
/// \param jump_taken_state: state following taking the GOTO
324324
/// \param jump_not_taken_state: fall-through state
325+
/// \param original_guard: the original GOTO condition
325326
/// \param new_guard: GOTO condition, L2 renamed and simplified
326327
/// \param ns: global namespace
327328
void apply_goto_condition(
328329
goto_symex_statet &current_state,
329330
goto_statet &jump_taken_state,
330331
goto_statet &jump_not_taken_state,
332+
const exprt &original_guard,
331333
const exprt &new_guard,
332334
const namespacet &ns);
333335

src/goto-symex/symex_goto.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void goto_symext::apply_goto_condition(
2626
goto_symex_statet &current_state,
2727
goto_statet &jump_taken_state,
2828
goto_statet &jump_not_taken_state,
29+
const exprt &original_guard,
2930
const exprt &new_guard,
3031
const namespacet &ns)
3132
{
@@ -262,7 +263,13 @@ void goto_symext::symex_goto(statet &state)
262263
auto &taken_state = backward ? state : goto_state_list.back().second;
263264
auto &not_taken_state = backward ? goto_state_list.back().second : state;
264265

265-
apply_goto_condition(state, taken_state, not_taken_state, new_guard, ns);
266+
apply_goto_condition(
267+
state,
268+
taken_state,
269+
not_taken_state,
270+
instruction.get_condition(),
271+
new_guard,
272+
ns);
266273
}
267274

268275
// produce new guard symbol

0 commit comments

Comments
 (0)