File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,37 @@ void set_claims(
120
120
if (!claim_set.empty ())
121
121
throw " claim " +(*claim_set.begin ())+" not found" ;
122
122
}
123
+
124
+ /* ******************************************************************\
125
+
126
+ Function: make_assertions_false
127
+
128
+ Inputs:
129
+
130
+ Outputs:
131
+
132
+ Purpose:
133
+
134
+ \*******************************************************************/
135
+
136
+ void make_assertions_false (
137
+ goto_functionst &goto_functions)
138
+ {
139
+ for (goto_functionst::function_mapt::iterator
140
+ f_it=goto_functions.function_map .begin ();
141
+ f_it!=goto_functions.function_map .end ();
142
+ f_it++)
143
+ {
144
+ goto_programt &goto_program=f_it->second .body ;
145
+
146
+ for (goto_programt::instructionst::iterator
147
+ i_it=goto_program.instructions .begin ();
148
+ i_it!=goto_program.instructions .end ();
149
+ i_it++)
150
+ {
151
+ if (!i_it->is_assert ()) continue ;
152
+ i_it->guard .make_false ();
153
+ }
154
+ }
155
+ }
156
+
Original file line number Diff line number Diff line change @@ -18,5 +18,8 @@ void set_claims(
18
18
void set_claims (
19
19
goto_programt &goto_program,
20
20
const std::list<std::string> &claims);
21
+
22
+ void make_assertions_false (
23
+ goto_functionst &goto_functions);
21
24
22
25
#endif
You can’t perform that action at this time.
0 commit comments