diff --git a/jbmc/src/jbmc/Makefile b/jbmc/src/jbmc/Makefile index d432f0c26bf..eaf884db60e 100644 --- a/jbmc/src/jbmc/Makefile +++ b/jbmc/src/jbmc/Makefile @@ -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 diff --git a/jbmc/src/jbmc/jbmc_parse_options.cpp b/jbmc/src/jbmc/jbmc_parse_options.cpp index 03d24c1ae65..a50627f88f3 100644 --- a/jbmc/src/jbmc/jbmc_parse_options.cpp +++ b/jbmc/src/jbmc/jbmc_parse_options.cpp @@ -596,73 +596,68 @@ int jbmc_parse_optionst::doit() std::unique_ptr 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>( + 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>( + verifier = + util_make_unique>( options, ui_message_handler, goto_model); - } - else - { - if(options.get_bool_option("localize-faults")) - { - verifier = - util_make_unique>( - options, ui_message_handler, goto_model); - } - else - { - verifier = util_make_unique< - stop_on_fail_verifiert>( - options, ui_message_handler, goto_model); - } - } } else { - if(options.get_bool_option("paths")) - { - verifier = - util_make_unique>( - options, ui_message_handler, goto_model); - } - else - { - if(options.get_bool_option("localize-faults")) - { - verifier = - util_make_unique>( - options, ui_message_handler, goto_model); - } - else - { - verifier = - util_make_unique>( - options, ui_message_handler, goto_model); - } - } + verifier = util_make_unique< + stop_on_fail_verifiert>( + 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>( + 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>( + options, ui_message_handler, goto_model); + } + else + { + verifier = util_make_unique>( + 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); } diff --git a/jbmc/unit/Makefile b/jbmc/unit/Makefile index a9d0d5ad840..ea5becad254 100644 --- a/jbmc/unit/Makefile +++ b/jbmc/unit/Makefile @@ -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) \ @@ -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) \ diff --git a/src/cbmc/Makefile b/src/cbmc/Makefile index a8030dbe428..d3ad7b6f9bd 100644 --- a/src/cbmc/Makefile +++ b/src/cbmc/Makefile @@ -5,7 +5,6 @@ SRC = all_properties.cpp \ cbmc_languages.cpp \ cbmc_main.cpp \ cbmc_parse_options.cpp \ - fault_localization.cpp \ xml_interface.cpp \ # Empty last line diff --git a/src/cbmc/bmc.cpp b/src/cbmc/bmc.cpp index 8794b1d6aa5..bf2129d367b 100644 --- a/src/cbmc/bmc.cpp +++ b/src/cbmc/bmc.cpp @@ -29,8 +29,6 @@ Author: Daniel Kroening, kroening@kroening.com #include #include -#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 @@ -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") && diff --git a/src/cbmc/bmc.h b/src/cbmc/bmc.h index 0015389d894..f92f2ff86c3 100644 --- a/src/cbmc/bmc.h +++ b/src/cbmc/bmc.h @@ -197,7 +197,6 @@ class bmct:public safety_checkert friend class bmc_covert; template