We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95284f5 + e672e0d commit bf08eeeCopy full SHA for bf08eee
src/goto-symex/symex_goto.cpp
@@ -69,6 +69,27 @@ void goto_symext::symex_goto(statet &state)
69
70
if(!forward) // backwards?
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
93
unsigned &unwind=
94
frame.loop_iterations[goto_programt::loop_id(state.source.pc)].count;
95
unwind++;
0 commit comments