12
12
#ifndef CPROVER_GOTO_SYMEX_SYMEX_TARGET_EQUATION_H
13
13
#define CPROVER_GOTO_SYMEX_SYMEX_TARGET_EQUATION_H
14
14
15
- #include < algorithm>
16
- #include < iosfwd>
17
- #include < list>
18
-
19
- #include < util/invariant.h>
20
15
#include < util/merge_irep.h>
21
16
#include < util/message.h>
22
17
#include < util/narrow.h>
23
18
24
19
#include " ssa_step.h"
25
20
#include " symex_target.h"
26
21
22
+ #include < algorithm>
23
+ #include < iosfwd>
24
+ #include < list>
25
+
27
26
class decision_proceduret ;
28
27
class namespacet ;
29
28
@@ -183,53 +182,16 @@ class symex_target_equationt:public symex_targett
183
182
// / interface
184
183
void convert_without_assertions (decision_proceduret &decision_procedure);
185
184
186
- // / Converts assignments: set the equality _lhs==rhs_ to _True_.
187
- // / \param decision_procedure: A handle to a decision procedure
188
- // / interface
189
- void convert_assignments (decision_proceduret &decision_procedure);
190
-
191
- // / Converts declarations: these are effectively ignored by the decision
192
- // / procedure.
193
- // / \param decision_procedure: A handle to a decision procedure
194
- // / interface
195
- void convert_decls (decision_proceduret &decision_procedure);
196
-
197
- // / Converts assumptions: convert the expression the assumption represents.
198
- // / \param decision_procedure: A handle to a decision procedure interface
199
- void convert_assumptions (decision_proceduret &decision_procedure);
200
-
201
185
// / Converts assertions: build a disjunction of negated assertions.
202
186
// / \param decision_procedure: A handle to a decision procedure interface
203
187
// / \param optimized_for_single_assertions: Use an optimized encoding for
204
188
// / single assertions (unsound for incremental conversions)
205
189
void convert_assertions (
206
190
decision_proceduret &decision_procedure,
207
- bool optimized_for_single_assertions = true );
208
-
209
- // / Converts constraints: set the represented condition to _True_.
210
- // / \param decision_procedure: A handle to a decision procedure interface
211
- void convert_constraints (decision_proceduret &decision_procedure);
212
-
213
- // / Converts goto instructions: convert the expression representing the
214
- // / condition of this goto.
215
- // / \param decision_procedure: A handle to a decision procedure interface
216
- void convert_goto_instructions (decision_proceduret &decision_procedure);
217
-
218
- // / Converts guards: convert the expression the guard represents.
219
- // / \param decision_procedure: A handle to a decision procedure interface
220
- void convert_guards (decision_proceduret &decision_procedure);
191
+ bool optimized_for_single_assertions);
221
192
222
- // / Converts function calls: for each argument build an equality between its
223
- // / symbol and the argument itself.
224
- // / \param decision_procedure: A handle to a decision procedure interface
225
- void convert_function_calls (decision_proceduret &decision_procedure);
226
-
227
- // / Converts I/O: for each argument build an equality between its
228
- // / symbol and the argument itself.
229
- // / \param decision_procedure: A handle to a decision procedure interface
230
- void convert_io (decision_proceduret &decision_procedure);
231
-
232
- exprt make_expression () const ;
193
+ typedef std::list<SSA_stept> SSA_stepst;
194
+ SSA_stepst SSA_steps;
233
195
234
196
std::size_t count_assertions () const
235
197
{
@@ -247,27 +209,8 @@ class symex_target_equationt:public symex_targett
247
209
}));
248
210
}
249
211
250
- typedef std::list<SSA_stept> SSA_stepst;
251
- SSA_stepst SSA_steps;
252
-
253
- SSA_stepst::iterator get_SSA_step (std::size_t s)
254
- {
255
- SSA_stepst::iterator it=SSA_steps.begin ();
256
- for (; s!=0 ; s--)
257
- {
258
- PRECONDITION (it != SSA_steps.end ());
259
- it++;
260
- }
261
- return it;
262
- }
263
-
264
212
void output (std::ostream &out) const ;
265
213
266
- void clear ()
267
- {
268
- SSA_steps.clear ();
269
- }
270
-
271
214
bool has_threads () const
272
215
{
273
216
return std::any_of (
@@ -283,6 +226,44 @@ class symex_target_equationt:public symex_targett
283
226
}
284
227
285
228
protected:
229
+ // / Converts assignments: set the equality _lhs==rhs_ to _True_.
230
+ // / \param decision_procedure: A handle to a decision procedure
231
+ // / interface
232
+ void convert_assignments (decision_proceduret &decision_procedure);
233
+
234
+ // / Converts declarations: these are effectively ignored by the decision
235
+ // / procedure.
236
+ // / \param decision_procedure: A handle to a decision procedure
237
+ // / interface
238
+ void convert_decls (decision_proceduret &decision_procedure);
239
+
240
+ // / Converts assumptions: convert the expression the assumption represents.
241
+ // / \param decision_procedure: A handle to a decision procedure interface
242
+ void convert_assumptions (decision_proceduret &decision_procedure);
243
+
244
+ // / Converts constraints: set the represented condition to _True_.
245
+ // / \param decision_procedure: A handle to a decision procedure interface
246
+ void convert_constraints (decision_proceduret &decision_procedure);
247
+
248
+ // / Converts goto instructions: convert the expression representing the
249
+ // / condition of this goto.
250
+ // / \param decision_procedure: A handle to a decision procedure interface
251
+ void convert_goto_instructions (decision_proceduret &decision_procedure);
252
+
253
+ // / Converts guards: convert the expression the guard represents.
254
+ // / \param decision_procedure: A handle to a decision procedure interface
255
+ void convert_guards (decision_proceduret &decision_procedure);
256
+
257
+ // / Converts function calls: for each argument build an equality between its
258
+ // / symbol and the argument itself.
259
+ // / \param decision_procedure: A handle to a decision procedure interface
260
+ void convert_function_calls (decision_proceduret &decision_procedure);
261
+
262
+ // / Converts I/O: for each argument build an equality between its
263
+ // / symbol and the argument itself.
264
+ // / \param decision_procedure: A handle to a decision procedure interface
265
+ void convert_io (decision_proceduret &decision_procedure);
266
+
286
267
messaget log;
287
268
288
269
// for enforcing sharing in the expressions stored
0 commit comments