Skip to content

Commit 48af472

Browse files
authored
Merge pull request #5593 from tautschnig/messaget-string_instrumentationt
string_instrumentationt isn't messaget
2 parents bca8cad + c900bcf commit 48af472

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ bool cbmc_parse_optionst::process_goto_program(
894894
add_malloc_may_fail_variable_initializations(goto_model);
895895

896896
if(options.get_bool_option("string-abstraction"))
897-
string_instrumentation(goto_model, log.get_message_handler());
897+
string_instrumentation(goto_model);
898898

899899
// remove function pointers
900900
log.status() << "Removal of function pointers and virtual functions"

src/goto-programs/string_instrumentation.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Author: Daniel Kroening, [email protected]
1717
#include <util/c_types.h>
1818
#include <util/config.h>
1919
#include <util/invariant.h>
20-
#include <util/message.h>
2120
#include <util/std_code.h>
2221
#include <util/std_expr.h>
2322
#include <util/string_constant.h>
@@ -52,15 +51,11 @@ exprt buffer_size(const exprt &what)
5251
return result;
5352
}
5453

55-
class string_instrumentationt:public messaget
54+
class string_instrumentationt
5655
{
5756
public:
58-
string_instrumentationt(
59-
symbol_tablet &_symbol_table,
60-
message_handlert &_message_handler):
61-
messaget(_message_handler),
62-
symbol_table(_symbol_table),
63-
ns(_symbol_table)
57+
explicit string_instrumentationt(symbol_tablet &_symbol_table)
58+
: symbol_table(_symbol_table), ns(_symbol_table)
6459
{
6560
}
6661

@@ -156,29 +151,24 @@ class string_instrumentationt:public messaget
156151

157152
void string_instrumentation(
158153
symbol_tablet &symbol_table,
159-
message_handlert &message_handler,
160154
goto_programt &dest)
161155
{
162-
string_instrumentationt string_instrumentation(symbol_table, message_handler);
156+
string_instrumentationt string_instrumentation{symbol_table};
163157
string_instrumentation(dest);
164158
}
165159

166160
void string_instrumentation(
167161
symbol_tablet &symbol_table,
168-
message_handlert &message_handler,
169162
goto_functionst &dest)
170163
{
171-
string_instrumentationt string_instrumentation(symbol_table, message_handler);
164+
string_instrumentationt string_instrumentation{symbol_table};
172165
string_instrumentation(dest);
173166
}
174167

175-
void string_instrumentation(
176-
goto_modelt &goto_model,
177-
message_handlert &message_handler)
168+
void string_instrumentation(goto_modelt &goto_model)
178169
{
179170
string_instrumentation(
180171
goto_model.symbol_table,
181-
message_handler,
182172
goto_model.goto_functions);
183173
}
184174

src/goto-programs/string_instrumentation.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Author: Daniel Kroening, [email protected]
1616

1717
#include <util/exception_utils.h>
1818

19-
class message_handlert;
2019
class goto_modelt;
2120

2221
class incorrect_source_program_exceptiont : public cprover_exception_baset
@@ -40,17 +39,13 @@ class incorrect_source_program_exceptiont : public cprover_exception_baset
4039

4140
void string_instrumentation(
4241
symbol_tablet &,
43-
message_handlert &,
4442
goto_programt &);
4543

4644
void string_instrumentation(
4745
symbol_tablet &,
48-
message_handlert &,
4946
goto_functionst &);
5047

51-
void string_instrumentation(
52-
goto_modelt &,
53-
message_handlert &);
48+
void string_instrumentation(goto_modelt &);
5449

5550
predicate_exprt is_zero_string(const exprt &what, bool write = false);
5651
exprt zero_string_length(const exprt &what, bool write=false);

0 commit comments

Comments
 (0)