Make symfpu a required dependency. (#6749)
authorAina Niemetz <aina.niemetz@gmail.com>
Wed, 16 Jun 2021 21:04:09 +0000 (14:04 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Jun 2021 21:04:09 +0000 (21:04 +0000)
63 files changed:
CMakeLists.txt
INSTALL.md
NEWS
configure.sh
examples/api/java/FloatingPointArith.java
examples/api/python/floating_point.py
src/CMakeLists.txt
src/api/cpp/cvc5.cpp
src/api/cpp/cvc5.h
src/api/python/cvc5.pxd
src/api/python/cvc5.pxi
src/base/configuration.cpp
src/base/configuration.h
src/base/configuration_private.h
src/options/options_handler.cpp
src/theory/fp/fp_converter.cpp
src/theory/fp/fp_converter.h
src/theory/fp/theory_fp.cpp
src/theory/fp/theory_fp_rewriter.cpp
src/theory/fp/theory_fp_type_rules.cpp
src/theory/logic_info.cpp
src/util/CMakeLists.txt
src/util/floatingpoint_literal_symfpu.cpp
src/util/floatingpoint_literal_symfpu.h [new file with mode: 0644]
src/util/floatingpoint_literal_symfpu.h.in [deleted file]
src/util/floatingpoint_literal_symfpu_traits.cpp
src/util/floatingpoint_literal_symfpu_traits.h [new file with mode: 0644]
src/util/floatingpoint_literal_symfpu_traits.h.in [deleted file]
test/api/issue4889.cpp
test/python/unit/api/test_solver.py
test/python/unit/api/test_sort.py
test/regress/README.md
test/regress/regress0/fp/abs-unsound.smt2
test/regress/regress0/fp/abs-unsound2.smt2
test/regress/regress0/fp/down-cast-RNA.smt2
test/regress/regress0/fp/ext-rew-test.smt2
test/regress/regress0/fp/from_sbv.smt2
test/regress/regress0/fp/from_ubv.smt2
test/regress/regress0/fp/issue-5524.smt2
test/regress/regress0/fp/issue3536.smt2
test/regress/regress0/fp/issue3582.smt2
test/regress/regress0/fp/issue3619.smt2
test/regress/regress0/fp/issue4277-assign-func.smt2
test/regress/regress0/fp/issue5511.smt2
test/regress/regress0/fp/issue5734.smt2
test/regress/regress0/fp/issue6164.smt2
test/regress/regress0/fp/rti_3_5_bug.smt2
test/regress/regress0/fp/simple.smt2
test/regress/regress0/fp/wrong-model.smt2
test/regress/regress0/issue5370.smt2
test/regress/regress0/parser/to_fp.smt2
test/regress/regress1/fp/rti_3_5_bug_report.smt2
test/regress/regress1/quantifiers/fp-cegqi-unsat.smt2
test/regress/regress1/quantifiers/issue4420-order-sensitive.smt2
test/regress/regress1/rr-verify/fp-arith.sy
test/regress/regress1/rr-verify/fp-bool.sy
test/regress/regress1/sygus/temp_input_to_synth_ic-error-121418.sy
test/regress/regress1/wrong-qfabvfp-smtcomp2018.smt2
test/regress/regress2/sygus/min_IC_1.sy
test/unit/api/solver_black.cpp
test/unit/api/sort_black.cpp
test/unit/theory/logic_info_white.cpp
test/unit/util/CMakeLists.txt

index b555c7bdc37943cd12d6de1b36b3495fd2560558..b29585f3bd08867b3c2b554d2655824cb612a352 100644 (file)
@@ -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("")
index 41f7702887e250af9e0991b79a8654637ca108f0..1a9c03476db4919e3e447037f7df755711c7f841 100644 (file)
@@ -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 60a70a6c5e52dc669341ed0cf4db1e1ecfdc3397..1943d7f00b71cd838b079d612abb470a588a9628 100644 (file)
--- 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
index 487bbcb5ae3b0d9a8159440721fd18e626e4cbb0..25203f8a699a91043d7fe2c81c877b5fa14d4525 100755 (executable)
@@ -64,7 +64,6 @@ The following flags enable optional packages (disable with --no-<option name>).
   --kissat                 use the Kissat SAT solver
   --poly                   use the LibPoly library [default=yes]
   --cocoa                  use the CoCoA library
-  --symfpu                 use SymFPU for floating point solver [default=yes]
   --editline               support the editline library
 
 Optional Path to Optional Packages:
@@ -133,7 +132,6 @@ editline=default
 shared=default
 static_binary=default
 statistics=default
-symfpu=ON
 tracing=default
 tsan=default
 ubsan=default
@@ -260,9 +258,6 @@ do
     --statistics) statistics=ON;;
     --no-statistics) statistics=OFF;;
 
-    --symfpu) symfpu=ON;;
-    --no-symfpu) symfpu=OFF;;
-
     --tracing) tracing=ON;;
     --no-tracing) tracing=OFF;;
 
@@ -398,8 +393,6 @@ cmake_opts=""
   && cmake_opts="$cmake_opts -DUSE_POLY=$poly"
 [ $cocoa != default ] \
   && cmake_opts="$cmake_opts -DUSE_COCOA=$cocoa"
-[ $symfpu != default ] \
-  && cmake_opts="$cmake_opts -DUSE_SYMFPU=$symfpu"
 [ "$abc_dir" != default ] \
   && cmake_opts="$cmake_opts -DABC_DIR=$abc_dir"
 [ "$glpk_dir" != default ] \
index 61ab18148b8c5080aac019128fb9ba5637a4780f..46f8b833031abdb5d62b00c275375aff119eabe2 100644 (file)
@@ -27,13 +27,6 @@ public class FloatingPointArith {
     System.loadLibrary("cvc4jni");
 
     // Test whether CVC4 was built with floating-point support
-    if (!Configuration.isBuiltWithSymFPU()) {
-      System.out.println("CVC4 was built without floating-point support.");
-      System.out.println("Configure with --symfpu and rebuild CVC4 to run");
-      System.out.println("this example.");
-      System.exit(77);
-    }
-
     ExprManager em = new ExprManager();
     SmtEngine smt = new SmtEngine(em);
 
index 66b18642d085f937c984e0096fed07f2b2e3ed96..0001f726b0e6875cac9c41de6420cb7e714ca842 100644 (file)
@@ -22,12 +22,6 @@ from pycvc5 import kinds
 if __name__ == "__main__":
     slv = pycvc5.Solver()
 
-    if not slv.supportsFloatingPoint():
-        # cvc5 must be built with SymFPU to support the theory of
-        # floating-point numbers
-        print("cvc5 was not built with floating-point support.")
-        exit()
-
     slv.setOption("produce-models", "true")
     slv.setLogic("QF_FP")
 
index 2419e1e41d331766d1e81c0ddd9f234761347877..d7da67cbeea358c7ec4d3c5001ff03c75b59c0df 100644 (file)
@@ -1204,9 +1204,8 @@ endif()
 if(USE_POLY)
   target_link_libraries(cvc5 PRIVATE Polyxx)
 endif()
-if(USE_SYMFPU)
-  target_link_libraries(cvc5 PRIVATE SymFPU)
-endif()
+
+target_link_libraries(cvc5 PRIVATE SymFPU)
 
 # Note: When linked statically GMP needs to be linked after CLN since CLN
 # depends on GMP.
index 30722298854ca431352c3b13583c7e411c783841..43bb3d2dc7a8283762b9158caee5910a5f41bf34 100644 (file)
@@ -5197,18 +5197,6 @@ void Solver::checkMkTerm(Kind kind, uint32_t nchildren) const
       << " children (the one under construction has " << nchildren << ")";
 }
 
-/* Solver Configuration                                                       */
-/* -------------------------------------------------------------------------- */
-
-bool Solver::supportsFloatingPoint() const
-{
-  CVC5_API_TRY_CATCH_BEGIN;
-  //////// all checks before this line
-  return Configuration::isBuiltWithSymFPU();
-  ////////
-  CVC5_API_TRY_CATCH_END;
-}
-
 /* Sorts Handling                                                             */
 /* -------------------------------------------------------------------------- */
 
@@ -5276,8 +5264,6 @@ Sort Solver::getRoundingModeSort(void) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return Sort(this, getNodeManager()->roundingModeType());
   ////////
@@ -5314,8 +5300,6 @@ Sort Solver::mkFloatingPointSort(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   CVC5_API_ARG_CHECK_EXPECTED(exp > 0, exp) << "exponent size > 0";
   CVC5_API_ARG_CHECK_EXPECTED(sig > 0, sig) << "significand size > 0";
   //////// all checks before this line
@@ -5794,8 +5778,6 @@ Term Solver::mkPosInf(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::FloatingPoint>(
       FloatingPoint::makeInf(FloatingPointSize(exp, sig), false));
@@ -5807,8 +5789,6 @@ Term Solver::mkNegInf(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::FloatingPoint>(
       FloatingPoint::makeInf(FloatingPointSize(exp, sig), true));
@@ -5820,8 +5800,6 @@ Term Solver::mkNaN(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::FloatingPoint>(
       FloatingPoint::makeNaN(FloatingPointSize(exp, sig)));
@@ -5833,8 +5811,6 @@ Term Solver::mkPosZero(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::FloatingPoint>(
       FloatingPoint::makeZero(FloatingPointSize(exp, sig), false));
@@ -5846,8 +5822,6 @@ Term Solver::mkNegZero(uint32_t exp, uint32_t sig) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::FloatingPoint>(
       FloatingPoint::makeZero(FloatingPointSize(exp, sig), true));
@@ -5859,8 +5833,6 @@ Term Solver::mkRoundingMode(RoundingMode rm) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   //////// all checks before this line
   return mkValHelper<cvc5::RoundingMode>(s_rmodes.at(rm));
   ////////
@@ -5914,8 +5886,6 @@ Term Solver::mkFloatingPoint(uint32_t exp, uint32_t sig, Term val) const
 {
   NodeManagerScope scope(getNodeManager());
   CVC5_API_TRY_CATCH_BEGIN;
-  CVC5_API_CHECK(Configuration::isBuiltWithSymFPU())
-      << "Expected cvc5 to be compiled with SymFPU support";
   CVC5_API_SOLVER_CHECK_TERM(val);
   CVC5_API_ARG_CHECK_EXPECTED(exp > 0, exp) << "a value > 0";
   CVC5_API_ARG_CHECK_EXPECTED(sig > 0, sig) << "a value > 0";
index a1421cf12e67f9963f37164af4f353d09dbcde24..1615226547585601b99016aa5b62c72d0bae508d 100644 (file)
@@ -2751,12 +2751,6 @@ class CVC5_EXPORT Solver
   Solver(const Solver&) = delete;
   Solver& operator=(const Solver&) = delete;
 
-  /* .................................................................... */
-  /* Solver Configuration                                                 */
-  /* .................................................................... */
-
-  bool supportsFloatingPoint() const;
-
   /* .................................................................... */
   /* Sorts Handling                                                       */
   /* .................................................................... */
index fdc1872e7e058494bca9248848b506738c4b4c9a..9d980267d244f73241801fd002c762e6d693abd1 100644 (file)
@@ -151,7 +151,6 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api":
 
     cdef cppclass Solver:
         Solver(Options*) except +
-        bint supportsFloatingPoint() except +
         Sort getBooleanSort() except +
         Sort getIntegerSort() except +
         Sort getRealSort() except +
index 258005207338da24a56c4881513aab540d3f357a..874c63c3d9f452757c99f12196b75f5c792bfcf3 100644 (file)
@@ -460,9 +460,6 @@ cdef class Solver:
     def __dealloc__(self):
         del self.csolver
 
-    def supportsFloatingPoint(self):
-        return self.csolver.supportsFloatingPoint()
-
     def getBooleanSort(self):
         cdef Sort sort = Sort(self)
         sort.csort = self.csolver.getBooleanSort()
index 61951841b29a6eeb33c1871e92edcdd14a93394c..1befb34ea528521e1f01d471593df4484ef8e50e 100644 (file)
@@ -123,7 +123,6 @@ std::string Configuration::copyright() {
   if (Configuration::isBuiltWithAbc() || Configuration::isBuiltWithCadical()
       || Configuration::isBuiltWithCryptominisat()
       || Configuration::isBuiltWithKissat()
-      || Configuration::isBuiltWithSymFPU()
       || Configuration::isBuiltWithEditline())
   {
     ss << "This version of cvc5 is linked against the following non-(L)GPL'ed\n"
@@ -151,12 +150,6 @@ std::string Configuration::copyright() {
          << "  See https://fmv.jku.at/kissat for copyright "
          << "information.\n\n";
     }
-    if (Configuration::isBuiltWithSymFPU())
-    {
-      ss << "  SymFPU - The Symbolic Floating Point Unit\n"
-         << "  See https://github.com/martin-cs/symfpu/tree/cvc5 for copyright "
-         << "information.\n\n";
-    }
     if (Configuration::isBuiltWithEditline())
     {
       ss << "  Editline Library\n"
@@ -165,6 +158,10 @@ std::string Configuration::copyright() {
     }
   }
 
+  ss << "  SymFPU - The Symbolic Floating Point Unit\n"
+     << "  See https://github.com/martin-cs/symfpu/tree/cvc5 for copyright "
+     << "information.\n\n";
+
   if (Configuration::isBuiltWithGmp() || Configuration::isBuiltWithPoly())
   {
     ss << "This version of cvc5 is linked against the following third party\n"
@@ -259,8 +256,6 @@ bool Configuration::isBuiltWithPoly()
   return IS_POLY_BUILD;
 }
 
-bool Configuration::isBuiltWithSymFPU() { return IS_SYMFPU_BUILD; }
-
 unsigned Configuration::getNumDebugTags() {
 #if defined(CVC5_DEBUG) && defined(CVC5_TRACING)
   /* -1 because a NULL pointer is inserted as the last value */
index 78e86f920fa1620a91c62e035bcbd93fbcc8a7da..2a7df1b4ae2478ec2e5c9e40b28f67f948cf2ce3 100644 (file)
@@ -113,8 +113,6 @@ public:
 
   static bool isBuiltWithPoly();
 
-  static bool isBuiltWithSymFPU();
-
   /* Return the number of debug tags */
   static unsigned getNumDebugTags();
   /* Return a sorted array of the debug tags name */
index 3027b23bcba53d4c5415b79acd7901f93306a9d4..39c5e89e964f0aba693325c6f572fc24599d7b1d 100644 (file)
@@ -126,12 +126,6 @@ namespace cvc5 {
 #define IS_EDITLINE_BUILD false
 #endif /* HAVE_LIBEDITLINE */
 
-#ifdef CVC5_USE_SYMFPU
-#define IS_SYMFPU_BUILD true
-#else /* HAVE_SYMFPU_HEADERS */
-#define IS_SYMFPU_BUILD false
-#endif /* HAVE_SYMFPU_HEADERS */
-
 #if CVC5_GPL_DEPS
 #  define IS_GPL_BUILD true
 #else /* CVC5_GPL_DEPS */
index e109ab44c1c12bcc465c8c08be46b81284860195..d31d2e58f4ee6b2b046d22fbb6627a3771200ee4 100644 (file)
@@ -403,7 +403,6 @@ void OptionsHandler::showConfiguration(const std::string& option,
   print_config_cond("kissat", Configuration::isBuiltWithKissat());
   print_config_cond("poly", Configuration::isBuiltWithPoly());
   print_config_cond("editline", Configuration::isBuiltWithEditline());
-  print_config_cond("symfpu", Configuration::isBuiltWithSymFPU());
 
   exit(0);
 }
index 0d1b25549eb97ee73bcbb622a649bda92b112e7e..0e196c0e0d995703a657fc3f67fdd9931d82d5dd 100644 (file)
@@ -23,7 +23,6 @@
 #include "util/floatingpoint.h"
 #include "util/floatingpoint_literal_symfpu.h"
 
-#ifdef CVC5_USE_SYMFPU
 #include "symfpu/core/add.h"
 #include "symfpu/core/classify.h"
 #include "symfpu/core/compare.h"
@@ -38,9 +37,7 @@
 #include "symfpu/core/sqrt.h"
 #include "symfpu/utils/numberOfRoundingModes.h"
 #include "symfpu/utils/properties.h"
-#endif
 
-#ifdef CVC5_USE_SYMFPU
 namespace symfpu {
 using namespace ::cvc5::theory::fp::symfpuSymbolic;
 
@@ -143,11 +140,6 @@ void probabilityAnnotation<traits, traits::prop>(const traits::prop &p,
   return;
 }
 };
-#endif
-
-#ifndef CVC5_USE_SYMFPU
-#define SYMFPU_NUMBER_OF_ROUNDING_MODES 5
-#endif
 
 namespace cvc5 {
 namespace theory {
@@ -242,11 +234,7 @@ symbolicProposition symbolicProposition::operator^(
 
 bool symbolicRoundingMode::checkNodeType(const TNode n)
 {
-#ifdef CVC5_USE_SYMFPU
   return n.getType(false).isBitVector(SYMFPU_NUMBER_OF_ROUNDING_MODES);
-#else
-  return false;
-#endif
 }
 
 symbolicRoundingMode::symbolicRoundingMode(const Node n) : nodeWrapper(n)
@@ -254,7 +242,6 @@ symbolicRoundingMode::symbolicRoundingMode(const Node n) : nodeWrapper(n)
   Assert(checkNodeType(*this));
 }
 
-#ifdef CVC5_USE_SYMFPU
 symbolicRoundingMode::symbolicRoundingMode(const unsigned v)
     : nodeWrapper(NodeManager::currentNM()->mkConst(
           BitVector(SYMFPU_NUMBER_OF_ROUNDING_MODES, v)))
@@ -262,14 +249,6 @@ symbolicRoundingMode::symbolicRoundingMode(const unsigned v)
   Assert((v & (v - 1)) == 0 && v != 0);  // Exactly one bit set
   Assert(checkNodeType(*this));
 }
-#else
-symbolicRoundingMode::symbolicRoundingMode(const unsigned v)
-    : nodeWrapper(NodeManager::currentNM()->mkConst(
-          BitVector(SYMFPU_NUMBER_OF_ROUNDING_MODES, v)))
-{
-  Unreachable();
-}
-#endif
 
 symbolicRoundingMode::symbolicRoundingMode(const symbolicRoundingMode &old)
     : nodeWrapper(old)
@@ -755,20 +734,17 @@ TypeNode floatingPointTypeInfo::getTypeNode(void) const
 
 FpConverter::FpConverter(context::UserContext* user)
     : d_additionalAssertions(user)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_fpMap(user),
       d_rmMap(user),
       d_boolMap(user),
       d_ubvMap(user),
       d_sbvMap(user)
-#endif
 {
 }
 
 FpConverter::~FpConverter() {}
 
-#ifdef CVC5_USE_SYMFPU
 Node FpConverter::ufToNode(const fpt &format, const uf &u) const
 {
   NodeManager *nm = NodeManager::currentNM();
@@ -843,7 +819,6 @@ FpConverter::uf FpConverter::buildComponents(TNode current)
 
   return tmp;
 }
-#endif
 
 // Non-convertible things should only be added to the stack at the very start,
 // thus...
@@ -851,7 +826,6 @@ FpConverter::uf FpConverter::buildComponents(TNode current)
 
 Node FpConverter::convert(TNode node)
 {
-#ifdef CVC5_USE_SYMFPU
   std::vector<TNode> workStack;
   TNode result = node;
 
@@ -1704,9 +1678,6 @@ Node FpConverter::convert(TNode node)
   }
 
   return result;
-#else
-  Unimplemented() << "Conversion is dependent on SymFPU";
-#endif
 }
 
 #undef CVC5_FPCONV_PASSTHROUGH
@@ -1715,7 +1686,6 @@ Node FpConverter::getValue(Valuation &val, TNode var)
 {
   Assert(Theory::isLeafOf(var, THEORY_FP));
 
-#ifdef CVC5_USE_SYMFPU
   TypeNode t(var.getType());
 
   Assert(t.isRoundingMode() || t.isFloatingPoint())
@@ -1735,9 +1705,6 @@ Node FpConverter::getValue(Valuation &val, TNode var)
   Assert(i != d_fpMap.end())
       << "Asking for the value of an unregistered expression";
   return ufToNode(fpt(t), (*i).second);
-#else
-  Unimplemented() << "Conversion is dependent on SymFPU";
-#endif
 }
 
 }  // namespace fp
index f1b7c8a83a30d5dbfc2fd3530d01f5e1e4a7bdf0..9900c2987e8da5c276e503b99d2d69ce90a4bad6 100644 (file)
@@ -33,9 +33,7 @@
 #include "util/floatingpoint_size.h"
 #include "util/hash.h"
 
-#ifdef CVC5_USE_SYMFPU
 #include "symfpu/core/unpackedFloat.h"
-#endif
 
 #ifdef CVC5_SYM_SYMBOLIC_EVAL
 // This allows debugging of the cvc5 symbolic back-end.
@@ -120,9 +118,7 @@ class symbolicProposition : public nodeWrapper
  protected:
   bool checkNodeType(const TNode node);
 
-#ifdef CVC5_USE_SYMFPU
   friend ::symfpu::ite<symbolicProposition, symbolicProposition>;  // For ITE
-#endif
 
  public:
   symbolicProposition(const Node n);
@@ -141,9 +137,7 @@ class symbolicRoundingMode : public nodeWrapper
  protected:
   bool checkNodeType(const TNode n);
 
-#ifdef CVC5_USE_SYMFPU
   friend ::symfpu::ite<symbolicProposition, symbolicRoundingMode>;  // For ITE
-#endif
 
  public:
   symbolicRoundingMode(const Node n);
@@ -183,10 +177,8 @@ class symbolicBitVector : public nodeWrapper
   bool checkNodeType(const TNode n);
   friend symbolicBitVector<!isSigned>;  // To allow conversion between the types
 
-#ifdef CVC5_USE_SYMFPU
   friend ::symfpu::ite<symbolicProposition,
                        symbolicBitVector<isSigned> >;  // For ITE
-#endif
 
  public:
   symbolicBitVector(const Node n);
@@ -314,7 +306,6 @@ class FpConverter
   context::CDList<Node> d_additionalAssertions;
 
  protected:
-#ifdef CVC5_USE_SYMFPU
   typedef symfpuSymbolic::traits traits;
   typedef ::symfpu::unpackedFloat<symfpuSymbolic::traits> uf;
   typedef symfpuSymbolic::traits::rm rm;
@@ -348,7 +339,6 @@ class FpConverter
 
   /* Creates the relevant components for a variable */
   uf buildComponents(TNode current);
-#endif
 };
 
 }  // namespace fp
index 3d81a2995340dfe8b2e2632dbadc9e8b82c81cd8..77dba0724763e53275c1a289ea73d80ee6c7c57b 100644 (file)
@@ -661,7 +661,7 @@ bool TheoryFp::isRegistered(TNode node) {
 
 void TheoryFp::preRegisterTerm(TNode node)
 {
-  if (Configuration::isBuiltWithSymFPU() && !options::fpExp())
+  if (!options::fpExp())
   {
     TypeNode tn = node.getType();
     if (tn.isFloatingPoint())
index 76f7d55cf9676d52da0202eb2b4e02ea5bcc8746..8bc7900de0e73e78d4970532767644c5193e5fde 100644 (file)
@@ -1026,12 +1026,10 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
     bool result;
     switch (k)
     {
-#ifdef CVC5_USE_SYMFPU
       case kind::FLOATINGPOINT_COMPONENT_NAN: result = arg0.isNaN(); break;
       case kind::FLOATINGPOINT_COMPONENT_INF: result = arg0.isInfinite(); break;
       case kind::FLOATINGPOINT_COMPONENT_ZERO: result = arg0.isZero(); break;
       case kind::FLOATINGPOINT_COMPONENT_SIGN: result = arg0.getSign(); break;
-#endif
       default: Unreachable() << "Unknown kind used in componentFlag"; break;
     }
 
@@ -1050,11 +1048,7 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
     // \todo Add a proper interface for this sort of thing to FloatingPoint #1915
     return RewriteResponse(
         REWRITE_DONE,
-#ifdef CVC5_USE_SYMFPU
         NodeManager::currentNM()->mkConst((BitVector)arg0.getExponent())
-#else
-        node
-#endif
     );
   }
 
@@ -1066,11 +1060,7 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
 
     return RewriteResponse(
         REWRITE_DONE,
-#ifdef CVC5_USE_SYMFPU
         NodeManager::currentNM()->mkConst((BitVector)arg0.getSignificand())
-#else
-        node
-#endif
     );
   }
 
@@ -1080,7 +1070,6 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
 
     BitVector value;
 
-#ifdef CVC5_USE_SYMFPU
     /* \todo fix the numbering of rounding modes so this doesn't need
      * to call symfpu at all and remove the dependency on fp_converter.h #1915 */
     RoundingMode arg0(node[0].getConst<RoundingMode>());
@@ -1110,9 +1099,6 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
         Unreachable() << "Unknown rounding mode in roundingModeBitBlast";
         break;
     }
-#else
-    value = BitVector(5U, 0U);
-#endif
     return RewriteResponse(REWRITE_DONE,
                            NodeManager::currentNM()->mkConst(value));
   }
index b78ef24c796bf8f88d557a99c9b097d250d58157..77c1ef8f027e746d6c9292cd5b341bde65f6615e 100644 (file)
@@ -727,7 +727,6 @@ TypeNode FloatingPointComponentExponent::computeType(NodeManager* nodeManager,
     }
   }
 
-#ifdef CVC5_USE_SYMFPU
   /* Need to create some symfpu objects as the size of bit-vector
    * that is needed for this component is dependent on the encoding
    * used (i.e. whether subnormals are forcibly normalised or not).
@@ -735,9 +734,6 @@ TypeNode FloatingPointComponentExponent::computeType(NodeManager* nodeManager,
    * back-end but it should't make a difference. */
   FloatingPointSize fps = operandType.getConst<FloatingPointSize>();
   uint32_t bw = FloatingPoint::getUnpackedExponentWidth(fps);
-#else
-  uint32_t bw = 2;
-#endif
   return nodeManager->mkBitVectorType(bw);
 }
 
@@ -767,13 +763,9 @@ TypeNode FloatingPointComponentSignificand::computeType(
     }
   }
 
-#ifdef CVC5_USE_SYMFPU
   /* As before we need to use some of sympfu. */
   FloatingPointSize fps = operandType.getConst<FloatingPointSize>();
   uint32_t bw = FloatingPoint::getUnpackedSignificandWidth(fps);
-#else
-  uint32_t bw = 1;
-#endif
   return nodeManager->mkBitVectorType(bw);
 }
 
index 8ba43aa1a3e7c397acff01ee3149732c2c8a3d4e..d53b0615193cc76d428db88b79adb9d4f1a6439a 100644 (file)
@@ -44,10 +44,6 @@ LogicInfo::LogicInfo()
 {
   for (TheoryId id = THEORY_FIRST; id < THEORY_LAST; ++id)
   {
-    if (id == THEORY_FP && !Configuration::isBuiltWithSymFPU())
-    {
-      continue;
-    }
     enableTheory(id);
   }
 }
index 2938ddccacc0a20970351f4a02923af83fc3aa4a..71742dfcecfc423eabe46ab9d4eed4917992534f 100644 (file)
@@ -13,9 +13,6 @@
 # The build system configuration.
 ##
 
-configure_file(floatingpoint_literal_symfpu.h.in floatingpoint_literal_symfpu.h)
-configure_file(floatingpoint_literal_symfpu_traits.h.in
-               floatingpoint_literal_symfpu_traits.h)
 configure_file(rational.h.in rational.h)
 configure_file(integer.h.in integer.h)
 configure_file(real_algebraic_number.h.in real_algebraic_number.h)
index c2c3fe77bfda31c6b47adc86158e886dd9c1209d..dc3dce6b9a4e516a92f8fda909666e221adb341b 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "base/check.h"
 
-#ifdef CVC5_USE_SYMFPU
 #include "symfpu/core/add.h"
 #include "symfpu/core/classify.h"
 #include "symfpu/core/compare.h"
 #include "symfpu/core/sqrt.h"
 #include "symfpu/utils/numberOfRoundingModes.h"
 #include "symfpu/utils/properties.h"
-#endif
 
 /* -------------------------------------------------------------------------- */
 
-#ifdef CVC5_USE_SYMFPU
 namespace symfpu {
 
 #define CVC5_LIT_ITE_DFN(T)                                            \
@@ -57,7 +54,6 @@ CVC5_LIT_ITE_DFN(::cvc5::symfpuLiteral::traits::ubv);
 
 #undef CVC5_LIT_ITE_DFN
 }  // namespace symfpu
-#endif
 
 /* -------------------------------------------------------------------------- */
 
@@ -65,44 +61,30 @@ namespace cvc5 {
 
 uint32_t FloatingPointLiteral::getUnpackedExponentWidth(FloatingPointSize& size)
 {
-#ifdef CVC5_USE_SYMFPU
   return SymFPUUnpackedFloatLiteral::exponentWidth(size);
-#else
-  unimplemented();
-  return 2;
-#endif
 }
 
 uint32_t FloatingPointLiteral::getUnpackedSignificandWidth(
     FloatingPointSize& size)
 {
-#ifdef CVC5_USE_SYMFPU
   return SymFPUUnpackedFloatLiteral::significandWidth(size);
-#else
-  unimplemented();
-  return 2;
-#endif
 }
 
 FloatingPointLiteral::FloatingPointLiteral(uint32_t exp_size,
                                            uint32_t sig_size,
                                            const BitVector& bv)
     : d_fp_size(exp_size, sig_size)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_symuf(symfpu::unpack<symfpuLiteral::traits>(
           symfpuLiteral::Cvc5FPSize(exp_size, sig_size), bv))
-#endif
 {
 }
 
 FloatingPointLiteral::FloatingPointLiteral(
     const FloatingPointSize& size, FloatingPointLiteral::SpecialConstKind kind)
     : d_fp_size(size)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_symuf(SymFPUUnpackedFloatLiteral::makeNaN(size))
-#endif
 {
   Assert(kind == FloatingPointLiteral::SpecialConstKind::FPNAN);
 }
@@ -112,12 +94,10 @@ FloatingPointLiteral::FloatingPointLiteral(
     FloatingPointLiteral::SpecialConstKind kind,
     bool sign)
     : d_fp_size(size)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_symuf(kind == FloatingPointLiteral::SpecialConstKind::FPINF
                   ? SymFPUUnpackedFloatLiteral::makeInf(size, sign)
                   : SymFPUUnpackedFloatLiteral::makeZero(size, sign))
-#endif
 {
   Assert(kind == FloatingPointLiteral::SpecialConstKind::FPINF
          || kind == FloatingPointLiteral::SpecialConstKind::FPZERO);
@@ -126,10 +106,8 @@ FloatingPointLiteral::FloatingPointLiteral(
 FloatingPointLiteral::FloatingPointLiteral(const FloatingPointSize& size,
                                            const BitVector& bv)
     : d_fp_size(size)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_symuf(symfpu::unpack<symfpuLiteral::traits>(size, bv))
-#endif
 {
 }
 
@@ -138,7 +116,6 @@ FloatingPointLiteral::FloatingPointLiteral(const FloatingPointSize& size,
                                            const BitVector& bv,
                                            bool signedBV)
     : d_fp_size(size)
-#ifdef CVC5_USE_SYMFPU
       ,
       d_symuf(signedBV ? symfpu::convertSBVToFloat<symfpuLiteral::traits>(
                   symfpuLiteral::Cvc5FPSize(size),
@@ -148,97 +125,61 @@ FloatingPointLiteral::FloatingPointLiteral(const FloatingPointSize& size,
                            symfpuLiteral::Cvc5FPSize(size),
                            symfpuLiteral::Cvc5RM(rm),
                            symfpuLiteral::Cvc5UnsignedBitVector(bv)))
-#endif
 {
 }
 
 BitVector FloatingPointLiteral::pack(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   BitVector bv(symfpu::pack<symfpuLiteral::traits>(d_fp_size, d_symuf));
-#else
-  unimplemented();
-  BitVector bv(4u, 0u);
-#endif
   return bv;
 }
 
 FloatingPointLiteral FloatingPointLiteral::absolute(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return FloatingPointLiteral(
       d_fp_size, symfpu::absolute<symfpuLiteral::traits>(d_fp_size, d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::negate(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return FloatingPointLiteral(
       d_fp_size, symfpu::negate<symfpuLiteral::traits>(d_fp_size, d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::add(
     const RoundingMode& rm, const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(d_fp_size,
                               symfpu::add<symfpuLiteral::traits>(
                                   d_fp_size, rm, d_symuf, arg.d_symuf, true));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::sub(
     const RoundingMode& rm, const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(d_fp_size,
                               symfpu::add<symfpuLiteral::traits>(
                                   d_fp_size, rm, d_symuf, arg.d_symuf, false));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::mult(
     const RoundingMode& rm, const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(d_fp_size,
                               symfpu::multiply<symfpuLiteral::traits>(
                                   d_fp_size, rm, d_symuf, arg.d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::div(
     const RoundingMode& rm, const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(d_fp_size,
                               symfpu::divide<symfpuLiteral::traits>(
                                   d_fp_size, rm, d_symuf, arg.d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::fma(
@@ -246,276 +187,150 @@ FloatingPointLiteral FloatingPointLiteral::fma(
     const FloatingPointLiteral& arg1,
     const FloatingPointLiteral& arg2) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg1.d_fp_size);
   Assert(d_fp_size == arg2.d_fp_size);
   return FloatingPointLiteral(
       d_fp_size,
       symfpu::fma<symfpuLiteral::traits>(
           d_fp_size, rm, d_symuf, arg1.d_symuf, arg2.d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::sqrt(const RoundingMode& rm) const
 {
-#ifdef CVC5_USE_SYMFPU
   return FloatingPointLiteral(
       d_fp_size, symfpu::sqrt<symfpuLiteral::traits>(d_fp_size, rm, d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::rti(const RoundingMode& rm) const
 {
-#ifdef CVC5_USE_SYMFPU
   return FloatingPointLiteral(
       d_fp_size,
       symfpu::roundToIntegral<symfpuLiteral::traits>(d_fp_size, rm, d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::rem(
     const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(d_fp_size,
                               symfpu::remainder<symfpuLiteral::traits>(
                                   d_fp_size, d_symuf, arg.d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::maxTotal(
     const FloatingPointLiteral& arg, bool zeroCaseLeft) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(
       d_fp_size,
       symfpu::max<symfpuLiteral::traits>(
           d_fp_size, d_symuf, arg.d_symuf, zeroCaseLeft));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::minTotal(
     const FloatingPointLiteral& arg, bool zeroCaseLeft) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return FloatingPointLiteral(
       d_fp_size,
       symfpu::min<symfpuLiteral::traits>(
           d_fp_size, d_symuf, arg.d_symuf, zeroCaseLeft));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 bool FloatingPointLiteral::operator==(const FloatingPointLiteral& fp) const
 {
-#ifdef CVC5_USE_SYMFPU
   return ((d_fp_size == fp.d_fp_size)
           && symfpu::smtlibEqual<symfpuLiteral::traits>(
               d_fp_size, d_symuf, fp.d_symuf));
-#else
-  unimplemented();
-  return ((d_fp_size == fp.d_fp_size));
-#endif
 }
 
 bool FloatingPointLiteral::operator<=(const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return symfpu::lessThanOrEqual<symfpuLiteral::traits>(
       d_fp_size, d_symuf, arg.d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::operator<(const FloatingPointLiteral& arg) const
 {
-#ifdef CVC5_USE_SYMFPU
   Assert(d_fp_size == arg.d_fp_size);
   return symfpu::lessThan<symfpuLiteral::traits>(
       d_fp_size, d_symuf, arg.d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 BitVector FloatingPointLiteral::getExponent() const
 {
-#ifdef CVC5_USE_SYMFPU
   return d_symuf.exponent;
-#else
-  unimplemented();
-  Unreachable() << "no concrete implementation of FloatingPointLiteral";
-  return BitVector();
-#endif
 }
 
 BitVector FloatingPointLiteral::getSignificand() const
 {
-#ifdef CVC5_USE_SYMFPU
   return d_symuf.significand;
-#else
-  unimplemented();
-  Unreachable() << "no concrete implementation of FloatingPointLiteral";
-  return BitVector();
-#endif
 }
 
 bool FloatingPointLiteral::getSign() const
 {
-#ifdef CVC5_USE_SYMFPU
   return d_symuf.sign;
-#else
-  unimplemented();
-  Unreachable() << "no concrete implementation of FloatingPointLiteral";
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isNormal(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isNormal<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isSubnormal(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isSubnormal<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isZero(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isZero<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isInfinite(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isInfinite<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isNaN(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isNaN<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isNegative(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isNegative<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 bool FloatingPointLiteral::isPositive(void) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::isPositive<symfpuLiteral::traits>(d_fp_size, d_symuf);
-#else
-  unimplemented();
-  return false;
-#endif
 }
 
 FloatingPointLiteral FloatingPointLiteral::convert(
     const FloatingPointSize& target, const RoundingMode& rm) const
 {
-#ifdef CVC5_USE_SYMFPU
   return FloatingPointLiteral(
       target,
       symfpu::convertFloatToFloat<symfpuLiteral::traits>(
           d_fp_size, target, rm, d_symuf));
-#else
-  unimplemented();
-  return *this;
-#endif
 }
 
 BitVector FloatingPointLiteral::convertToSBVTotal(BitVectorSize width,
                                                   const RoundingMode& rm,
                                                   BitVector undefinedCase) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::convertFloatToSBV<symfpuLiteral::traits>(
       d_fp_size, rm, d_symuf, width, undefinedCase);
-#else
-  unimplemented();
-  return undefinedCase;
-#endif
 }
 
 BitVector FloatingPointLiteral::convertToUBVTotal(BitVectorSize width,
                                                   const RoundingMode& rm,
                                                   BitVector undefinedCase) const
 {
-#ifdef CVC5_USE_SYMFPU
   return symfpu::convertFloatToUBV<symfpuLiteral::traits>(
       d_fp_size, rm, d_symuf, width, undefinedCase);
-#else
-  unimplemented();
-  return undefinedCase;
-#endif
 }
 
-#ifndef CVC5_USE_SYMFPU
-void FloatingPointLiteral::unimplemented(void)
-{
-  Unimplemented() << "no concrete implementation of FloatingPointLiteral";
-}
-
-size_t FloatingPointLiteral::hash(void) const
-{
-  unimplemented();
-  return 23;
-}
-#endif
-
 }  // namespace cvc5
diff --git a/src/util/floatingpoint_literal_symfpu.h b/src/util/floatingpoint_literal_symfpu.h
new file mode 100644 (file)
index 0000000..5b2b0f7
--- /dev/null
@@ -0,0 +1,226 @@
+/******************************************************************************
+ * Top contributors (to current version):
+ *   Aina Niemetz, Andres Noetzli
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved.  See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * SymFPU glue code for floating-point values.
+ *
+ * !!! This header is not to be included in any other headers !!!
+ */
+#include "cvc5_public.h"
+
+#ifndef CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_H
+#define CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_H
+
+#include "util/bitvector.h"
+#include "util/floatingpoint_literal_symfpu_traits.h"
+#include "util/floatingpoint_size.h"
+#include "util/roundingmode.h"
+
+/* -------------------------------------------------------------------------- */
+
+namespace cvc5 {
+
+using SymFPUUnpackedFloatLiteral =
+    ::symfpu::unpackedFloat<symfpuLiteral::traits>;
+
+class FloatingPointLiteral
+{
+  friend class FloatingPoint;
+
+ public:
+  /**
+   * The kind of floating-point special constants that can be created via the
+   * corresponding constructor.
+   * These are prefixed with FP because of name clashes with NAN.
+   */
+  enum SpecialConstKind
+  {
+    FPINF,   // +-oo
+    FPNAN,   // NaN
+    FPZERO,  // +-zero
+  };
+
+  /**
+   * Get the number of exponent bits in the unpacked format corresponding to a
+   * given packed format.  This is the unpacked counter-part of
+   * FloatingPointSize::exponentWidth().
+   */
+  static uint32_t getUnpackedExponentWidth(FloatingPointSize& size);
+  /**
+   * Get the number of exponent bits in the unpacked format corresponding to a
+   * given packed format.  This is the unpacked counter-part of
+   * FloatingPointSize::significandWidth().
+   */
+  static uint32_t getUnpackedSignificandWidth(FloatingPointSize& size);
+
+  /** Constructors. */
+
+  /** Create a FP literal from its IEEE bit-vector representation. */
+  FloatingPointLiteral(uint32_t exp_size,
+                       uint32_t sig_size,
+                       const BitVector& bv);
+  FloatingPointLiteral(const FloatingPointSize& size, const BitVector& bv);
+
+  /** Create a FP literal that represents a special constants. */
+  FloatingPointLiteral(const FloatingPointSize& size, SpecialConstKind kind);
+  FloatingPointLiteral(const FloatingPointSize& size,
+                       SpecialConstKind kind,
+                       bool sign);
+
+  /**
+   * Create a FP literal from a signed or unsigned bit-vector value with
+   * respect to given rounding mode.
+   */
+  FloatingPointLiteral(const FloatingPointSize& size,
+                       const RoundingMode& rm,
+                       const BitVector& bv,
+                       bool signedBV);
+
+  ~FloatingPointLiteral() {}
+
+  /** Return the size of this FP literal. */
+  const FloatingPointSize& getSize() const { return d_fp_size; };
+
+  /** Return the packed (IEEE-754) representation of this literal. */
+  BitVector pack(void) const;
+
+  /** Floating-point absolute value literal. */
+  FloatingPointLiteral absolute(void) const;
+  /** Floating-point negation literal. */
+  FloatingPointLiteral negate(void) const;
+  /** Floating-point addition literal. */
+  FloatingPointLiteral add(const RoundingMode& rm,
+                           const FloatingPointLiteral& arg) const;
+  /** Floating-point subtraction literal. */
+  FloatingPointLiteral sub(const RoundingMode& rm,
+                           const FloatingPointLiteral& arg) const;
+  /** Floating-point multiplication literal. */
+  FloatingPointLiteral mult(const RoundingMode& rm,
+                            const FloatingPointLiteral& arg) const;
+  /** Floating-point division literal. */
+  FloatingPointLiteral div(const RoundingMode& rm,
+                           const FloatingPointLiteral& arg) const;
+  /** Floating-point fused multiplication and addition literal. */
+  FloatingPointLiteral fma(const RoundingMode& rm,
+                           const FloatingPointLiteral& arg1,
+                           const FloatingPointLiteral& arg2) const;
+  /** Floating-point square root literal. */
+  FloatingPointLiteral sqrt(const RoundingMode& rm) const;
+  /** Floating-point round to integral literal. */
+  FloatingPointLiteral rti(const RoundingMode& rm) const;
+  /** Floating-point remainder literal. */
+  FloatingPointLiteral rem(const FloatingPointLiteral& arg) const;
+
+  /**
+   * Floating-point max literal (total version).
+   * zeroCase: true to return the left (rather than the right operand) in case
+   *           of max(-0,+0) or max(+0,-0).
+   */
+  FloatingPointLiteral maxTotal(const FloatingPointLiteral& arg,
+                                bool zeroCaseLeft) const;
+  /**
+   * Floating-point min literal (total version).
+   * zeroCase: true to return the left (rather than the right operand) in case
+   *           of min(-0,+0) or min(+0,-0).
+   */
+  FloatingPointLiteral minTotal(const FloatingPointLiteral& arg,
+                                bool zeroCaseLeft) const;
+
+  /** Equality literal (NOT: fp.eq but =) over floating-point values. */
+  bool operator==(const FloatingPointLiteral& fp) const;
+  /** Floating-point less or equal than literal. */
+  bool operator<=(const FloatingPointLiteral& arg) const;
+  /** Floating-point less than literal. */
+  bool operator<(const FloatingPointLiteral& arg) const;
+
+  /** Get the exponent of this floating-point value. */
+  BitVector getExponent() const;
+  /** Get the significand of this floating-point value. */
+  BitVector getSignificand() const;
+  /** True if this value is a negative value. */
+  bool getSign() const;
+
+  /** Return true if this literal represents a normal value. */
+  bool isNormal(void) const;
+  /** Return true if this  literal represents a subnormal value. */
+  bool isSubnormal(void) const;
+  /** Return true if this literal represents a zero value. */
+  bool isZero(void) const;
+  /** Return true if this literal represents an infinite value. */
+  bool isInfinite(void) const;
+  /** Return true if this literal represents a NaN value. */
+  bool isNaN(void) const;
+  /** Return true if this literal represents a negative value. */
+  bool isNegative(void) const;
+  /** Return true if this literal represents a positive value. */
+  bool isPositive(void) const;
+
+  /**
+   * Convert this floating-point literal to a literal of given size, with
+   * respect to given rounding mode.
+   */
+  FloatingPointLiteral convert(const FloatingPointSize& target,
+                               const RoundingMode& rm) const;
+
+  /**
+   * Convert this floating-point literal to a signed bit-vector of given size,
+   * with respect to given rounding mode (total version).
+   * Returns given bit-vector 'undefinedCase' in the undefined case.
+   */
+  BitVector convertToSBVTotal(BitVectorSize width,
+                              const RoundingMode& rm,
+                              BitVector undefinedCase) const;
+  /**
+   * Convert this floating-point literal to an unsigned bit-vector of given
+   * size, with respect to given rounding mode (total version).
+   * Returns given bit-vector 'undefinedCase' in the undefined case.
+   */
+  BitVector convertToUBVTotal(BitVectorSize width,
+                              const RoundingMode& rm,
+                              BitVector undefinedCase) const;
+  /** Return wrapped floating-point literal. */
+  const SymFPUUnpackedFloatLiteral& getSymUF() const { return d_symuf; }
+
+ private:
+  /**
+   * Create a FP literal from unpacked representation.
+   *
+   * This unpacked representation accounts for additional bits required for the
+   * exponent to allow subnormals to be normalized.
+   *
+   * This should NOT be used to create a literal from its IEEE bit-vector
+   * representation -- for this, the above constructor is to be used while
+   * creating a SymFPUUnpackedFloatLiteral via symfpu::unpack.
+   */
+  FloatingPointLiteral(const FloatingPointSize& size,
+                       const bool sign,
+                       const BitVector& exp,
+                       const BitVector& sig)
+      : d_fp_size(size), d_symuf(SymFPUUnpackedFloatLiteral(sign, exp, sig))
+  {
+  }
+
+  /** Create a FP literal from a symFPU unpacked float. */
+  FloatingPointLiteral(const FloatingPointSize& size,
+                       SymFPUUnpackedFloatLiteral symuf)
+      : d_fp_size(size), d_symuf(symuf){};
+
+  /** The floating-point size of this floating-point literal. */
+  FloatingPointSize d_fp_size;
+  /** The actual floating-point value, a SymFPU unpackedFloat. */
+  SymFPUUnpackedFloatLiteral d_symuf;
+};
+
+/* -------------------------------------------------------------------------- */
+
+}  // namespace cvc5
+
+#endif
diff --git a/src/util/floatingpoint_literal_symfpu.h.in b/src/util/floatingpoint_literal_symfpu.h.in
deleted file mode 100644 (file)
index 54827a3..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/******************************************************************************
- * Top contributors (to current version):
- *   Aina Niemetz, Andres Noetzli
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved.  See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * SymFPU glue code for floating-point values.
- *
- * !!! This header is not to be included in any other headers !!!
- */
-#include "cvc5_public.h"
-
-#ifndef CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_H
-#define CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_H
-
-#include "util/bitvector.h"
-#include "util/floatingpoint_size.h"
-#include "util/floatingpoint_literal_symfpu_traits.h"
-#include "util/roundingmode.h"
-
-/* -------------------------------------------------------------------------- */
-
-namespace cvc5 {
-
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-// clang-format on
-using SymFPUUnpackedFloatLiteral =
-    ::symfpu::unpackedFloat<symfpuLiteral::traits>;
-#endif
-
-class FloatingPointLiteral
-{
-  friend class FloatingPoint;
-
- public:
-  /**
-   * The kind of floating-point special constants that can be created via the
-   * corresponding constructor.
-   * These are prefixed with FP because of name clashes with NAN.
-   */
-  enum SpecialConstKind
-  {
-    FPINF,   // +-oo
-    FPNAN,   // NaN
-    FPZERO,  // +-zero
-  };
-
-  /**
-   * Get the number of exponent bits in the unpacked format corresponding to a
-   * given packed format.  This is the unpacked counter-part of
-   * FloatingPointSize::exponentWidth().
-   */
-  static uint32_t getUnpackedExponentWidth(FloatingPointSize& size);
-  /**
-   * Get the number of exponent bits in the unpacked format corresponding to a
-   * given packed format.  This is the unpacked counter-part of
-   * FloatingPointSize::significandWidth().
-   */
-  static uint32_t getUnpackedSignificandWidth(FloatingPointSize& size);
-
-// clang-format off
-#if !@CVC5_USE_SYMFPU@
-  // clang-format on
-  /** Catch-all for unimplemented functions. */
-  static void unimplemented(void);
-#endif
-
-  /** Constructors. */
-
-  /** Create a FP literal from its IEEE bit-vector representation. */
-  FloatingPointLiteral(uint32_t exp_size,
-                       uint32_t sig_size,
-                       const BitVector& bv);
-  FloatingPointLiteral(const FloatingPointSize& size, const BitVector& bv);
-
-  /** Create a FP literal that represents a special constants. */
-  FloatingPointLiteral(const FloatingPointSize& size, SpecialConstKind kind);
-  FloatingPointLiteral(const FloatingPointSize& size,
-                       SpecialConstKind kind,
-                       bool sign);
-
-  /**
-   * Create a FP literal from a signed or unsigned bit-vector value with
-   * respect to given rounding mode.
-   */
-  FloatingPointLiteral(const FloatingPointSize& size,
-                       const RoundingMode& rm,
-                       const BitVector& bv,
-                       bool signedBV);
-
-  ~FloatingPointLiteral() {}
-
-  /** Return the size of this FP literal. */
-  const FloatingPointSize& getSize() const { return d_fp_size; };
-
-  /** Return the packed (IEEE-754) representation of this literal. */
-  BitVector pack(void) const;
-
-  /** Floating-point absolute value literal. */
-  FloatingPointLiteral absolute(void) const;
-  /** Floating-point negation literal. */
-  FloatingPointLiteral negate(void) const;
-  /** Floating-point addition literal. */
-  FloatingPointLiteral add(const RoundingMode& rm,
-                           const FloatingPointLiteral& arg) const;
-  /** Floating-point subtraction literal. */
-  FloatingPointLiteral sub(const RoundingMode& rm,
-                           const FloatingPointLiteral& arg) const;
-  /** Floating-point multiplication literal. */
-  FloatingPointLiteral mult(const RoundingMode& rm,
-                            const FloatingPointLiteral& arg) const;
-  /** Floating-point division literal. */
-  FloatingPointLiteral div(const RoundingMode& rm,
-                           const FloatingPointLiteral& arg) const;
-  /** Floating-point fused multiplication and addition literal. */
-  FloatingPointLiteral fma(const RoundingMode& rm,
-                           const FloatingPointLiteral& arg1,
-                           const FloatingPointLiteral& arg2) const;
-  /** Floating-point square root literal. */
-  FloatingPointLiteral sqrt(const RoundingMode& rm) const;
-  /** Floating-point round to integral literal. */
-  FloatingPointLiteral rti(const RoundingMode& rm) const;
-  /** Floating-point remainder literal. */
-  FloatingPointLiteral rem(const FloatingPointLiteral& arg) const;
-
-  /**
-   * Floating-point max literal (total version).
-   * zeroCase: true to return the left (rather than the right operand) in case
-   *           of max(-0,+0) or max(+0,-0).
-   */
-  FloatingPointLiteral maxTotal(const FloatingPointLiteral& arg,
-                                bool zeroCaseLeft) const;
-  /**
-   * Floating-point min literal (total version).
-   * zeroCase: true to return the left (rather than the right operand) in case
-   *           of min(-0,+0) or min(+0,-0).
-   */
-  FloatingPointLiteral minTotal(const FloatingPointLiteral& arg,
-                                bool zeroCaseLeft) const;
-
-  /** Equality literal (NOT: fp.eq but =) over floating-point values. */
-  bool operator==(const FloatingPointLiteral& fp) const;
-  /** Floating-point less or equal than literal. */
-  bool operator<=(const FloatingPointLiteral& arg) const;
-  /** Floating-point less than literal. */
-  bool operator<(const FloatingPointLiteral& arg) const;
-
-  /** Get the exponent of this floating-point value. */
-  BitVector getExponent() const;
-  /** Get the significand of this floating-point value. */
-  BitVector getSignificand() const;
-  /** True if this value is a negative value. */
-  bool getSign() const;
-
-  /** Return true if this literal represents a normal value. */
-  bool isNormal(void) const;
-  /** Return true if this  literal represents a subnormal value. */
-  bool isSubnormal(void) const;
-  /** Return true if this literal represents a zero value. */
-  bool isZero(void) const;
-  /** Return true if this literal represents an infinite value. */
-  bool isInfinite(void) const;
-  /** Return true if this literal represents a NaN value. */
-  bool isNaN(void) const;
-  /** Return true if this literal represents a negative value. */
-  bool isNegative(void) const;
-  /** Return true if this literal represents a positive value. */
-  bool isPositive(void) const;
-
-  /**
-   * Convert this floating-point literal to a literal of given size, with
-   * respect to given rounding mode.
-   */
-  FloatingPointLiteral convert(const FloatingPointSize& target,
-                               const RoundingMode& rm) const;
-
-  /**
-   * Convert this floating-point literal to a signed bit-vector of given size,
-   * with respect to given rounding mode (total version).
-   * Returns given bit-vector 'undefinedCase' in the undefined case.
-   */
-  BitVector convertToSBVTotal(BitVectorSize width,
-                              const RoundingMode& rm,
-                              BitVector undefinedCase) const;
-  /**
-   * Convert this floating-point literal to an unsigned bit-vector of given
-   * size, with respect to given rounding mode (total version).
-   * Returns given bit-vector 'undefinedCase' in the undefined case.
-   */
-  BitVector convertToUBVTotal(BitVectorSize width,
-                              const RoundingMode& rm,
-                              BitVector undefinedCase) const;
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-  // clang-format on
-  /** Return wrapped floating-point literal. */
-  const SymFPUUnpackedFloatLiteral& getSymUF() const { return d_symuf; }
-#else
-  /** Dummy hash function. */
-  size_t hash(void) const;
-#endif
-
- private:
-
-  /**
-   * Create a FP literal from unpacked representation.
-   *
-   * This unpacked representation accounts for additional bits required for the
-   * exponent to allow subnormals to be normalized.
-   *
-   * This should NOT be used to create a literal from its IEEE bit-vector
-   * representation -- for this, the above constructor is to be used while
-   * creating a SymFPUUnpackedFloatLiteral via symfpu::unpack.
-   */
-  FloatingPointLiteral(const FloatingPointSize& size,
-                       const bool sign,
-                       const BitVector& exp,
-                       const BitVector& sig)
-      : d_fp_size(size)
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-        // clang-format on
-        ,
-        d_symuf(SymFPUUnpackedFloatLiteral(sign, exp, sig))
-#endif
-  {
-  }
-
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-  // clang-format on
-
-  /** Create a FP literal from a symFPU unpacked float. */
-  FloatingPointLiteral(const FloatingPointSize& size,
-                       SymFPUUnpackedFloatLiteral symuf)
-      : d_fp_size(size), d_symuf(symuf){};
-#endif
-
-  /** The floating-point size of this floating-point literal. */
-  FloatingPointSize d_fp_size;
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-  // clang-format on
-  /** The actual floating-point value, a SymFPU unpackedFloat. */
-  SymFPUUnpackedFloatLiteral d_symuf;
-#endif
-};
-
-/* -------------------------------------------------------------------------- */
-
-}  // namespace cvc5
-
-#endif
index 071b69912df42dbe01519b0e5d5735497ab2077c..0f46708b049e9729d731acede40ad039a27c642d 100644 (file)
@@ -13,8 +13,6 @@
  * SymFPU glue code for floating-point values.
  */
 
-#if CVC5_USE_SYMFPU
-
 #include "util/floatingpoint_literal_symfpu_traits.h"
 
 #include "base/check.h"
@@ -413,4 +411,3 @@ void traits::invariant(const traits::prop& p)
 }
 }  // namespace symfpuLiteral
 }  // namespace cvc5
-#endif
diff --git a/src/util/floatingpoint_literal_symfpu_traits.h b/src/util/floatingpoint_literal_symfpu_traits.h
new file mode 100644 (file)
index 0000000..bc5caaf
--- /dev/null
@@ -0,0 +1,259 @@
+/******************************************************************************
+ * Top contributors (to current version):
+ *   Aina Niemetz, Martin Brain, Andres Noetzli
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved.  See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * SymFPU glue code for floating-point values.
+ *
+ * !!! This header is only to be included in floating-point literal headers !!!
+ *
+ * This is a symfpu literal "back-end".  It allows the library to be used as
+ * an arbitrary precision floating-point implementation.  This is effectively
+ * the glue between symfpu's notion of "signed bit-vector" and cvc5's
+ * BitVector.
+ */
+
+#include "cvc5_private.h"
+
+#ifndef CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_TRAITS_H
+#define CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_TRAITS_H
+
+#include <symfpu/core/unpackedFloat.h>
+
+#include "util/bitvector.h"
+#include "util/floatingpoint_size.h"
+#include "util/roundingmode.h"
+
+/* -------------------------------------------------------------------------- */
+
+namespace cvc5 {
+namespace symfpuLiteral {
+
+/**
+ * Forward declaration of wrapper so that traits can be defined early and so
+ * used in the implementation of wrappedBitVector.
+ */
+template <bool T>
+class wrappedBitVector;
+
+using Cvc5BitWidth = uint32_t;
+using Cvc5Prop = bool;
+using Cvc5RM = ::cvc5::RoundingMode;
+using Cvc5FPSize = ::cvc5::FloatingPointSize;
+using Cvc5UnsignedBitVector = wrappedBitVector<false>;
+using Cvc5SignedBitVector = wrappedBitVector<true>;
+
+/**
+ * This is the template parameter for symfpu's templates.
+ */
+class traits
+{
+ public:
+  /** The six key types that symfpu uses. */
+  using bwt = Cvc5BitWidth;           // bit-width type
+  using prop = Cvc5Prop;              // boolean type
+  using rm = Cvc5RM;                  // rounding-mode type
+  using fpt = Cvc5FPSize;             // floating-point format type
+  using ubv = Cvc5UnsignedBitVector;  // unsigned bit-vector type
+  using sbv = Cvc5SignedBitVector;    // signed bit-vector type
+
+  /** Give concrete instances of each rounding mode, mainly for comparisons. */
+  static rm RNE(void);
+  static rm RNA(void);
+  static rm RTP(void);
+  static rm RTN(void);
+  static rm RTZ(void);
+
+  /** The sympfu properties. */
+  static void precondition(const prop& p);
+  static void postcondition(const prop& p);
+  static void invariant(const prop& p);
+};
+
+/**
+ * Type function for mapping between types.
+ */
+template <bool T>
+struct signedToLiteralType;
+
+template <>
+struct signedToLiteralType<true>
+{
+  using literalType = int32_t;
+};
+template <>
+struct signedToLiteralType<false>
+{
+  using literalType = uint32_t;
+};
+
+/**
+ * This extends the interface for cvc5::BitVector for compatibility with symFPU.
+ * The template parameter distinguishes signed and unsigned bit-vectors, a
+ * distinction symfpu uses.
+ */
+template <bool isSigned>
+class wrappedBitVector : public BitVector
+{
+ protected:
+  using literalType = typename signedToLiteralType<isSigned>::literalType;
+  friend wrappedBitVector<!isSigned>;  // To allow conversion between types
+
+  friend ::symfpu::ite<Cvc5Prop, wrappedBitVector<isSigned> >;  // For ITE
+
+ public:
+  /** Constructors. */
+  wrappedBitVector(const Cvc5BitWidth w, const uint32_t v) : BitVector(w, v) {}
+  wrappedBitVector(const Cvc5Prop& p) : BitVector(1, p ? 1U : 0U) {}
+  wrappedBitVector(const wrappedBitVector<isSigned>& old) : BitVector(old) {}
+  wrappedBitVector(const BitVector& old) : BitVector(old) {}
+
+  /** Get the bit-width of this wrapped bit-vector. */
+  Cvc5BitWidth getWidth(void) const { return getSize(); }
+
+  /** Create a zero value of given bit-width 'w'. */
+  static wrappedBitVector<isSigned> one(const Cvc5BitWidth& w);
+  /** Create a one value of given bit-width 'w'. */
+  static wrappedBitVector<isSigned> zero(const Cvc5BitWidth& w);
+  /** Create a ones value (all bits 1) of given bit-width 'w'. */
+  static wrappedBitVector<isSigned> allOnes(const Cvc5BitWidth& w);
+  /** Create a maximum signed/unsigned value of given bit-width 'w'. */
+  static wrappedBitVector<isSigned> maxValue(const Cvc5BitWidth& w);
+  /** Create a minimum signed/unsigned value of given bit-width 'w'. */
+  static wrappedBitVector<isSigned> minValue(const Cvc5BitWidth& w);
+
+  /** Return true if this a bit-vector representing a ones value. */
+  Cvc5Prop isAllOnes() const;
+  /** Return true if this a bit-vector representing a zero value. */
+  Cvc5Prop isAllZeros() const;
+
+  /** Left shift. */
+  wrappedBitVector<isSigned> operator<<(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Logical (unsigned) and arithmetic (signed) right shift. */
+  wrappedBitVector<isSigned> operator>>(
+      const wrappedBitVector<isSigned>& op) const;
+
+  /**
+   * Inherited but ...
+   * *sigh* if we use the inherited version then it will return a
+   * cvc5::BitVector which can be converted back to a
+   * wrappedBitVector<isSigned> but isn't done automatically when working
+   * out types for templates instantiation.  ITE is a particular
+   * problem as expressions and constants no longer derive the
+   * same type.  There aren't any good solutions in C++, we could
+   * use CRTP but Liana wouldn't appreciate that, so the following
+   * pointless wrapping functions are needed.
+   */
+
+  /** Bit-wise or. */
+  wrappedBitVector<isSigned> operator|(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-wise and. */
+  wrappedBitVector<isSigned> operator&(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector addition. */
+  wrappedBitVector<isSigned> operator+(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector subtraction. */
+  wrappedBitVector<isSigned> operator-(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector multiplication. */
+  wrappedBitVector<isSigned> operator*(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector signed/unsigned division. */
+  wrappedBitVector<isSigned> operator/(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector signed/unsigned remainder. */
+  wrappedBitVector<isSigned> operator%(
+      const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector negation. */
+  wrappedBitVector<isSigned> operator-(void) const;
+  /** Bit-wise not. */
+  wrappedBitVector<isSigned> operator~(void) const;
+
+  /** Bit-vector increment. */
+  wrappedBitVector<isSigned> increment() const;
+  /** Bit-vector decrement. */
+  wrappedBitVector<isSigned> decrement() const;
+  /**
+   * Bit-vector logical/arithmetic right shift where 'op' extended to the
+   * bit-width of this wrapped bit-vector.
+   */
+  wrappedBitVector<isSigned> signExtendRightShift(
+      const wrappedBitVector<isSigned>& op) const;
+
+  /**
+   * Modular operations.
+   * Note: No overflow checking so these are the same as other operations.
+   */
+  wrappedBitVector<isSigned> modularLeftShift(
+      const wrappedBitVector<isSigned>& op) const;
+  wrappedBitVector<isSigned> modularRightShift(
+      const wrappedBitVector<isSigned>& op) const;
+  wrappedBitVector<isSigned> modularIncrement() const;
+  wrappedBitVector<isSigned> modularDecrement() const;
+  wrappedBitVector<isSigned> modularAdd(
+      const wrappedBitVector<isSigned>& op) const;
+  wrappedBitVector<isSigned> modularNegate() const;
+
+  /** Bit-vector equality. */
+  Cvc5Prop operator==(const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector signed/unsigned less or equal than. */
+  Cvc5Prop operator<=(const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector sign/unsigned greater or equal than. */
+  Cvc5Prop operator>=(const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector signed/unsigned less than. */
+  Cvc5Prop operator<(const wrappedBitVector<isSigned>& op) const;
+  /** Bit-vector sign/unsigned greater or equal than. */
+  Cvc5Prop operator>(const wrappedBitVector<isSigned>& op) const;
+
+  /** Convert this bit-vector to a signed bit-vector. */
+  wrappedBitVector<true> toSigned(void) const;
+  /** Convert this bit-vector to an unsigned bit-vector. */
+  wrappedBitVector<false> toUnsigned(void) const;
+
+  /** Bit-vector signed/unsigned (zero) extension. */
+  wrappedBitVector<isSigned> extend(Cvc5BitWidth extension) const;
+
+  /**
+   * Create a "contracted" bit-vector by cutting off the 'reduction' number of
+   * most significant bits, i.e., by extracting the (bit-width - reduction)
+   * least significant bits.
+   */
+  wrappedBitVector<isSigned> contract(Cvc5BitWidth reduction) const;
+
+  /**
+   * Create a "resized" bit-vector of given size bei either extending (if new
+   * size is larger) or contracting (if it is smaller) this wrapped bit-vector.
+   */
+  wrappedBitVector<isSigned> resize(Cvc5BitWidth newSize) const;
+
+  /**
+   * Create an extension of this bit-vector that matches the bit-width of the
+   * given bit-vector.
+   *
+   * Note: The size of the given bit-vector may not be larger than the size of
+   *       this bit-vector.
+   */
+  wrappedBitVector<isSigned> matchWidth(
+      const wrappedBitVector<isSigned>& op) const;
+
+  /** Bit-vector concatenation. */
+  wrappedBitVector<isSigned> append(const wrappedBitVector<isSigned>& op) const;
+
+  /** Inclusive of end points, thus if the same, extracts just one bit. */
+  wrappedBitVector<isSigned> extract(Cvc5BitWidth upper,
+                                     Cvc5BitWidth lower) const;
+};
+}  // namespace symfpuLiteral
+}  // namespace cvc5
+
+#endif
diff --git a/src/util/floatingpoint_literal_symfpu_traits.h.in b/src/util/floatingpoint_literal_symfpu_traits.h.in
deleted file mode 100644 (file)
index 76d2f47..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/******************************************************************************
- * Top contributors (to current version):
- *   Aina Niemetz, Martin Brain, Andres Noetzli
- *
- * This file is part of the cvc5 project.
- *
- * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
- * in the top-level source directory and their institutional affiliations.
- * All rights reserved.  See the file COPYING in the top-level source
- * directory for licensing information.
- * ****************************************************************************
- *
- * SymFPU glue code for floating-point values.
- *
- * !!! This header is only to be included in floating-point literal headers !!!
- *
- * This is a symfpu literal "back-end".  It allows the library to be used as
- * an arbitrary precision floating-point implementation.  This is effectively
- * the glue between symfpu's notion of "signed bit-vector" and cvc5's
- * BitVector.
- */
-
-#include "cvc5_private.h"
-
-#ifndef CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_TRAITS_H
-#define CVC5__UTIL__FLOATINGPOINT_LITERAL_SYMFPU_TRAITS_H
-
-// clang-format off
-#if @CVC5_USE_SYMFPU@
-// clang-format on
-
-#include "util/bitvector.h"
-#include "util/floatingpoint_size.h"
-#include "util/roundingmode.h"
-
-#include <symfpu/core/unpackedFloat.h>
-
-/* -------------------------------------------------------------------------- */
-
-namespace cvc5 {
-namespace symfpuLiteral {
-
-/**
- * Forward declaration of wrapper so that traits can be defined early and so
- * used in the implementation of wrappedBitVector.
- */
-template <bool T>
-class wrappedBitVector;
-
-using Cvc5BitWidth = uint32_t;
-using Cvc5Prop = bool;
-using Cvc5RM = ::cvc5::RoundingMode;
-using Cvc5FPSize = ::cvc5::FloatingPointSize;
-using Cvc5UnsignedBitVector = wrappedBitVector<false>;
-using Cvc5SignedBitVector = wrappedBitVector<true>;
-
-/**
- * This is the template parameter for symfpu's templates.
- */
-class traits
-{
- public:
-  /** The six key types that symfpu uses. */
-  using bwt = Cvc5BitWidth;           // bit-width type
-  using prop = Cvc5Prop;              // boolean type
-  using rm = Cvc5RM;                  // rounding-mode type
-  using fpt = Cvc5FPSize;             // floating-point format type
-  using ubv = Cvc5UnsignedBitVector;  // unsigned bit-vector type
-  using sbv = Cvc5SignedBitVector;    // signed bit-vector type
-
-  /** Give concrete instances of each rounding mode, mainly for comparisons. */
-  static rm RNE(void);
-  static rm RNA(void);
-  static rm RTP(void);
-  static rm RTN(void);
-  static rm RTZ(void);
-
-  /** The sympfu properties. */
-  static void precondition(const prop& p);
-  static void postcondition(const prop& p);
-  static void invariant(const prop& p);
-};
-
-/**
- * Type function for mapping between types.
- */
-template <bool T>
-struct signedToLiteralType;
-
-template <>
-struct signedToLiteralType<true>
-{
-  using literalType = int32_t;
-};
-template <>
-struct signedToLiteralType<false>
-{
-  using literalType = uint32_t;
-};
-
-/**
- * This extends the interface for cvc5::BitVector for compatibility with symFPU.
- * The template parameter distinguishes signed and unsigned bit-vectors, a
- * distinction symfpu uses.
- */
-template <bool isSigned>
-class wrappedBitVector : public BitVector
-{
- protected:
-  using literalType = typename signedToLiteralType<isSigned>::literalType;
-  friend wrappedBitVector<!isSigned>;  // To allow conversion between types
-
-  friend ::symfpu::ite<Cvc5Prop, wrappedBitVector<isSigned> >;  // For ITE
-
- public:
-  /** Constructors. */
-  wrappedBitVector(const Cvc5BitWidth w, const uint32_t v) : BitVector(w, v) {}
-  wrappedBitVector(const Cvc5Prop& p) : BitVector(1, p ? 1U : 0U) {}
-  wrappedBitVector(const wrappedBitVector<isSigned>& old) : BitVector(old) {}
-  wrappedBitVector(const BitVector& old) : BitVector(old) {}
-
-  /** Get the bit-width of this wrapped bit-vector. */
-  Cvc5BitWidth getWidth(void) const { return getSize(); }
-
-  /** Create a zero value of given bit-width 'w'. */
-  static wrappedBitVector<isSigned> one(const Cvc5BitWidth& w);
-  /** Create a one value of given bit-width 'w'. */
-  static wrappedBitVector<isSigned> zero(const Cvc5BitWidth& w);
-  /** Create a ones value (all bits 1) of given bit-width 'w'. */
-  static wrappedBitVector<isSigned> allOnes(const Cvc5BitWidth& w);
-  /** Create a maximum signed/unsigned value of given bit-width 'w'. */
-  static wrappedBitVector<isSigned> maxValue(const Cvc5BitWidth& w);
-  /** Create a minimum signed/unsigned value of given bit-width 'w'. */
-  static wrappedBitVector<isSigned> minValue(const Cvc5BitWidth& w);
-
-  /** Return true if this a bit-vector representing a ones value. */
-  Cvc5Prop isAllOnes() const;
-  /** Return true if this a bit-vector representing a zero value. */
-  Cvc5Prop isAllZeros() const;
-
-  /** Left shift. */
-  wrappedBitVector<isSigned> operator<<(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Logical (unsigned) and arithmetic (signed) right shift. */
-  wrappedBitVector<isSigned> operator>>(
-      const wrappedBitVector<isSigned>& op) const;
-
-  /**
-   * Inherited but ...
-   * *sigh* if we use the inherited version then it will return a
-   * cvc5::BitVector which can be converted back to a
-   * wrappedBitVector<isSigned> but isn't done automatically when working
-   * out types for templates instantiation.  ITE is a particular
-   * problem as expressions and constants no longer derive the
-   * same type.  There aren't any good solutions in C++, we could
-   * use CRTP but Liana wouldn't appreciate that, so the following
-   * pointless wrapping functions are needed.
-   */
-
-  /** Bit-wise or. */
-  wrappedBitVector<isSigned> operator|(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-wise and. */
-  wrappedBitVector<isSigned> operator&(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector addition. */
-  wrappedBitVector<isSigned> operator+(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector subtraction. */
-  wrappedBitVector<isSigned> operator-(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector multiplication. */
-  wrappedBitVector<isSigned> operator*(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector signed/unsigned division. */
-  wrappedBitVector<isSigned> operator/(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector signed/unsigned remainder. */
-  wrappedBitVector<isSigned> operator%(
-      const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector negation. */
-  wrappedBitVector<isSigned> operator-(void) const;
-  /** Bit-wise not. */
-  wrappedBitVector<isSigned> operator~(void) const;
-
-  /** Bit-vector increment. */
-  wrappedBitVector<isSigned> increment() const;
-  /** Bit-vector decrement. */
-  wrappedBitVector<isSigned> decrement() const;
-  /**
-   * Bit-vector logical/arithmetic right shift where 'op' extended to the
-   * bit-width of this wrapped bit-vector.
-   */
-  wrappedBitVector<isSigned> signExtendRightShift(
-      const wrappedBitVector<isSigned>& op) const;
-
-  /**
-   * Modular operations.
-   * Note: No overflow checking so these are the same as other operations.
-   */
-  wrappedBitVector<isSigned> modularLeftShift(
-      const wrappedBitVector<isSigned>& op) const;
-  wrappedBitVector<isSigned> modularRightShift(
-      const wrappedBitVector<isSigned>& op) const;
-  wrappedBitVector<isSigned> modularIncrement() const;
-  wrappedBitVector<isSigned> modularDecrement() const;
-  wrappedBitVector<isSigned> modularAdd(
-      const wrappedBitVector<isSigned>& op) const;
-  wrappedBitVector<isSigned> modularNegate() const;
-
-  /** Bit-vector equality. */
-  Cvc5Prop operator==(const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector signed/unsigned less or equal than. */
-  Cvc5Prop operator<=(const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector sign/unsigned greater or equal than. */
-  Cvc5Prop operator>=(const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector signed/unsigned less than. */
-  Cvc5Prop operator<(const wrappedBitVector<isSigned>& op) const;
-  /** Bit-vector sign/unsigned greater or equal than. */
-  Cvc5Prop operator>(const wrappedBitVector<isSigned>& op) const;
-
-  /** Convert this bit-vector to a signed bit-vector. */
-  wrappedBitVector<true> toSigned(void) const;
-  /** Convert this bit-vector to an unsigned bit-vector. */
-  wrappedBitVector<false> toUnsigned(void) const;
-
-  /** Bit-vector signed/unsigned (zero) extension. */
-  wrappedBitVector<isSigned> extend(Cvc5BitWidth extension) const;
-
-  /**
-   * Create a "contracted" bit-vector by cutting off the 'reduction' number of
-   * most significant bits, i.e., by extracting the (bit-width - reduction)
-   * least significant bits.
-   */
-  wrappedBitVector<isSigned> contract(Cvc5BitWidth reduction) const;
-
-  /**
-   * Create a "resized" bit-vector of given size bei either extending (if new
-   * size is larger) or contracting (if it is smaller) this wrapped bit-vector.
-   */
-  wrappedBitVector<isSigned> resize(Cvc5BitWidth newSize) const;
-
-  /**
-   * Create an extension of this bit-vector that matches the bit-width of the
-   * given bit-vector.
-   *
-   * Note: The size of the given bit-vector may not be larger than the size of
-   *       this bit-vector.
-   */
-  wrappedBitVector<isSigned> matchWidth(
-      const wrappedBitVector<isSigned>& op) const;
-
-  /** Bit-vector concatenation. */
-  wrappedBitVector<isSigned> append(const wrappedBitVector<isSigned>& op) const;
-
-  /** Inclusive of end points, thus if the same, extracts just one bit. */
-  wrappedBitVector<isSigned> extract(Cvc5BitWidth upper,
-                                     Cvc5BitWidth lower) const;
-};
-}  // namespace symfpuLiteral
-}
-
-#endif
-#endif
index f84d99f4207c753cbddaddf232ef008e603151fa..8e0853682e44e0ab995df483962ac3e56d581001 100644 (file)
@@ -19,7 +19,6 @@ using namespace cvc5::api;
 
 int main()
 {
-#ifdef CVC5_USE_SYMFPU
   Solver slv;
   Sort sort_int = slv.getIntegerSort();
   Sort sort_array = slv.mkArraySort(sort_int, sort_int);
@@ -33,6 +32,5 @@ int main()
   Term rem = slv.mkTerm(FLOATINGPOINT_REM, ite, const1);
   Term isnan = slv.mkTerm(FLOATINGPOINT_ISNAN, rem);
   slv.checkSatAssuming(isnan);
-#endif
   return 0;
 }
index 44ce684dd65c67452f3d060b823c46dbd8c98dae..1255bf270310b7e9d7189900c02dab02375661c5 100644 (file)
@@ -32,11 +32,7 @@ def test_recoverable_exception(solver):
 
 
 def test_supports_floating_point(solver):
-    if solver.supportsFloatingPoint():
-        solver.mkRoundingMode(pycvc5.RoundNearestTiesToEven)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkRoundingMode(pycvc5.RoundNearestTiesToEven)
+    solver.mkRoundingMode(pycvc5.RoundNearestTiesToEven)
 
 
 def test_get_boolean_sort(solver):
@@ -60,11 +56,7 @@ def test_get_string_sort(solver):
 
 
 def test_get_rounding_mode_sort(solver):
-    if solver.supportsFloatingPoint():
-        solver.getRoundingModeSort()
-    else:
-        with pytest.raises(RuntimeError):
-            solver.getRoundingModeSort()
+    solver.getRoundingModeSort()
 
 
 def test_mk_array_sort(solver):
@@ -79,10 +71,9 @@ def test_mk_array_sort(solver):
     solver.mkArraySort(boolSort, intSort)
     solver.mkArraySort(realSort, bvSort)
 
-    if (solver.supportsFloatingPoint()):
-        fpSort = solver.mkFloatingPointSort(3, 5)
-        solver.mkArraySort(fpSort, fpSort)
-        solver.mkArraySort(bvSort, fpSort)
+    fpSort = solver.mkFloatingPointSort(3, 5)
+    solver.mkArraySort(fpSort, fpSort)
+    solver.mkArraySort(bvSort, fpSort)
 
     slv = pycvc5.Solver()
     with pytest.raises(RuntimeError):
@@ -96,15 +87,11 @@ def test_mk_bit_vector_sort(solver):
 
 
 def test_mk_floating_point_sort(solver):
-    if solver.supportsFloatingPoint():
-        solver.mkFloatingPointSort(4, 8)
-        with pytest.raises(RuntimeError):
-            solver.mkFloatingPointSort(0, 8)
-        with pytest.raises(RuntimeError):
-            solver.mkFloatingPointSort(4, 0)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkFloatingPointSort(4, 8)
+    solver.mkFloatingPointSort(4, 8)
+    with pytest.raises(RuntimeError):
+        solver.mkFloatingPointSort(0, 8)
+    with pytest.raises(RuntimeError):
+        solver.mkFloatingPointSort(4, 0)
 
 
 def test_mk_datatype_sort(solver):
@@ -313,11 +300,7 @@ def test_mk_boolean(solver):
 
 
 def test_mk_rounding_mode(solver):
-    if solver.supportsFloatingPoint():
-        solver.mkRoundingMode(pycvc5.RoundTowardZero)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkRoundingMode(pycvc5.RoundTowardZero)
+    solver.mkRoundingMode(pycvc5.RoundTowardZero)
 
 
 def test_mk_uninterpreted_const(solver):
@@ -333,11 +316,7 @@ def test_mk_floating_point(solver):
     t1 = solver.mkBitVector(8)
     t2 = solver.mkBitVector(4)
     t3 = solver.mkInteger(2)
-    if (solver.supportsFloatingPoint()):
-        solver.mkFloatingPoint(3, 5, t1)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkFloatingPoint(3, 5, t1)
+    solver.mkFloatingPoint(3, 5, t1)
 
     with pytest.raises(RuntimeError):
         solver.mkFloatingPoint(0, 5, pycvc5.Term(solver))
@@ -350,10 +329,9 @@ def test_mk_floating_point(solver):
     with pytest.raises(RuntimeError):
         solver.mkFloatingPoint(3, 5, t2)
 
-    if (solver.supportsFloatingPoint()):
-        slv = pycvc5.Solver()
-        with pytest.raises(RuntimeError):
-            slv.mkFloatingPoint(3, 5, t1)
+    slv = pycvc5.Solver()
+    with pytest.raises(RuntimeError):
+        slv.mkFloatingPoint(3, 5, t1)
 
 
 def test_mk_empty_set(solver):
@@ -382,43 +360,23 @@ def test_mk_false(solver):
 
 
 def test_mk_nan(solver):
-    if (solver.supportsFloatingPoint()):
-        solver.mkNaN(3, 5)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkNaN(3, 5)
+    solver.mkNaN(3, 5)
 
 
 def test_mk_neg_zero(solver):
-    if (solver.supportsFloatingPoint()):
-        solver.mkNegZero(3, 5)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkNegZero(3, 5)
+    solver.mkNegZero(3, 5)
 
 
 def test_mk_neg_inf(solver):
-    if (solver.supportsFloatingPoint()):
-        solver.mkNegInf(3, 5)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkNegInf(3, 5)
+    solver.mkNegInf(3, 5)
 
 
 def test_mk_pos_inf(solver):
-    if (solver.supportsFloatingPoint()):
-        solver.mkPosInf(3, 5)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkPosInf(3, 5)
+    solver.mkPosInf(3, 5)
 
 
 def test_mk_pos_zero(solver):
-    if (solver.supportsFloatingPoint()):
-        solver.mkPosZero(3, 5)
-    else:
-        with pytest.raises(RuntimeError):
-            solver.mkPosZero(3, 5)
+    solver.mkPosZero(3, 5)
 
 
 def test_mk_pi(solver):
index 5e86382eed026fd9a76365df1a663213290a4025..def539cf439f78e9facf7a69419061b093352902 100644 (file)
@@ -89,9 +89,8 @@ def test_is_reg_exp(solver):
 
 
 def test_is_rounding_mode(solver):
-    if solver.supportsFloatingPoint():
-        assert solver.getRoundingModeSort().isRoundingMode()
-        Sort(solver).isRoundingMode()
+    assert solver.getRoundingModeSort().isRoundingMode()
+    Sort(solver).isRoundingMode()
 
 
 def test_is_bit_vector(solver):
@@ -100,9 +99,8 @@ def test_is_bit_vector(solver):
 
 
 def test_is_floating_point(solver):
-    if solver.supportsFloatingPoint():
-        assert solver.mkFloatingPointSort(8, 24).isFloatingPoint()
-        Sort(solver).isFloatingPoint()
+    assert solver.mkFloatingPointSort(8, 24).isFloatingPoint()
+    Sort(solver).isFloatingPoint()
 
 
 def test_is_datatype(solver):
@@ -447,21 +445,19 @@ def test_get_bv_size(solver):
 
 
 def test_get_fp_exponent_size(solver):
-    if solver.supportsFloatingPoint():
-        fpSort = solver.mkFloatingPointSort(4, 8)
-        fpSort.getFPExponentSize()
-        setSort = solver.mkSetSort(solver.getIntegerSort())
-        with pytest.raises(RuntimeError):
-            setSort.getFPExponentSize()
+    fpSort = solver.mkFloatingPointSort(4, 8)
+    fpSort.getFPExponentSize()
+    setSort = solver.mkSetSort(solver.getIntegerSort())
+    with pytest.raises(RuntimeError):
+        setSort.getFPExponentSize()
 
 
 def test_get_fp_significand_size(solver):
-    if solver.supportsFloatingPoint():
-        fpSort = solver.mkFloatingPointSort(4, 8)
-        fpSort.getFPSignificandSize()
-        setSort = solver.mkSetSort(solver.getIntegerSort())
-        with pytest.raises(RuntimeError):
-            setSort.getFPSignificandSize()
+    fpSort = solver.mkFloatingPointSort(4, 8)
+    fpSort.getFPSignificandSize()
+    setSort = solver.mkSetSort(solver.getIntegerSort())
+    with pytest.raises(RuntimeError):
+        setSort.getFPSignificandSize()
 
 
 def test_get_datatype_paramsorts(solver):
index efd79472b9fe515d6a37987032203f0fe033a51e..ca6fc30abbf71100332e249c851b91dcac5ffb11 100644 (file)
@@ -115,11 +115,11 @@ configurations. The `REQUIRES` directive can be used to only run
 a given benchmark when a feature is supported. For example:
 
 ```
-; REQUIRES: symfpu
+; REQUIRES: cryptominisat
 ```
 
-This benchmark is only run when symfpu has been configured.  Multiple
+This benchmark is only run when CryptoMiniSat has been configured.  Multiple
 `REQUIRES` directives are supported. For a list of features that can be listed
 as a requirement, refer to cvc5's `--show-config` output. Features can also be
-excluded by adding the `no-` prefix, e.g. `no-symfpu` means that the test is
-not valid for builds that include symfpu support.
+excluded by adding the `no-` prefix, e.g. `no-cryptominisat` means that the
+test is not valid for builds that include CryptoMiniSat support.
index b5aa0452efa7b2f15ca4b5312217302d389b7bc3..ae7117047d213e94adb8e73854a3067e9e7b7e06 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: sat
 (set-logic QF_FP)
index ad603f8c984d9526c9b481caae7c15bbaec950a6..3040f9ba95ea0984c893511cb38459a2230d5cf1 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: unsat
 (set-logic QF_FP)
index dc99ff144095771757aa31c7ae83894629e46837..62314f2846c62087bff5866683da6495c47a4be5 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: unsat
 
index 726487e18cf1aaa71a82d06ddaebf7c0fb481d03..3fb3a9e53348c607f6f825fc4729a148e1bf92ab 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --ext-rew-prep --ext-rew-prep-agg
 ; EXPECT: unsat
 (set-info :smt-lib-version 2.6)
index 3211339d65a49e35726f618c1fe5f11e383dad91..226d6589c13ab4859cc664605d2b8cbb066c6406 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: unsat
 (set-logic QF_BVFP)
index c02f8d3049bc8c19dd6487d11ee4ae4cd7bf2732..6939e478ad59153d11312617b194dade22e14601 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 (set-logic QF_FP)
 (declare-const r RoundingMode)
index 8c361163cb7b103d29e4472986a7e8c8d4528546..741d77a19258fb737929016d090d8287db677e9a 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 (set-logic QF_FP)
 (declare-fun fpv5 () Float32)
index 68a17347ef567272b5578b764de74e013bf0c891..6a58b371fe195d31e032aa34bcac770bf98e21fb 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: -q
 ; EXPECT: sat
 (set-logic QF_FP)
index 2de76b68078847ec0eb5e334664c56e9c3a6314c..c06cdb1105d2212c09269777ad0c832063b05a56 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 (set-logic QF_FP)
 (declare-fun bv () (_ BitVec 1))
index 3e0858035eafa36be1795cac6ec5d244b60eb632..ab3c781bb67297b0e2ea7a7dde7c13c8ed6c9fcb 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: -q
 ; EXPECT: sat
 (set-logic QF_FPLRA)
index c42bad2356eb1a7dbcf90e2badb36c6899d19802..d1fbc73d285615002aee5e8e3b4a19f28f334672 100644 (file)
@@ -1,6 +1,5 @@
 ; COMMAND-LINE: -q
 ; EXPECT: sat
-; REQUIRES: symfpu
 (set-logic HO_ALL)
 (set-option :assign-function-values false)
 (set-info :status sat)
index d4393486c23705b1f75c5e30dc9bf2e220246beb..911db54eeb2db48ae738e4a3765415a866c06833 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: sat
 (set-logic QF_FP)
 (declare-fun a () (_ FloatingPoint 53 11))
index 2ad9ac92121d6705c99c8e582ee52f2f8cdbf59b..d66e6aec78b51441bbf66fef28bad6e9ba73f6a2 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: sat
 (set-logic QF_FP)
 (declare-fun a () RoundingMode)
index 056a98afc6822331a2f1709f4769da92e04e8204..3ec9f159475b03378b6ab4afdceb605a64abff78 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: sat
 ; EXPECT: ((((_ to_fp 5 11) roundNearestTiesToAway (/ 1 10)) (fp #b0 #b01011 #b1001100110)))
 (set-logic ALL)
index 2c837b415d5c4be2c35879a11c75155a50c31010..724e08b8c7ef4b3a2cefb1bfced25c8a1fecb874 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu\r
 ; COMMAND-LINE: --fp-exp\r
 ; EXPECT: unsat\r
 \r
index 0b4a11f0801878f2e2481431ba32d601e3cd6e21..754186943dce6fb79a4e2b800d4bfec884b16322 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 (set-logic QF_FP)    
 (declare-const x Float32)
index 7694d8a35fb198cbe9e70579cf0d3840ebb09627..298c21b187763d0b3985f33ab28e6065f18e0ac0 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: sat
 
index 848567e2c08beb7bdb6cef6aa0c0f811b47fb755..971602e148fc93c4c4bf5dba212f86550f474793 100644 (file)
@@ -1,5 +1,4 @@
 ; COMMAND-LINE: --bv-to-bool
-; REQUIRES: symfpu
 (set-logic ALL)
 (set-info :status sat)
 (declare-fun c () (Array (_ BitVec 2) (_ BitVec 1)))
index 277209ff87961a1851c46308abf98bf3aa8e2dcd..1cd83816ac74aa417fcf4a991ec56ed56b5d66db 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --strict-parsing -q
 ; EXPECT: sat
 (set-logic QF_FP)
index 3e94e6e0590b900549197fa75d27901abefceaff..6c0b68c95566649cfcc383a07ab813f0806a60c7 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --fp-exp
 ; EXPECT: unsat
 
index 1ee8e6c115e52c12cf9a0137554cad693d5cf5f6..3ab7495eacd20135a268c22e418215ed6f5d0d03 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 (set-info :smt-lib-version 2.6)
 (set-logic FP)
 (set-info :status unsat)
index 796d7e753fd050c4619d0cd86f83f444dd24ed9a..d30bd563df304a2136daa2aafbb5539fcae3b735 100644 (file)
@@ -1,5 +1,4 @@
 ; COMMAND-LINE: --no-jh-rlv-order
-; REQUIRES: symfpu
 ; EXPECT: unsat
 (set-logic AUFBVFPDTNIRA)
 (set-info :status unsat)
index 30828ca76b17d344f81eb2326bbc6372a5183171..2970fd0de53bb38726a13efb2c00f3787a613a3b 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --lang=sygus2 --sygus-rr --sygus-samples=0 --sygus-rr-synth-check --sygus-abort-size=1 --sygus-rr-verify-abort --no-sygus-sym-break --fp-exp
 ; EXPECT: (error "Maximum term size (1) for enumerative SyGuS exceeded.")
 ; SCRUBBER: grep -v -E '(\(define-fun|\(rewrite)'
index 6704198c3de0ba9cc8653dd11af06e2381d49b13..e4b3a0facf50c3770c7cd7e686b692a39768959b 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --lang=sygus2 --sygus-rr --sygus-samples=0 --sygus-rr-synth-check --sygus-abort-size=1 --sygus-rr-verify-abort --no-sygus-sym-break --fp-exp
 ; EXPECT: (error "Maximum term size (1) for enumerative SyGuS exceeded.")
 ; SCRUBBER: grep -v -E '(\(define-fun|\(rewrite)'
index fa8bdc2d73513eaab21ed091fef4b1a5098ffc75..385ade07f6413c6c9ffd6cba9fbf556c2394ffc0 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status
 (set-logic ALL)
index c674c40394b6dcd81841a6a1294de252107f0610..4648c327ad8b32405b355bc729660b38f547bc34 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; COMMAND-LINE: --decision=internal -q
 ; COMMAND-LINE: --decision=justification -q
 ; EXPECT: sat
index c0cae002515f5897222c077ef76e3c4e637ecc01..8c0e2d82b43c963e76d4ca25cc224526ea9129d6 100644 (file)
@@ -1,4 +1,3 @@
-; REQUIRES: symfpu
 ; EXPECT: unsat
 ; COMMAND-LINE: --lang=sygus2 --sygus-out=status --fp-exp
 (set-logic ALL)
index 018207293732050a3de4aa9f14b0e4e36a34ceda..20e0977f8d1aa51cb9beaeaeea07c09255672ebd 100644 (file)
@@ -35,15 +35,7 @@ TEST_F(TestApiBlackSolver, recoverableException)
 
 TEST_F(TestApiBlackSolver, supportsFloatingPoint)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkRoundingMode(ROUND_NEAREST_TIES_TO_EVEN));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkRoundingMode(ROUND_NEAREST_TIES_TO_EVEN),
-                 CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkRoundingMode(ROUND_NEAREST_TIES_TO_EVEN));
 }
 
 TEST_F(TestApiBlackSolver, getBooleanSort)
@@ -78,14 +70,7 @@ TEST_F(TestApiBlackSolver, getStringSort)
 
 TEST_F(TestApiBlackSolver, getRoundingModeSort)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.getRoundingModeSort());
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.getRoundingModeSort(), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.getRoundingModeSort());
 }
 
 TEST_F(TestApiBlackSolver, mkArraySort)
@@ -101,12 +86,9 @@ TEST_F(TestApiBlackSolver, mkArraySort)
   ASSERT_NO_THROW(d_solver.mkArraySort(boolSort, intSort));
   ASSERT_NO_THROW(d_solver.mkArraySort(realSort, bvSort));
 
-  if (d_solver.supportsFloatingPoint())
-  {
-    Sort fpSort = d_solver.mkFloatingPointSort(3, 5);
-    ASSERT_NO_THROW(d_solver.mkArraySort(fpSort, fpSort));
-    ASSERT_NO_THROW(d_solver.mkArraySort(bvSort, fpSort));
-  }
+  Sort fpSort = d_solver.mkFloatingPointSort(3, 5);
+  ASSERT_NO_THROW(d_solver.mkArraySort(fpSort, fpSort));
+  ASSERT_NO_THROW(d_solver.mkArraySort(bvSort, fpSort));
 
   Solver slv;
   ASSERT_THROW(slv.mkArraySort(boolSort, boolSort), CVC5ApiException);
@@ -120,16 +102,9 @@ TEST_F(TestApiBlackSolver, mkBitVectorSort)
 
 TEST_F(TestApiBlackSolver, mkFloatingPointSort)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkFloatingPointSort(4, 8));
-    ASSERT_THROW(d_solver.mkFloatingPointSort(0, 8), CVC5ApiException);
-    ASSERT_THROW(d_solver.mkFloatingPointSort(4, 0), CVC5ApiException);
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkFloatingPointSort(4, 8), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkFloatingPointSort(4, 8));
+  ASSERT_THROW(d_solver.mkFloatingPointSort(0, 8), CVC5ApiException);
+  ASSERT_THROW(d_solver.mkFloatingPointSort(4, 0), CVC5ApiException);
 }
 
 TEST_F(TestApiBlackSolver, mkDatatypeSort)
@@ -377,15 +352,7 @@ TEST_F(TestApiBlackSolver, mkBoolean)
 
 TEST_F(TestApiBlackSolver, mkRoundingMode)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkRoundingMode(RoundingMode::ROUND_TOWARD_ZERO));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkRoundingMode(RoundingMode::ROUND_TOWARD_ZERO),
-                 CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkRoundingMode(RoundingMode::ROUND_TOWARD_ZERO));
 }
 
 TEST_F(TestApiBlackSolver, mkUninterpretedConst)
@@ -420,25 +387,15 @@ TEST_F(TestApiBlackSolver, mkFloatingPoint)
   Term t1 = d_solver.mkBitVector(8);
   Term t2 = d_solver.mkBitVector(4);
   Term t3 = d_solver.mkInteger(2);
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkFloatingPoint(3, 5, t1));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t1), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkFloatingPoint(3, 5, t1));
   ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, Term()), CVC5ApiException);
   ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, t1), CVC5ApiException);
   ASSERT_THROW(d_solver.mkFloatingPoint(3, 0, t1), CVC5ApiException);
   ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC5ApiException);
   ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC5ApiException);
 
-  if (d_solver.supportsFloatingPoint())
-  {
-    Solver slv;
-    ASSERT_THROW(slv.mkFloatingPoint(3, 5, t1), CVC5ApiException);
-  }
+  Solver slv;
+  ASSERT_THROW(slv.mkFloatingPoint(3, 5, t1), CVC5ApiException);
 }
 
 TEST_F(TestApiBlackSolver, mkEmptySet)
@@ -478,64 +435,26 @@ TEST_F(TestApiBlackSolver, mkFalse)
   ASSERT_NO_THROW(d_solver.mkFalse());
 }
 
-TEST_F(TestApiBlackSolver, mkNaN)
-{
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkNaN(3, 5));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkNaN(3, 5), CVC5ApiException);
-  }
-}
+TEST_F(TestApiBlackSolver, mkNaN) { ASSERT_NO_THROW(d_solver.mkNaN(3, 5)); }
 
 TEST_F(TestApiBlackSolver, mkNegZero)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkNegZero(3, 5));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkNegZero(3, 5), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkNegZero(3, 5));
 }
 
 TEST_F(TestApiBlackSolver, mkNegInf)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkNegInf(3, 5));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkNegInf(3, 5), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkNegInf(3, 5));
 }
 
 TEST_F(TestApiBlackSolver, mkPosInf)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkPosInf(3, 5));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkPosInf(3, 5), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkPosInf(3, 5));
 }
 
 TEST_F(TestApiBlackSolver, mkPosZero)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_NO_THROW(d_solver.mkPosZero(3, 5));
-  }
-  else
-  {
-    ASSERT_THROW(d_solver.mkPosZero(3, 5), CVC5ApiException);
-  }
+  ASSERT_NO_THROW(d_solver.mkPosZero(3, 5));
 }
 
 TEST_F(TestApiBlackSolver, mkOp)
index d1b096bda07c9552f1f83956dba2092d20e5274b..757bacad630e12425b3ac6c7557416fd0a0f5837 100644 (file)
@@ -95,11 +95,8 @@ TEST_F(TestApiBlackSort, isRegExp)
 
 TEST_F(TestApiBlackSort, isRoundingMode)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_TRUE(d_solver.getRoundingModeSort().isRoundingMode());
-    ASSERT_NO_THROW(Sort().isRoundingMode());
-  }
+  ASSERT_TRUE(d_solver.getRoundingModeSort().isRoundingMode());
+  ASSERT_NO_THROW(Sort().isRoundingMode());
 }
 
 TEST_F(TestApiBlackSort, isBitVector)
@@ -110,11 +107,8 @@ TEST_F(TestApiBlackSort, isBitVector)
 
 TEST_F(TestApiBlackSort, isFloatingPoint)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    ASSERT_TRUE(d_solver.mkFloatingPointSort(8, 24).isFloatingPoint());
-    ASSERT_NO_THROW(Sort().isFloatingPoint());
-  }
+  ASSERT_TRUE(d_solver.mkFloatingPointSort(8, 24).isFloatingPoint());
+  ASSERT_NO_THROW(Sort().isFloatingPoint());
 }
 
 TEST_F(TestApiBlackSort, isDatatype)
@@ -486,24 +480,18 @@ TEST_F(TestApiBlackSort, getBVSize)
 
 TEST_F(TestApiBlackSort, getFPExponentSize)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
-    ASSERT_NO_THROW(fpSort.getFPExponentSize());
-    Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
-    ASSERT_THROW(setSort.getFPExponentSize(), CVC5ApiException);
-  }
+  Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
+  ASSERT_NO_THROW(fpSort.getFPExponentSize());
+  Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
+  ASSERT_THROW(setSort.getFPExponentSize(), CVC5ApiException);
 }
 
 TEST_F(TestApiBlackSort, getFPSignificandSize)
 {
-  if (d_solver.supportsFloatingPoint())
-  {
-    Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
-    ASSERT_NO_THROW(fpSort.getFPSignificandSize());
-    Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
-    ASSERT_THROW(setSort.getFPSignificandSize(), CVC5ApiException);
-  }
+  Sort fpSort = d_solver.mkFloatingPointSort(4, 8);
+  ASSERT_NO_THROW(fpSort.getFPSignificandSize());
+  Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort());
+  ASSERT_THROW(setSort.getFPSignificandSize(), CVC5ApiException);
 }
 
 TEST_F(TestApiBlackSort, getDatatypeParamSorts)
index 7a6e34abb10d7094ead0ec0f348298143c180e2b..e999297fd2ea9304aaca1420875ca79758c07608 100644 (file)
@@ -616,28 +616,14 @@ TEST_F(TestTheoryWhiteLogicInfo, default_logic)
   info.arithOnlyLinear();
   info.disableIntegers();
   info.lock();
-  if (cvc5::Configuration::isBuiltWithSymFPU())
-  {
-    ASSERT_EQ(info.getLogicString(), "SEP_AUFBVFPDTLRA");
-  }
-  else
-  {
-    ASSERT_EQ(info.getLogicString(), "SEP_AUFBVDTLRA");
-  }
+  ASSERT_EQ(info.getLogicString(), "SEP_AUFBVFPDTLRA");
 
   info = info.getUnlockedCopy();
   ASSERT_FALSE(info.isLocked());
   info.disableQuantifiers();
   info.disableTheory(THEORY_BAGS);
   info.lock();
-  if (cvc5::Configuration::isBuiltWithSymFPU())
-  {
-    ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFBVFPDTLRA");
-  }
-  else
-  {
-    ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFBVDTLRA");
-  }
+  ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFBVFPDTLRA");
 
   info = info.getUnlockedCopy();
   ASSERT_FALSE(info.isLocked());
@@ -647,14 +633,7 @@ TEST_F(TestTheoryWhiteLogicInfo, default_logic)
   info.enableIntegers();
   info.disableReals();
   info.lock();
-  if (cvc5::Configuration::isBuiltWithSymFPU())
-  {
-    ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFFPLIA");
-  }
-  else
-  {
-    ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFLIA");
-  }
+  ASSERT_EQ(info.getLogicString(), "QF_SEP_AUFFPLIA");
 
   info = info.getUnlockedCopy();
   ASSERT_FALSE(info.isLocked());
index 26ab40614ce6b0bc2f2fc86602c960fbb646ec46..c1630a203f9136f67ef47f2a85c85d17f37374e4 100644 (file)
@@ -24,9 +24,7 @@ cvc5_add_unit_test_white(check_white util)
 cvc5_add_unit_test_black(configuration_black util)
 cvc5_add_unit_test_black(datatype_black util)
 cvc5_add_unit_test_black(exception_black util)
-if(CVC5_USE_SYMFPU)
 cvc5_add_unit_test_black(floatingpoint_black util)
-endif()
 cvc5_add_unit_test_black(integer_black util)
 cvc5_add_unit_test_white(integer_white util)
 cvc5_add_unit_test_black(output_black util)