File tree 1 file changed +21
-0
lines changed
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)
69
69
70
70
if (!forward) // backwards?
71
71
{
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
+
72
93
unsigned &unwind=
73
94
frame.loop_iterations [goto_programt::loop_id (state.source .pc )].count ;
74
95
unwind++;
You can’t perform that action at this time.
0 commit comments