File tree 3 files changed +13
-9
lines changed
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(
348
348
goto_programt::targett insert_before_preserving_source_location (
349
349
goto_programt &body, goto_programt::targett pos)
350
350
{
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);
353
355
return insert_preserving_source_location (pos, op);
354
356
}
355
357
Original file line number Diff line number Diff line change @@ -30,9 +30,8 @@ const struct_exprt &find_solution(const goto_tracet &trace)
30
30
}
31
31
}
32
32
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)
36
35
{
37
36
const struct_exprt &solution=find_solution (trace);
38
37
const namespacet ns (st);
Original file line number Diff line number Diff line change 11
11
#include < cegis/control/preprocessing/control_preprocessing.h>
12
12
#include < goto-programs/remove_returns.h>
13
13
14
+ #define TMP_MARKER " $tmp"
15
+
14
16
// XXX: Debug
15
17
#include < iostream>
16
18
// XXX: Debug
17
19
18
- #define TMP_MARKER " $tmp"
19
-
20
20
control_preprocessingt::control_preprocessingt (const symbol_tablet &st,
21
21
const goto_functionst &gf) :
22
22
control_program(st, gf)
@@ -39,8 +39,11 @@ bool is_meta(const goto_programt::const_targett pos)
39
39
const std::string &func=id2string (loc.get_function ());
40
40
for (const char * const excluded : excluded_functions)
41
41
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 ;
44
47
const std::string &var=id2string (get_affected_variable (*pos));
45
48
if (contains (var, TMP_MARKER) || contains (var, RETURN_VALUE_SUFFIX)
46
49
|| contains (var, CPROVER_PREFIX)) return true ;
You can’t perform that action at this time.
0 commit comments