Skip to content

Commit e4d26e0

Browse files
authored
Merge pull request #6716 from tautschnig/cleanup/goto_check_c
Replace the goto_check indirection by direct use of goto_check_c [blocks: #6688]
2 parents fdeb573 + 64aeff2 commit e4d26e0

File tree

5 files changed

+8
-60
lines changed

5 files changed

+8
-60
lines changed

src/goto-instrument/accelerate/acceleration_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ void acceleration_utilst::ensure_no_overflows(scratch_programt &program)
475475

476476
// goto_functionst::goto_functiont fn;
477477
// fn.body.instructions.swap(program.instructions);
478-
// goto_check(ns, checker_options, fn);
478+
// goto_check_c(ns, checker_options, fn);
479479
// fn.body.instructions.swap(program.instructions);
480480

481481
#ifdef DEBUG

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ void goto_instrument_parse_optionst::instrument_goto_program()
13371337
}
13381338

13391339
// add generic checks, if needed
1340-
goto_check(options, goto_model, ui_message_handler);
1340+
goto_check_c(options, goto_model, ui_message_handler);
13411341
transform_assertions_assumptions(options, goto_model);
13421342

13431343
// check for uninitalized local variables

src/goto-programs/goto_check.cpp

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,9 @@ Author: Daniel Kroening, [email protected]
1212
#include "goto_check.h"
1313

1414
#include <util/options.h>
15-
#include <util/symbol.h>
1615

17-
#include <goto-programs/goto_model.h>
18-
#include <goto-programs/remove_skip.h>
19-
20-
#include <ansi-c/goto_check_c.h>
21-
22-
void goto_check(
23-
const irep_idt &function_identifier,
24-
goto_functionst::goto_functiont &goto_function,
25-
const namespacet &ns,
26-
const optionst &options,
27-
message_handlert &message_handler)
28-
{
29-
const auto &function_symbol = ns.lookup(function_identifier);
30-
31-
if(function_symbol.mode == ID_C)
32-
{
33-
goto_check_c(
34-
function_identifier, goto_function, ns, options, message_handler);
35-
}
36-
}
37-
38-
void goto_check(
39-
const namespacet &ns,
40-
const optionst &options,
41-
goto_functionst &goto_functions,
42-
message_handlert &message_handler)
43-
{
44-
goto_check_c(ns, options, goto_functions, message_handler);
45-
}
46-
47-
void goto_check(
48-
const optionst &options,
49-
goto_modelt &goto_model,
50-
message_handlert &message_handler)
51-
{
52-
goto_check_c(options, goto_model, message_handler);
53-
}
16+
#include "goto_model.h"
17+
#include "remove_skip.h"
5418

5519
static void transform_assertions_assumptions(
5620
goto_programt &goto_program,

src/goto-programs/goto_check.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,9 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_GOTO_PROGRAMS_GOTO_CHECK_H
1313
#define CPROVER_GOTO_PROGRAMS_GOTO_CHECK_H
1414

15-
#include "goto_functions.h"
16-
1715
class goto_modelt;
18-
class namespacet;
16+
class goto_programt;
1917
class optionst;
20-
class message_handlert;
21-
22-
void goto_check(
23-
const namespacet &,
24-
const optionst &,
25-
goto_functionst &,
26-
message_handlert &);
27-
28-
void goto_check(
29-
const irep_idt &function_identifier,
30-
goto_functionst::goto_functiont &,
31-
const namespacet &,
32-
const optionst &,
33-
message_handlert &);
34-
35-
void goto_check(const optionst &, goto_modelt &, message_handlert &);
3618

3719
/// Handle the options "assertions", "built-in-assertions", "assumptions" to
3820
/// remove assertions and assumptions in \p goto_model when these are set to

src/goto-programs/process_goto_program.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Author: Martin Brain, [email protected]
2727
#include <goto-programs/string_abstraction.h>
2828
#include <goto-programs/string_instrumentation.h>
2929

30+
#include <ansi-c/goto_check_c.h>
31+
3032
#include "goto_check.h"
3133

3234
bool process_goto_program(
@@ -73,7 +75,7 @@ bool process_goto_program(
7375

7476
// add generic checks
7577
log.status() << "Generic Property Instrumentation" << messaget::eom;
76-
goto_check(options, goto_model, log.get_message_handler());
78+
goto_check_c(options, goto_model, log.get_message_handler());
7779
transform_assertions_assumptions(options, goto_model);
7880

7981
// checks don't know about adjusted float expressions

0 commit comments

Comments
 (0)