File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,27 @@ void goto_symext::symex_goto(statet &state)
6969
7070 if (!forward) // backwards?
7171 {
72+ // is it label: goto label; or while(cond); - popular in SV-COMP
73+ if (goto_target==state.source .pc ||
74+ (instruction.incoming_edges .size ()==1 &&
75+ *instruction.incoming_edges .begin ()==goto_target))
76+ {
77+ // generate assume(false) or a suitable negation if this
78+ // instruction is a conditional goto
79+ exprt negated_cond;
80+
81+ if (new_guard.is_true ())
82+ negated_cond=false_exprt ();
83+ else
84+ negated_cond=not_exprt (new_guard);
85+
86+ symex_assume (state, negated_cond);
87+
88+ // next instruction
89+ state.source .pc ++;
90+ return ;
91+ }
92+
7293 unsigned &unwind=
7394 frame.loop_iterations [goto_programt::loop_id (state.source .pc )].count ;
7495 unwind++;
You can’t perform that action at this time.
0 commit comments