Skip to content

Commit 8b40620

Browse files
committed
split up goto_check
goto_check inserts assertions that check for suspect bugs in both C/C++ and Java programs. The criteria differ vastly given that Java has basically no instances of undefined behavior. This commit splits the file, separating it into a checker for C/C++ and one for Java. The long-term plan is to move these checkers into the directory of the corresponding language frontend.
1 parent d42839d commit 8b40620

16 files changed

+5162
-2497
lines changed

jbmc/src/janalyzer/janalyzer_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Author: Daniel Kroening, [email protected]
108108
#include <goto-programs/show_goto_functions.h>
109109
#include <goto-programs/show_properties.h>
110110

111-
#include <analyses/goto_check.h>
111+
#include <analyses/goto_check_c.h>
112112

113113
#include <java_bytecode/java_bytecode_language.h>
114114

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ void jbmc_parse_optionst::process_goto_function(
811811
}
812812

813813
// add generic checks
814-
goto_check(
814+
goto_check_java(
815815
function.get_function_id(),
816816
function.get_goto_function(),
817817
ns,

jbmc/src/jbmc/jbmc_parse_options.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Author: Daniel Kroening, [email protected]
1919

2020
#include <langapi/language.h>
2121

22-
#include <analyses/goto_check.h>
22+
#include <analyses/goto_check_c.h>
23+
#include <analyses/goto_check_java.h>
2324

2425
#include <goto-checker/bmc_util.h>
2526

jbmc/src/jdiff/jdiff_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ bool jdiff_parse_optionst::process_goto_program(
278278

279279
// add generic checks
280280
log.status() << "Generic Property Instrumentation" << messaget::eom;
281-
goto_check(options, goto_model, ui_message_handler);
281+
goto_check_java(options, goto_model, ui_message_handler);
282282

283283
// checks don't know about adjusted float expressions
284284
adjust_float_expressions(goto_model);

jbmc/src/jdiff/jdiff_parse_options.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Author: Peter Schrammel
1212
#ifndef CPROVER_JDIFF_JDIFF_PARSE_OPTIONS_H
1313
#define CPROVER_JDIFF_JDIFF_PARSE_OPTIONS_H
1414

15-
#include <analyses/goto_check.h>
15+
#include <analyses/goto_check_c.h>
16+
#include <analyses/goto_check_java.h>
1617

1718
#include <util/parse_options.h>
1819
#include <util/timestamper.h>

src/analyses/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ SRC = ai.cpp \
1313
flow_insensitive_analysis.cpp \
1414
global_may_alias.cpp \
1515
goto_check.cpp \
16+
goto_check_c.cpp \
17+
goto_check_java.cpp \
1618
goto_rw.cpp \
1719
guard_bdd.cpp \
1820
guard_expr.cpp \

0 commit comments

Comments
 (0)