From 63f887783e003546bf8de4501774a79dbcf8d4b0 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 31 Mar 2020 14:27:04 -0500 Subject: [PATCH] Remove replay and use-theory options and idl (#4186) Towards disentangling Options / NodeManager / SmtEngine. This PR removes options --use-theory=NAME and --replay/--replay-log. Both of these options are highly complex, unused, and lead to complications when implementing the way options and our build system work. The first is motivated by making TheoryEngine use an "alternate" theory, which appears to e.g. make it so that TheoryIdl could entirely replace TheoryArith. I believe this is too heavy handed of a solution: there should a consistent TheoryArith class, and options should be used to enable/disable alternate modules within it. The second attempts to replay low level decisions from the SAT solver. It is documented as not working (in 1.0). I do not believe this is worth salvaging. It also removes the solver in src/theory/idl, which cannot be enabled after this commit. --- CMakeLists.txt | 6 - cmake/ConfigCompetition.cmake | 2 - cmake/ConfigDebug.cmake | 2 - cmake/ConfigProduction.cmake | 2 - cmake/ConfigTesting.cmake | 2 - configure.sh | 7 - src/CMakeLists.txt | 12 +- src/base/configuration.cpp | 4 - src/base/configuration.h | 2 - src/base/configuration_private.h | 6 - src/bindings/java/CMakeLists.txt | 1 - src/cvc4.i | 1 - src/expr/CMakeLists.txt | 1 - src/expr/expr_stream.h | 45 ----- src/expr/expr_stream.i | 5 - src/expr/metakind_template.h | 14 -- src/expr/mkmetakind | 16 -- src/main/command_executor.cpp | 9 +- src/main/command_executor.h | 7 - src/main/driver_unified.cpp | 29 --- src/options/CMakeLists.txt | 1 - src/options/idl_options.toml | 11 -- src/options/options.h | 33 ---- src/options/options_handler.cpp | 32 ---- src/options/options_handler.h | 6 - src/options/options_public_functions.cpp | 4 - src/options/options_template.cpp | 15 -- src/options/smt_options.toml | 21 --- src/options/theory_options.toml | 11 -- src/parser/cvc/Cvc.g | 2 - src/parser/parser.h | 55 ------ src/prop/minisat/core/Solver.cc | 13 -- src/prop/prop_engine.cpp | 20 +-- src/prop/prop_engine.h | 5 +- src/prop/theory_proxy.cpp | 35 +--- src/prop/theory_proxy.h | 20 +-- src/smt/managed_ostreams.cpp | 27 --- src/smt/managed_ostreams.h | 21 --- src/smt/smt_engine.cpp | 76 +------- src/smt/smt_engine.h | 11 -- src/theory/idl/idl_assertion.cpp | 213 ----------------------- src/theory/idl/idl_assertion.h | 91 ---------- src/theory/idl/idl_assertion_db.cpp | 59 ------- src/theory/idl/idl_assertion_db.h | 86 --------- src/theory/idl/idl_model.cpp | 74 -------- src/theory/idl/idl_model.h | 84 --------- src/theory/idl/kinds | 8 - src/theory/idl/theory_idl.cpp | 156 ----------------- src/theory/idl/theory_idl.h | 63 ------- src/theory/mktheorytraits | 6 - src/theory/theory_engine.cpp | 13 -- src/theory/theory_engine.h | 7 - 52 files changed, 13 insertions(+), 1439 deletions(-) delete mode 100644 src/expr/expr_stream.h delete mode 100644 src/expr/expr_stream.i delete mode 100644 src/options/idl_options.toml delete mode 100644 src/theory/idl/idl_assertion.cpp delete mode 100644 src/theory/idl/idl_assertion.h delete mode 100644 src/theory/idl/idl_assertion_db.cpp delete mode 100644 src/theory/idl/idl_assertion_db.h delete mode 100644 src/theory/idl/idl_model.cpp delete mode 100644 src/theory/idl/idl_model.h delete mode 100644 src/theory/idl/kinds delete mode 100644 src/theory/idl/theory_idl.cpp delete mode 100644 src/theory/idl/theory_idl.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 945f71d36..c535890e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,6 @@ cvc4_option(ENABLE_DEBUG_SYMBOLS "Enable debug symbols") cvc4_option(ENABLE_DUMPING "Enable dumping") cvc4_option(ENABLE_MUZZLE "Suppress ALL non-result output") cvc4_option(ENABLE_PROOFS "Enable proof support") -cvc4_option(ENABLE_REPLAY "Enable the replay feature") cvc4_option(ENABLE_STATISTICS "Enable statistics") cvc4_option(ENABLE_TRACING "Enable tracing") cvc4_option(ENABLE_UNIT_TESTING "Enable unit testing") @@ -429,10 +428,6 @@ if(ENABLE_PROOFS) add_definitions(-DCVC4_PROOF) endif() -if(ENABLE_REPLAY) - add_definitions(-DCVC4_REPLAY) -endif() - if(ENABLE_TRACING) add_definitions(-DCVC4_TRACING) endif() @@ -608,7 +603,6 @@ message("") print_config("Dumping :" ENABLE_DUMPING) print_config("Muzzle :" ENABLE_MUZZLE) print_config("Proofs :" ENABLE_PROOFS) -print_config("Replay :" ENABLE_REPLAY) print_config("Statistics :" ENABLE_STATISTICS) print_config("Tracing :" ENABLE_TRACING) message("") diff --git a/cmake/ConfigCompetition.cmake b/cmake/ConfigCompetition.cmake index 6bd846d0c..e18d2b2f1 100644 --- a/cmake/ConfigCompetition.cmake +++ b/cmake/ConfigCompetition.cmake @@ -8,8 +8,6 @@ set(OPTIMIZATION_LEVEL 9) cvc4_set_option(ENABLE_DEBUG_SYMBOLS OFF) # enable_statistics=no cvc4_set_option(ENABLE_STATISTICS OFF) -# enable_replay=no -cvc4_set_option(ENABLE_REPLAY OFF) # enable_assertions=no cvc4_set_option(ENABLE_ASSERTIONS OFF) # enable_proof=no diff --git a/cmake/ConfigDebug.cmake b/cmake/ConfigDebug.cmake index 31b142ffc..1ee78a602 100644 --- a/cmake/ConfigDebug.cmake +++ b/cmake/ConfigDebug.cmake @@ -7,8 +7,6 @@ add_c_cxx_flag("-Og") cvc4_set_option(ENABLE_DEBUG_SYMBOLS ON) # enable_statistics=yes cvc4_set_option(ENABLE_STATISTICS ON) -# enable_replay=yes -cvc4_set_option(ENABLE_REPLAY ON) # enable_assertions=yes cvc4_set_option(ENABLE_ASSERTIONS ON) # enable_proof=yes diff --git a/cmake/ConfigProduction.cmake b/cmake/ConfigProduction.cmake index 49e338abf..503f5d58f 100644 --- a/cmake/ConfigProduction.cmake +++ b/cmake/ConfigProduction.cmake @@ -4,8 +4,6 @@ set(OPTIMIZATION_LEVEL 3) cvc4_set_option(ENABLE_DEBUG_SYMBOLS OFF) # enable_statistics=yes cvc4_set_option(ENABLE_STATISTICS ON) -# enable_replay=no -cvc4_set_option(ENABLE_REPLAY OFF) # enable_assertions=no cvc4_set_option(ENABLE_ASSERTIONS OFF) # enable_proof=yes diff --git a/cmake/ConfigTesting.cmake b/cmake/ConfigTesting.cmake index 40366495d..cdc9e3af8 100644 --- a/cmake/ConfigTesting.cmake +++ b/cmake/ConfigTesting.cmake @@ -4,8 +4,6 @@ set(OPTIMIZATION_LEVEL 2) cvc4_set_option(ENABLE_DEBUG_SYMBOLS ON) # enable_statistics=yes cvc4_set_option(ENABLE_STATISTICS ON) -# enable_replay=yes -cvc4_set_option(ENABLE_REPLAY ON) # enable_assertions=yes cvc4_set_option(ENABLE_ASSERTIONS ON) # enable_proof=yes diff --git a/configure.sh b/configure.sh index ae9b275aa..bd95e38ed 100755 --- a/configure.sh +++ b/configure.sh @@ -34,7 +34,6 @@ The following flags enable optional features (disable with --no-