@@ -12,18 +12,17 @@ Author: Daniel Kroening, kroening@kroening.com
1212#ifndef CPROVER_GOTO_SYMEX_SYMEX_TARGET_EQUATION_H
1313#define CPROVER_GOTO_SYMEX_SYMEX_TARGET_EQUATION_H
1414
15- #include < algorithm>
16- #include < iosfwd>
17- #include < list>
18-
19- #include < util/invariant.h>
2015#include < util/merge_irep.h>
2116#include < util/message.h>
2217#include < util/narrow.h>
2318
2419#include " ssa_step.h"
2520#include " symex_target.h"
2621
22+ #include < algorithm>
23+ #include < iosfwd>
24+ #include < list>
25+
2726class decision_proceduret ;
2827class namespacet ;
2928
@@ -183,53 +182,16 @@ class symex_target_equationt:public symex_targett
183182 // / interface
184183 void convert_without_assertions (decision_proceduret &decision_procedure);
185184
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-
201185 // / Converts assertions: build a disjunction of negated assertions.
202186 // / \param decision_procedure: A handle to a decision procedure interface
203187 // / \param optimized_for_single_assertions: Use an optimized encoding for
204188 // / single assertions (unsound for incremental conversions)
205189 void convert_assertions (
206190 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);
221192
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;
233195
234196 std::size_t count_assertions () const
235197 {
@@ -247,27 +209,8 @@ class symex_target_equationt:public symex_targett
247209 }));
248210 }
249211
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-
264212 void output (std::ostream &out) const ;
265213
266- void clear ()
267- {
268- SSA_steps.clear ();
269- }
270-
271214 bool has_threads () const
272215 {
273216 return std::any_of (
@@ -283,6 +226,44 @@ class symex_target_equationt:public symex_targett
283226 }
284227
285228protected:
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+
286267 messaget log;
287268
288269 // for enforcing sharing in the expressions stored
0 commit comments