From b8d09076cfeb124bfaa6e1c3f0f37e3df1b1b516 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Wed, 16 Jun 2021 14:04:09 -0700 Subject: [PATCH] Make symfpu a required dependency. (#6749) --- CMakeLists.txt | 10 +- INSTALL.md | 6 +- NEWS | 1 + configure.sh | 7 - examples/api/java/FloatingPointArith.java | 7 - examples/api/python/floating_point.py | 6 - src/CMakeLists.txt | 5 +- src/api/cpp/cvc5.cpp | 30 --- src/api/cpp/cvc5.h | 6 - src/api/python/cvc5.pxd | 1 - src/api/python/cvc5.pxi | 3 - src/base/configuration.cpp | 13 +- src/base/configuration.h | 2 - src/base/configuration_private.h | 6 - src/options/options_handler.cpp | 1 - src/theory/fp/fp_converter.cpp | 33 ---- src/theory/fp/fp_converter.h | 10 - src/theory/fp/theory_fp.cpp | 2 +- src/theory/fp/theory_fp_rewriter.cpp | 14 -- src/theory/fp/theory_fp_type_rules.cpp | 8 - src/theory/logic_info.cpp | 4 - src/util/CMakeLists.txt | 3 - src/util/floatingpoint_literal_symfpu.cpp | 185 ------------------ ...pu.h.in => floatingpoint_literal_symfpu.h} | 38 +--- .../floatingpoint_literal_symfpu_traits.cpp | 3 - ... => floatingpoint_literal_symfpu_traits.h} | 9 +- test/api/issue4889.cpp | 2 - test/python/unit/api/test_solver.py | 82 ++------ test/python/unit/api/test_sort.py | 32 ++- test/regress/README.md | 8 +- test/regress/regress0/fp/abs-unsound.smt2 | 1 - test/regress/regress0/fp/abs-unsound2.smt2 | 1 - test/regress/regress0/fp/down-cast-RNA.smt2 | 1 - test/regress/regress0/fp/ext-rew-test.smt2 | 1 - test/regress/regress0/fp/from_sbv.smt2 | 1 - test/regress/regress0/fp/from_ubv.smt2 | 1 - test/regress/regress0/fp/issue-5524.smt2 | 1 - test/regress/regress0/fp/issue3536.smt2 | 1 - test/regress/regress0/fp/issue3582.smt2 | 1 - test/regress/regress0/fp/issue3619.smt2 | 1 - .../regress0/fp/issue4277-assign-func.smt2 | 1 - test/regress/regress0/fp/issue5511.smt2 | 1 - test/regress/regress0/fp/issue5734.smt2 | 1 - test/regress/regress0/fp/issue6164.smt2 | 1 - test/regress/regress0/fp/rti_3_5_bug.smt2 | 1 - test/regress/regress0/fp/simple.smt2 | 1 - test/regress/regress0/fp/wrong-model.smt2 | 1 - test/regress/regress0/issue5370.smt2 | 1 - test/regress/regress0/parser/to_fp.smt2 | 1 - .../regress1/fp/rti_3_5_bug_report.smt2 | 1 - .../regress1/quantifiers/fp-cegqi-unsat.smt2 | 1 - .../issue4420-order-sensitive.smt2 | 1 - test/regress/regress1/rr-verify/fp-arith.sy | 1 - test/regress/regress1/rr-verify/fp-bool.sy | 1 - .../temp_input_to_synth_ic-error-121418.sy | 1 - .../regress1/wrong-qfabvfp-smtcomp2018.smt2 | 1 - test/regress/regress2/sygus/min_IC_1.sy | 1 - test/unit/api/solver_black.cpp | 115 ++--------- test/unit/api/sort_black.cpp | 36 ++-- test/unit/theory/logic_info_white.cpp | 27 +-- test/unit/util/CMakeLists.txt | 2 - 61 files changed, 86 insertions(+), 658 deletions(-) rename src/util/{floatingpoint_literal_symfpu.h.in => floatingpoint_literal_symfpu.h} (92%) rename src/util/{floatingpoint_literal_symfpu_traits.h.in => floatingpoint_literal_symfpu_traits.h} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b555c7bdc..b29585f3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,7 +128,6 @@ cvc5_option(USE_EDITLINE "Use Editline for better interactive support") # > for options where we don't need to detect if set by user (default: OFF) option(USE_POLY "Use LibPoly for polynomial arithmetic") option(USE_COCOA "Use CoCoALib for further polynomial operations") -option(USE_SYMFPU "Use SymFPU for floating point support") option(USE_PYTHON2 "Force Python 2 (deprecated)") # Custom install directories for dependencies @@ -476,13 +475,7 @@ if(USE_EDITLINE) endif() endif() -if(USE_SYMFPU) - find_package(SymFPU REQUIRED) - add_definitions(-DCVC5_USE_SYMFPU) - set(CVC5_USE_SYMFPU 1) -else() - set(CVC5_USE_SYMFPU 0) -endif() +find_package(SymFPU REQUIRED) if(GPL_LIBS) if(NOT ENABLE_GPL) @@ -673,7 +666,6 @@ else() print_config("MP library " "gmp") endif() print_config("Editline " ${USE_EDITLINE}) -print_config("SymFPU " ${USE_SYMFPU}) message("") print_config("Api docs " ${BUILD_DOCS}) message("") diff --git a/INSTALL.md b/INSTALL.md index 41f770288..1a9c03476 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -57,6 +57,7 @@ minimum versions; more recent versions should be compatible. - [GMP v6.1 (GNU Multi-Precision arithmetic library)](https://gmplib.org) - [ANTLR 3.4](http://www.antlr3.org/) - [Java >= 1.6](https://www.java.com) +- [SymFPU](https://github.com/martin-cs/symfpu/tree/CVC4) ### ANTLR 3.4 parser generator @@ -74,8 +75,6 @@ cross-compile, or you want to build cvc5 statically but the distribution does not ship static libraries, cvc5 builds GMP automatically when `--auto-download` is given. -## Optional Dependencies - ### SymFPU (Support for the Theory of Floating Point Numbers) [SymFPU](https://github.com/martin-cs/symfpu/tree/CVC4) @@ -83,7 +82,8 @@ is an implementation of SMT-LIB/IEEE-754 floating-point operations in terms of bit-vector operations. It is required for supporting the theory of floating-point numbers and can be downloaded and built automatically. -Configure cvc5 with `configure.sh --symfpu` to build with this dependency. + +## Optional Dependencies ### CaDiCaL (Optional SAT solver) diff --git a/NEWS b/NEWS index 60a70a6c5..1943d7f00 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ Changes since CVC4 1.8 ====================== New Features: +* SymFPU is now a required dependency. * New unsat-core production modes based on the new proof infrastructure (`--unsat-cores-mode=sat-proof`) and on the solving-under-assumption feature of Minisat (`--unsat-cores-mode=assumptions`). The mode based on SAT diff --git a/configure.sh b/configure.sh index 487bbcb5a..25203f8a6 100755 --- a/configure.sh +++ b/configure.sh @@ -64,7 +64,6 @@ The following flags enable optional packages (disable with --no-