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 @@ -68,6 +68,27 @@ void goto_symext::symex_goto(statet &state)
68
68
69
69
if (!forward) // backwards?
70
70
{
71
+ // is it label: goto label; or while(cond); - popular in SV-COMP
72
+ if (goto_target==state.source .pc ||
73
+ (instruction.incoming_edges .size ()==1 &&
74
+ *instruction.incoming_edges .begin ()==goto_target))
75
+ {
76
+ // generate assume(false) or a suitable negation if this
77
+ // instruction is a conditional goto
78
+ exprt negated_cond;
79
+
80
+ if (new_guard.is_true ())
81
+ negated_cond=false_exprt ();
82
+ else
83
+ negated_cond=not_exprt (new_guard);
84
+
85
+ symex_assume (state, negated_cond);
86
+
87
+ // next instruction
88
+ state.source .pc ++;
89
+ return ;
90
+ }
91
+
71
92
unsigned &unwind=
72
93
frame.loop_iterations [goto_programt::loop_id (state.source .pc )].count ;
73
94
unwind++;
You can’t perform that action at this time.
0 commit comments