Skip to content

Move cbmc_solvers as solver_factory to new goto-checker module [blocks: 3564, 3565] #3557

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 2 commits into from
Dec 17, 2018
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: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set_target_properties(
goto-analyzer-lib
goto-cc
goto-cc-lib
goto-checker
goto-diff
goto-diff-lib
goto-instrument
Expand Down
1 change: 1 addition & 0 deletions jbmc/src/jbmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target_link_libraries(jbmc-lib
ansi-c
big-int
cbmc-lib
goto-checker
goto-instrument-lib
goto-programs
goto-symex
Expand Down
2 changes: 1 addition & 1 deletion jbmc/src/jbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ OBJ += ../$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
../java_bytecode/java_bytecode$(LIBEXT) \
../$(CPROVER_DIR)/src/linking/linking$(LIBEXT) \
../$(CPROVER_DIR)/src/big-int/big-int$(LIBEXT) \
../$(CPROVER_DIR)/src/goto-checker/goto-checker$(LIBEXT) \
../$(CPROVER_DIR)/src/goto-programs/goto-programs$(LIBEXT) \
../$(CPROVER_DIR)/src/goto-symex/goto-symex$(LIBEXT) \
../$(CPROVER_DIR)/src/pointer-analysis/value_set$(OBJEXT) \
Expand Down Expand Up @@ -40,7 +41,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/cbmc_solvers$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/counterexample_beautification$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/fault_localization$(OBJEXT) \
../$(CPROVER_DIR)/src/cbmc/symex_bmc$(OBJEXT) \
Expand Down
3 changes: 2 additions & 1 deletion jbmc/src/jbmc/module_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
analyses
ansi-c # should go away
cbmc # bmc.h
cbmc # bmc.h - will go away
goto-checker
goto-instrument
goto-programs
goto-symex
Expand Down
2 changes: 2 additions & 0 deletions jbmc/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ target_link_libraries(java-unit
testing-utils
ansi-c
solvers
goto-checker
goto-programs
goto-symex
goto-instrument-lib
cbmc-lib
json-symtab-language
Expand Down
2 changes: 1 addition & 1 deletion jbmc/unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ BMC_DEPS =$(CPROVER_DIR)/src/cbmc/all_properties$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/bmc_cover$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/cbmc_languages$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/cbmc_parse_options$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/cbmc_solvers$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/counterexample_beautification$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/fault_localization$(OBJEXT) \
$(CPROVER_DIR)/src/cbmc/symex_bmc$(OBJEXT) \
Expand Down Expand Up @@ -114,6 +113,7 @@ CPROVER_LIBS =../src/java_bytecode/java_bytecode$(LIBEXT) \
$(CPROVER_DIR)/src/linking/linking$(LIBEXT) \
$(CPROVER_DIR)/src/util/util$(LIBEXT) \
$(CPROVER_DIR)/src/big-int/big-int$(LIBEXT) \
$(CPROVER_DIR)/src/goto-checker/goto-checker$(LIBEXT) \
$(CPROVER_DIR)/src/goto-programs/goto-programs$(LIBEXT) \
$(CPROVER_DIR)/src/goto-symex/goto-symex$(LIBEXT) \
$(CPROVER_DIR)/src/goto-instrument/cover$(OBJEXT) \
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ add_subdirectory(ansi-c)
add_subdirectory(assembler)
add_subdirectory(big-int)
add_subdirectory(cpp)
add_subdirectory(goto-checker)
add_subdirectory(goto-programs)
add_subdirectory(goto-symex)
add_subdirectory(jsil)
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DIRS = analyses \
cpp \
goto-analyzer \
goto-cc \
goto-checker \
goto-diff \
goto-instrument \
goto-programs \
Expand Down Expand Up @@ -49,9 +50,11 @@ solvers.dir: util.dir langapi.dir
goto-instrument.dir: languages goto-programs.dir pointer-analysis.dir \
goto-symex.dir linking.dir analyses.dir solvers.dir

goto-checker.dir: solvers.dir goto-symex.dir goto-programs.dir

cbmc.dir: languages solvers.dir goto-symex.dir analyses.dir \
pointer-analysis.dir goto-programs.dir linking.dir \
goto-instrument.dir
goto-instrument.dir goto-checker.dir

goto-analyzer.dir: languages analyses.dir goto-programs.dir linking.dir \
goto-instrument.dir
Expand Down
1 change: 1 addition & 0 deletions src/cbmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ target_link_libraries(cbmc-lib
assembler
big-int
cpp
goto-checker
goto-instrument-lib
goto-programs
goto-symex
Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SRC = all_properties.cpp \
cbmc_languages.cpp \
cbmc_main.cpp \
cbmc_parse_options.cpp \
cbmc_solvers.cpp \
counterexample_beautification.cpp \
fault_localization.cpp \
symex_bmc.cpp \
Expand All @@ -18,6 +17,7 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
../json-symtab-language/json-symtab-language$(LIBEXT) \
../linking/linking$(LIBEXT) \
../big-int/big-int$(LIBEXT) \
../goto-checker/goto-checker$(LIBEXT) \
../goto-programs/goto-programs$(LIBEXT) \
../goto-symex/goto-symex$(LIBEXT) \
../pointer-analysis/value_set$(OBJEXT) \
Expand Down
15 changes: 8 additions & 7 deletions src/cbmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Author: Daniel Kroening, [email protected]

#include <linking/static_lifetime_init.h>

#include "cbmc_solvers.h"
#include <goto-checker/solver_factory.h>

#include "counterexample_beautification.h"
#include "fault_localization.h"

Expand Down Expand Up @@ -519,13 +520,13 @@ int bmct::do_language_agnostic_bmc(
try
{
{
cbmc_solverst solvers(
solver_factoryt solvers(
opts,
symbol_table,
ui,
ui.get_ui() == ui_message_handlert::uit::XML_UI);
std::unique_ptr<cbmc_solverst::solvert> cbmc_solver;
cbmc_solver = solvers.get_solver();
std::unique_ptr<solver_factoryt::solvert> cbmc_solver =
solvers.get_solver();
prop_convt &pc = cbmc_solver->prop_conv();
bmct bmc(opts, symbol_table, ui, pc, *worklist, callback_after_symex);
if(driver_configure_bmc)
Expand Down Expand Up @@ -566,13 +567,13 @@ int bmct::do_language_agnostic_bmc(

while(!worklist->empty())
{
cbmc_solverst solvers(
solver_factoryt solvers(
opts,
symbol_table,
ui,
ui.get_ui() == ui_message_handlert::uit::XML_UI);
std::unique_ptr<cbmc_solverst::solvert> cbmc_solver;
cbmc_solver = solvers.get_solver();
std::unique_ptr<solver_factoryt::solvert> cbmc_solver =
solvers.get_solver();
prop_convt &pc = cbmc_solver->prop_conv();
path_storaget::patht &resume = worklist->peek();
path_explorert pe(
Expand Down
3 changes: 2 additions & 1 deletion src/cbmc/cbmc_parse_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ Author: Daniel Kroening, [email protected]

#include <analyses/goto_check.h>

#include <goto-checker/solver_factory.h>

#include <goto-programs/goto_trace.h>

#include <solvers/refinement/string_refinement.h>

#include "bmc.h"
#include "xml_interface.h"
#include "cbmc_solvers.h"

class bmct;
class goto_functionst;
Expand Down
1 change: 1 addition & 0 deletions src/cbmc/module_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
analyses
ansi-c
cpp
goto-checker
goto-instrument
goto-programs
goto-symex
Expand Down
6 changes: 6 additions & 0 deletions src/goto-checker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
file(GLOB_RECURSE sources "*.cpp" "*.h")
add_library(goto-checker ${sources})

generic_includes(goto-checker)

target_link_libraries(goto-checker goto-programs goto-symex solvers util)
16 changes: 16 additions & 0 deletions src/goto-checker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SRC = solver_factory.cpp \
# Empty last line

INCLUDES= -I ..

include ../config.inc
include ../common

CLEANFILES = goto-checker$(LIBEXT)

all: goto-checker$(LIBEXT)

###############################################################################

goto-checker$(LIBEXT): $(OBJ)
$(LINKLIB)
5 changes: 5 additions & 0 deletions src/goto-checker/module_dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
goto-checker
goto-programs
goto-symex
solvers
util
Loading