Skip to content

Remove obsolete cbmc/fault_localization [blocks: 4216] #4215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion jbmc/src/jbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ OBJ += ../$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
../$(CPROVER_DIR)/src/cbmc/all_properties$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/bmc$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/bmc_cover$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/fault_localization$(OBJEXT) \
# Empty last line

INCLUDES= -I .. -I ../$(CPROVER_DIR)/src
Expand Down
99 changes: 47 additions & 52 deletions jbmc/src/jbmc/jbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,73 +596,68 @@ int jbmc_parse_optionst::doit()
std::unique_ptr<goto_verifiert> verifier = nullptr;

if(
!options.is_set("cover") && !options.get_bool_option("dimacs") &&
options.get_option("outfile").empty())
options.get_bool_option("stop-on-fail") &&
options.get_bool_option("paths"))
{
if(options.get_bool_option("stop-on-fail"))
verifier = util_make_unique<
stop_on_fail_verifiert<java_single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else if(
options.get_bool_option("stop-on-fail") &&
!options.get_bool_option("paths"))
{
if(options.get_bool_option("localize-faults"))
{
if(options.get_bool_option("paths"))
{
verifier = util_make_unique<
stop_on_fail_verifiert<java_single_path_symex_checkert>>(
verifier =
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
verifier = util_make_unique<
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
}
else
{
if(options.get_bool_option("paths"))
{
verifier =
util_make_unique<all_properties_verifier_with_trace_storaget<
java_single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<all_properties_verifier_with_fault_localizationt<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
verifier =
util_make_unique<all_properties_verifier_with_trace_storaget<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
verifier = util_make_unique<
stop_on_fail_verifiert<java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}

// fall back until everything has been ported to goto-checker
if(verifier == nullptr)
else if(
!options.get_bool_option("stop-on-fail") &&
options.get_bool_option("paths"))
{
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
java_single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else if(
!options.get_bool_option("stop-on-fail") &&
!options.get_bool_option("paths"))
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<all_properties_verifier_with_fault_localizationt<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
java_multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
else
{
// fall back until everything has been ported to goto-checker

// The `configure_bmc` callback passed will enable enum-unwind-static if
// applicable.
return bmct::do_language_agnostic_bmc(
options, goto_model, ui_message_handler, configure_bmc);
}

resultt result = (*verifier)();
const resultt result = (*verifier)();
verifier->report();
return result_to_exit_code(result);
}
Expand Down
19 changes: 0 additions & 19 deletions jbmc/unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,6 @@ java-testing-utils/java-testing-utils$(LIBEXT): jprover.dir
java-testing-utils-clean:
$(MAKE) $(MAKEARGS) -C java-testing-utils clean

# We need to link bmc.o to the unit test, so here's everything it depends on...
BMC_DEPS =$(CPROVER_DIR)/src/cbmc/all_properties$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/bmc$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/bmc_cover$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/fault_localization$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/expr2jsil$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_convert$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_entry_point$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_internal_additions$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_language$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_lex.yy$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_parser$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_parse_tree$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_typecheck$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_types$(OBJEXT) \
$(CPROVER_DIR)/src/jsil/jsil_y.tab$(OBJEXT) \
# Empty last line

CPROVER_LIBS =../src/java_bytecode/java_bytecode$(LIBEXT) \
../src/miniz/miniz$(OBJEXT) \
$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
Expand Down Expand Up @@ -133,7 +115,6 @@ CPROVER_LIBS =../src/java_bytecode/java_bytecode$(LIBEXT) \
$(CPROVER_DIR)/src/assembler/assembler$(LIBEXT) \
$(CPROVER_DIR)/src/analyses/analyses$(LIBEXT) \
$(CPROVER_DIR)/src/solvers/solvers$(LIBEXT) \
$(BMC_DEPS) \
# Empty last line

OBJ += $(CPROVER_LIBS) \
Expand Down
1 change: 0 additions & 1 deletion src/cbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SRC = all_properties.cpp \
cbmc_languages.cpp \
cbmc_main.cpp \
cbmc_parse_options.cpp \
fault_localization.cpp \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can those Makefile changes please be in the same commit as the actual removal of the file?

xml_interface.cpp \
# Empty last line

Expand Down
9 changes: 0 additions & 9 deletions src/cbmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Author: Daniel Kroening, [email protected]
#include <goto-checker/report_util.h>
#include <goto-checker/solver_factory.h>

#include "fault_localization.h"

/// Hook used by CEGIS to selectively freeze variables
/// in the SAT solver after the SSA formula is added to the solver.
/// Freezing variables is necessary to make use of incremental
Expand Down Expand Up @@ -139,13 +137,6 @@ safety_checkert::resultt bmct::execute(
safety_checkert::resultt::ERROR:safety_checkert::resultt::SAFE;
}

if(options.get_option("localize-faults")!="")
{
fault_localizationt fault_localization(
goto_functions, *this, options);
return fault_localization();
}

// any properties to check at all?
if(
!options.get_bool_option("program-only") &&
Expand Down
1 change: 0 additions & 1 deletion src/cbmc/bmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ class bmct:public safety_checkert
friend class bmc_covert;
template <template <class goalt> class covert>
friend class bmc_goal_covert;
friend class fault_localizationt;

private:
/// \brief Class-specific symbolic execution
Expand Down
97 changes: 44 additions & 53 deletions src/cbmc/cbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,69 +608,60 @@ int cbmc_parse_optionst::doit()
std::unique_ptr<goto_verifiert> verifier = nullptr;

if(
!options.is_set("cover") && !options.get_bool_option("dimacs") &&
options.get_option("outfile").empty())
options.get_bool_option("stop-on-fail") && options.get_bool_option("paths"))
{
if(options.get_bool_option("stop-on-fail"))
verifier =
util_make_unique<stop_on_fail_verifiert<single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else if(
options.get_bool_option("stop-on-fail") &&
!options.get_bool_option("paths"))
{
if(options.get_bool_option("localize-faults"))
{
if(options.get_bool_option("paths"))
{
verifier =
util_make_unique<stop_on_fail_verifiert<single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
verifier =
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
verifier =
util_make_unique<stop_on_fail_verifier_with_fault_localizationt<
multi_path_symex_checkert>>(options, ui_message_handler, goto_model);
}
else
{
if(options.get_bool_option("paths"))
{
verifier = util_make_unique<all_properties_verifier_with_trace_storaget<
single_path_symex_checkert>>(options, ui_message_handler, goto_model);
}
else
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<all_properties_verifier_with_fault_localizationt<
multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else
{
verifier =
util_make_unique<all_properties_verifier_with_trace_storaget<
multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
verifier =
util_make_unique<stop_on_fail_verifiert<multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}

// fall back until everything has been ported to goto-checker
if(verifier == nullptr)
else if(
!options.get_bool_option("stop-on-fail") &&
options.get_bool_option("paths"))
{
verifier = util_make_unique<
all_properties_verifier_with_trace_storaget<single_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
else if(
!options.get_bool_option("stop-on-fail") &&
!options.get_bool_option("paths"))
{
if(options.get_bool_option("localize-faults"))
{
verifier =
util_make_unique<all_properties_verifier_with_fault_localizationt<
multi_path_symex_checkert>>(options, ui_message_handler, goto_model);
}
else
{
verifier = util_make_unique<
all_properties_verifier_with_trace_storaget<multi_path_symex_checkert>>(
options, ui_message_handler, goto_model);
}
}
else
{
return bmct::do_language_agnostic_bmc(
options, goto_model, ui_message_handler);
UNREACHABLE;
}

resultt result = (*verifier)();
const resultt result = (*verifier)();
verifier->report();

return result_to_exit_code(result);
Expand Down
Loading