File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -348,8 +348,10 @@ goto_programt::targett insert_after_preserving_source_location(
348348goto_programt::targett insert_before_preserving_source_location (
349349 goto_programt &body, goto_programt::targett pos)
350350{
351- typedef goto_programt::targett (goto_programt::*ftype)(goto_programt::targett);
352- const auto op=std::bind1st (std::mem_fun (static_cast <ftype>(&goto_programt::insert_before)), &body);
351+ typedef goto_programt::targett (goto_programt::*ftype)(
352+ goto_programt::targett);
353+ const auto op=std::bind1st (
354+ std::mem_fun (static_cast <ftype>(&goto_programt::insert_before)), &body);
353355 return insert_preserving_source_location (pos, op);
354356}
355357
Original file line number Diff line number Diff line change @@ -30,9 +30,8 @@ const struct_exprt &find_solution(const goto_tracet &trace)
3030}
3131}
3232
33- void rational_solution_configurationt::convert (
34- solutiont ¤t_candidate, const goto_tracet &trace,
35- const symbol_tablet &st)
33+ void rational_solution_configurationt::convert (solutiont ¤t_candidate,
34+ const goto_tracet &trace, const symbol_tablet &st)
3635{
3736 const struct_exprt &solution=find_solution (trace);
3837 const namespacet ns (st);
Original file line number Diff line number Diff line change 1111#include < cegis/control/preprocessing/control_preprocessing.h>
1212#include < goto-programs/remove_returns.h>
1313
14+ #define TMP_MARKER " $tmp"
15+
1416// XXX: Debug
1517#include < iostream>
1618// XXX: Debug
1719
18- #define TMP_MARKER " $tmp"
19-
2020control_preprocessingt::control_preprocessingt (const symbol_tablet &st,
2121 const goto_functionst &gf) :
2222 control_program(st, gf)
@@ -39,8 +39,11 @@ bool is_meta(const goto_programt::const_targett pos)
3939 const std::string &func=id2string (loc.get_function ());
4040 for (const char * const excluded : excluded_functions)
4141 if (contains (func, excluded)) return true ;
42- if (goto_program_instruction_typet::ASSIGN != pos->type
43- && goto_program_instruction_typet::DECL != pos->type ) return false ;
42+ if ((goto_program_instruction_typet::ASSIGN != pos->type
43+ && goto_program_instruction_typet::DECL != pos->type )
44+ || !pos->code .has_operands ()
45+ || (pos->code .has_operands () && ID_symbol != pos->code .op0 ().id ()))
46+ return false ;
4447 const std::string &var=id2string (get_affected_variable (*pos));
4548 if (contains (var, TMP_MARKER) || contains (var, RETURN_VALUE_SUFFIX)
4649 || contains (var, CPROVER_PREFIX)) return true ;
You can’t perform that action at this time.
0 commit comments