1
1
#include < util/config.h>
2
2
#include < util/substitute.h>
3
+
3
4
#include < cbmc/cbmc_parse_options.h>
4
5
#include < cbmc/bmc.h>
6
+
5
7
#include < goto-programs/goto_trace.h>
6
8
#include < goto-programs/write_goto_binary.h>
7
9
@@ -45,31 +47,38 @@ class cbmc_runnert: public cbmc_parse_optionst
45
47
cbmc_resultt &result;
46
48
safety_checkert::resultt bmc_result;
47
49
const bool keep_goto_programs;
50
+
48
51
public:
49
- cbmc_runnert (const symbol_tablet &st, const goto_functionst &gf,
50
- cbmc_resultt &result, const bool keep_goto_programs) :
51
- cbmc_parse_optionst (get_argc(), get_argv()), st(st), gf(gf), result(
52
+ cbmc_runnert (
53
+ const symbol_tablet &st,
54
+ const goto_functionst &gf,
55
+ cbmc_resultt &result,
56
+ const bool keep_goto_programs) :
57
+ cbmc_parse_optionst (get_argc(), get_argv()), st(st), gf(gf), result(
52
58
result), bmc_result(safety_checkert::UNSAFE), keep_goto_programs(
53
59
keep_goto_programs)
54
60
{
55
61
}
56
62
57
63
virtual ~cbmc_runnert ()=default ;
58
64
59
- virtual int get_goto_program (const optionst &options, bmct &bmc,
60
- goto_functionst &goto_functions)
65
+ virtual int get_goto_program (
66
+ const optionst &options,
67
+ bmct &bmc,
68
+ goto_functionst &goto_functions)
61
69
{
62
70
symbol_table.clear ();
63
71
symbol_table=st;
64
72
goto_functions.clear ();
65
73
goto_functions.copy_from (gf);
66
- if (process_goto_program (options, goto_functions)) return 6 ;
67
- if (keep_goto_programs)
74
+ if (process_goto_program (options, goto_functions)) return 6 ;
75
+ if (keep_goto_programs)
68
76
{
69
77
const std::string path (get_next_goto_file_name ());
70
78
message_handlert &msg=get_message_handler ();
71
79
write_goto_binary (path, symbol_table, goto_functions, msg);
72
80
}
81
+
73
82
return -1 ;
74
83
}
75
84
@@ -92,9 +101,11 @@ class cbmc_runnert: public cbmc_parse_optionst
92
101
};
93
102
}
94
103
95
- safety_checkert::resultt run_cbmc (const symbol_tablet &st,
96
- const goto_functionst &gf, cbmc_resultt &cbmc_result,
97
- const bool keep_goto_programs)
104
+ safety_checkert::resultt run_cbmc (
105
+ const symbol_tablet &st,
106
+ const goto_functionst &gf,
107
+ cbmc_resultt &cbmc_result,
108
+ const bool keep_goto_programs)
98
109
{
99
110
const temporary_output_blockt disable_output;
100
111
cbmc_runnert runner (st, gf, cbmc_result, keep_goto_programs);
@@ -105,9 +116,11 @@ safety_checkert::resultt run_cbmc(const symbol_tablet &st,
105
116
return runner.get_bmc_result ();
106
117
}
107
118
108
- safety_checkert::resultt run_cbmc (const symbol_tablet &st,
109
- const goto_functionst &gf, cbmc_resultt &cbmc_result,
110
- const optionst &o)
119
+ safety_checkert::resultt run_cbmc (
120
+ const symbol_tablet &st,
121
+ const goto_functionst &gf,
122
+ cbmc_resultt &cbmc_result,
123
+ const optionst &o)
111
124
{
112
125
return run_cbmc (st, gf, cbmc_result, o.get_bool_option (CEGIS_KEEP_GOTO_PROGRAMS));
113
126
}
0 commit comments