Move cvc5::internal::context to cvc5::context. (#8451)
authorMathias Preiner <mathias.preiner@gmail.com>
Wed, 30 Mar 2022 22:16:46 +0000 (15:16 -0700)
committerGitHub <noreply@github.com>
Wed, 30 Mar 2022 22:16:46 +0000 (22:16 +0000)
137 files changed:
src/base/check.h
src/base/exception.h
src/base/map_util.h
src/base/output.h
src/base/versioninfo.cpp.in
src/context/cdhashmap.h
src/context/cdhashmap_forward.h
src/context/cdhashset.h
src/context/cdhashset_forward.h
src/context/cdinsert_hashmap.h
src/context/cdinsert_hashmap_forward.h
src/context/cdlist.h
src/context/cdlist_forward.h
src/context/cdmaybe.h
src/context/cdo.h
src/context/cdqueue.h
src/context/cdtrail_queue.h
src/context/context.cpp
src/context/context.h
src/context/context_mm.cpp
src/context/context_mm.h
src/expr/kind_template.cpp
src/expr/kind_template.h
src/expr/metakind_template.cpp
src/expr/metakind_template.h
src/expr/node_value.h
src/expr/symbol_manager.cpp
src/expr/symbol_table.cpp
src/preprocessing/learned_literal_manager.h
src/preprocessing/passes/unconstrained_simplifier.h
src/prop/minisat/core/Solver.cc
src/prop/minisat/core/Solver.h
src/prop/minisat/minisat.h
src/prop/minisat/simp/SimpSolver.cc
src/prop/minisat/simp/SimpSolver.h
src/prop/sat_solver.h
src/smt/env.h
src/smt/env_obj.h
src/smt/solver_engine.cpp
src/smt/solver_engine.h
src/theory/arith/arith_static_learner.cpp
src/theory/arith/arith_static_learner.h
src/theory/arith/congruence_manager.h
src/theory/arith/constraint.cpp
src/theory/arith/constraint.h
src/theory/arith/dio_solver.h
src/theory/arith/nl/coverings/proof_generator.cpp
src/theory/arith/nl/nl_model.h
src/theory/arith/partial_model.cpp
src/theory/arith/partial_model.h
src/theory/arith/theory_arith_private.h
src/theory/arrays/array_info.cpp
src/theory/arrays/array_info.h
src/theory/arrays/theory_arrays.cpp
src/theory/arrays/theory_arrays.h
src/theory/arrays/union_find.h
src/theory/atom_requests.cpp
src/theory/bags/bag_solver.cpp
src/theory/bags/card_solver.cpp
src/theory/bv/bv_solver_bitblast.cpp
src/theory/bv/int_blaster.h
src/theory/datatypes/sygus_extension.cpp
src/theory/datatypes/theory_datatypes.cpp
src/theory/datatypes/theory_datatypes.h
src/theory/engine_output_channel.h
src/theory/fp/fp_word_blaster.cpp
src/theory/fp/theory_fp.cpp
src/theory/fp/theory_fp_rewriter.cpp
src/theory/quantifiers/candidate_rewrite_database.cpp
src/theory/quantifiers/cegqi/ceg_arith_instantiator.cpp
src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp
src/theory/quantifiers/conjecture_generator.cpp
src/theory/quantifiers/conjecture_generator.h
src/theory/quantifiers/ematching/instantiation_engine.cpp
src/theory/quantifiers/entailment_check.cpp
src/theory/quantifiers/equality_query.cpp
src/theory/quantifiers/equality_query.h
src/theory/quantifiers/first_order_model.cpp
src/theory/quantifiers/fmf/bounded_integers.h
src/theory/quantifiers/fmf/full_model_check.cpp
src/theory/quantifiers/fmf/model_builder.cpp
src/theory/quantifiers/fmf/model_engine.cpp
src/theory/quantifiers/inst_match_trie.cpp
src/theory/quantifiers/inst_strategy_enumerative.cpp
src/theory/quantifiers/inst_strategy_pool.cpp
src/theory/quantifiers/instantiate.cpp
src/theory/quantifiers/quant_relevance.cpp
src/theory/quantifiers/quantifiers_attributes.cpp
src/theory/quantifiers/quantifiers_modules.h
src/theory/quantifiers/quantifiers_rewriter.cpp
src/theory/quantifiers/sygus/cegis.cpp
src/theory/quantifiers/sygus/sygus_eval_unfold.cpp
src/theory/quantifiers/term_database.cpp
src/theory/quantifiers/theory_quantifiers.cpp
src/theory/quantifiers_engine.h
src/theory/sep/theory_sep.cpp
src/theory/sep/theory_sep.h
src/theory/sets/theory_sets_private.h
src/theory/shared_terms_database.h
src/theory/strings/array_core_solver.cpp
src/theory/strings/array_solver.cpp
src/theory/strings/base_solver.cpp
src/theory/strings/core_solver.cpp
src/theory/strings/eqc_info.cpp
src/theory/strings/extf_solver.cpp
src/theory/strings/inference_manager.cpp
src/theory/strings/regexp_solver.cpp
src/theory/strings/sequences_rewriter.cpp
src/theory/strings/solver_state.cpp
src/theory/strings/strings_fmf.cpp
src/theory/strings/term_registry.cpp
src/theory/strings/theory_strings.cpp
src/theory/theory.h
src/theory/theory_engine.cpp
src/theory/theory_model.cpp
src/theory/theory_model_builder.cpp
src/theory/uf/cardinality_extension.cpp
src/theory/uf/cardinality_extension.h
src/theory/uf/equality_engine.h
src/theory/uf/symmetry_breaker.cpp
src/theory/uf/symmetry_breaker.h
src/util/floatingpoint.h
src/util/floatingpoint_literal_symfpu.cpp
src/util/floatingpoint_literal_symfpu_traits.h
src/util/string.cpp
src/util/string.h
test/unit/base/map_util_black.cpp
test/unit/context/cdhashmap_black.cpp
test/unit/context/cdhashmap_white.cpp
test/unit/context/cdlist_black.cpp
test/unit/context/cdo_black.cpp
test/unit/context/context_black.cpp
test/unit/context/context_mm_black.cpp
test/unit/context/context_white.cpp
test/unit/prop/cnf_stream_white.cpp
test/unit/test_context.h
test/unit/theory/theory_engine_white.cpp

index be645f6fe2a71244ca0972022a298849c93d22cf..d8bdfa6905e2ec6cba76f3f12d95fb67fcaedb6e 100644 (file)
@@ -171,32 +171,33 @@ class AssertArgumentException : public Exception
 
 #define InternalError() CVC5_FATAL() << "Internal error detected "
 
-#define IllegalArgument(arg, msg...)      \
-  throw ::cvc5::internal::IllegalArgumentException( \
-      "",                                 \
-      #arg,                               \
-      __PRETTY_FUNCTION__,                \
-      ::cvc5::internal::IllegalArgumentException::formatVariadic(msg).c_str());
+#define IllegalArgument(arg, msg...)              \
+  throw cvc5::internal::IllegalArgumentException( \
+      "",                                         \
+      #arg,                                       \
+      __PRETTY_FUNCTION__,                        \
+      cvc5::internal::IllegalArgumentException::formatVariadic(msg).c_str());
 // This cannot use check argument directly as this forces
 // CheckArgument to use a va_list. This is unsupported in Swig.
-#define PrettyCheckArgument(cond, arg, msg...)                            \
-  do                                                                      \
-  {                                                                       \
-    if (__builtin_expect((!(cond)), false))                               \
-    {                                                                     \
-      throw ::cvc5::internal::IllegalArgumentException(                             \
-          #cond,                                                          \
-          #arg,                                                           \
-          __PRETTY_FUNCTION__,                                            \
-          ::cvc5::internal::IllegalArgumentException::formatVariadic(msg).c_str()); \
-    }                                                                     \
+#define PrettyCheckArgument(cond, arg, msg...)                          \
+  do                                                                    \
+  {                                                                     \
+    if (__builtin_expect((!(cond)), false))                             \
+    {                                                                   \
+      throw cvc5::internal::IllegalArgumentException(                   \
+          #cond,                                                        \
+          #arg,                                                         \
+          __PRETTY_FUNCTION__,                                          \
+          cvc5::internal::IllegalArgumentException::formatVariadic(msg) \
+              .c_str());                                                \
+    }                                                                   \
   } while (0)
 #define AlwaysAssertArgument(cond, arg, msg...)                         \
   do                                                                    \
   {                                                                     \
     if (__builtin_expect((!(cond)), false))                             \
     {                                                                   \
-      throw ::cvc5::internal::AssertArgumentException(                            \
+      throw cvc5::internal::AssertArgumentException(                    \
           #cond, #arg, __PRETTY_FUNCTION__, __FILE__, __LINE__, ##msg); \
     }                                                                   \
   } while (0)
index 9d5ca7c1a0f96ca8ce31676c639144b06cae8726..4cc3b32680434aeaf4e337c93fba389f102a1353 100644 (file)
@@ -124,7 +124,7 @@ inline void CheckArgument(bool cond,
                           const char* tail CVC5_UNUSED)
 {
   if(__builtin_expect( ( !cond ), false )) {
-    throw ::cvc5::internal::IllegalArgumentException("", "", tail);
+    throw cvc5::internal::IllegalArgumentException("", "", tail);
   }
 }
 template <class T>
@@ -133,7 +133,7 @@ template <class T>
 inline void CheckArgument(bool cond, const T& arg CVC5_UNUSED)
 {
   if(__builtin_expect( ( !cond ), false )) {
-    throw ::cvc5::internal::IllegalArgumentException("", "", "");
+    throw cvc5::internal::IllegalArgumentException("", "", "");
   }
 }
 
index e23c671b231208eb3255f01dcda6fe56a4bf9b90..12ce241cf59d55e1062258bcb5247d0c3a44bfdc 100644 (file)
@@ -16,8 +16,8 @@
  * Supports:
  * - std::map
  * - std::unordered_map
- * - cvc5::internal::context::CDHashmap
- * - cvc5::internal::context::CDInsertHashmap
+ * - context::CDHashmap
+ * - context::CDInsertHashmap
  * The ContainsKey function is also compatible with std::[unordered_]set.
  *
  * Currently implemented classes of functions:
index 4f57ed450f7bc3a6bd083cb9a5e87946a12b1423..0040ca65ecded6f0e109f14fbf82f561b831eac2 100644 (file)
@@ -279,28 +279,39 @@ extern TraceC TraceChannel CVC5_EXPORT;
 
 #ifdef CVC5_MUZZLE
 
-#define Warning \
-  ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel
-#define WarningOnce \
-  ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel
-#define TraceIsOn ::cvc5::internal::__cvc5_true() ? false : ::cvc5::internal::TraceChannel.isOn
-#define Trace(tag) ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel()
+#define Warning                                              \
+  cvc5::internal::__cvc5_true() ? cvc5::internal::nullStream \
+                                : cvc5::internal::WarningChannel
+#define WarningOnce                                          \
+  cvc5::internal::__cvc5_true() ? cvc5::internal::nullStream \
+                                : cvc5::internal::WarningChannel
+#define TraceIsOn \
+  cvc5::internal::__cvc5_true() ? false : cvc5::internal::TraceChannel.isOn
+#define Trace(tag)                                           \
+  cvc5::internal::__cvc5_true() ? cvc5::internal::nullStream \
+                                : cvc5::internal::TraceChannel()
 
 #else /* CVC5_MUZZLE */
 
-#define Warning \
-  (!::cvc5::internal::WarningChannel.isOn()) ? ::cvc5::internal::nullStream : ::cvc5::internal::WarningChannel
-#define WarningOnce                                         \
-  (!::cvc5::internal::WarningChannel.isOn()                           \
-   || !::cvc5::internal::WarningChannel.warnOnce(__FILE__, __LINE__)) \
-      ? ::cvc5::internal::nullStream                                  \
-      : ::cvc5::internal::WarningChannel
+#define Warning                                                         \
+  (!cvc5::internal::WarningChannel.isOn()) ? cvc5::internal::nullStream \
+                                           : cvc5::internal::WarningChannel
+#define WarningOnce                                                 \
+  (!cvc5::internal::WarningChannel.isOn()                           \
+   || !cvc5::internal::WarningChannel.warnOnce(__FILE__, __LINE__)) \
+      ? cvc5::internal::nullStream                                  \
+      : cvc5::internal::WarningChannel
 #ifdef CVC5_TRACING
-#define TraceIsOn ::cvc5::internal::TraceChannel.isOn
-#define Trace(tag) !::cvc5::internal::TraceChannel.isOn(tag) ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel()
+#define TraceIsOn cvc5::internal::TraceChannel.isOn
+#define Trace(tag)                                                     \
+  !cvc5::internal::TraceChannel.isOn(tag) ? cvc5::internal::nullStream \
+                                          : cvc5::internal::TraceChannel()
 #else /* CVC5_TRACING */
-#define TraceIsOn ::cvc5::internal::__cvc5_true() ? false : ::cvc5::internal::TraceChannel.isOn
-#define Trace(tag) ::cvc5::internal::__cvc5_true() ? ::cvc5::internal::nullStream : ::cvc5::internal::TraceChannel()
+#define TraceIsOn \
+  cvc5::internal::__cvc5_true() ? false : cvc5::internal::TraceChannel.isOn
+#define Trace(tag)                                           \
+  cvc5::internal::__cvc5_true() ? cvc5::internal::nullStream \
+                                : cvc5::internal::TraceChannel()
 #endif /* CVC5_TRACING */
 
 #endif /* CVC5_MUZZLE */
index dd8a2ac679bf8a8581f769007c40b24c3feb2675..e84704b87630f24278c04681011c54854da4218a 100644 (file)
@@ -15,8 +15,8 @@
 
 #include "base/configuration.h"
 
-const bool ::cvc5::internal::Configuration::GIT_BUILD = @GIT_BUILD@;
-const bool ::cvc5::internal::Configuration::CVC5_IS_RELEASE = @CVC5_IS_RELEASE@;
-const char* const ::cvc5::internal::Configuration::CVC5_VERSION = "@CVC5_VERSION@";
-const char* const ::cvc5::internal::Configuration::CVC5_FULL_VERSION = "@CVC5_FULL_VERSION@";
-const char* const ::cvc5::internal::Configuration::CVC5_GIT_INFO = "@CVC5_GIT_INFO@";
+const bool cvc5::internal::Configuration::GIT_BUILD = @GIT_BUILD@;
+const bool cvc5::internal::Configuration::CVC5_IS_RELEASE = @CVC5_IS_RELEASE@;
+const char* const cvc5::internal::Configuration::CVC5_VERSION = "@CVC5_VERSION@";
+const char* const cvc5::internal::Configuration::CVC5_FULL_VERSION = "@CVC5_FULL_VERSION@";
+const char* const cvc5::internal::Configuration::CVC5_GIT_INFO = "@CVC5_GIT_INFO@";
index 6a7f378968c305b7d3e559406a00f8c2311e7eb3..553f1a6b4b82102e91d240356691cd3d0f21f8e1 100644 (file)
@@ -91,8 +91,7 @@
 #include "context/cdhashmap_forward.h"
 #include "context/context.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 // Auxiliary class: almost the same as CDO (see cdo.h)
 
@@ -407,7 +406,6 @@ class CDHashMap : public ContextObj
 
 }; /* class CDHashMap<> */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDHASHMAP_H */
index a23180d4a57a8cbb3785e84bad51393877ad3cea..c48fe1a0f59928dd337cc9afe307f0edb86bbd02 100644 (file)
 
 /// \cond internals
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 template <class Key, class Data, class HashFcn = std::hash<Key> >
 class CDHashMap;
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 /// \endcond
 
index 789532c53328745f0dccf9dcf81f6fd52e9fb58e..b84bae1022eb075d18dd7f4757eca6bdd296934e 100644 (file)
@@ -22,8 +22,7 @@
 #include "context/cdinsert_hashmap.h"
 #include "context/context.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 template <class V, class HashFcn = std::hash<V>>
 class CDHashSet : protected CDInsertHashMap<V, bool, HashFcn>
@@ -151,7 +150,6 @@ public:
 
 }; /* class CDHashSet */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDHASHSET_H */
index 4e5068eb29a6d12bacdc09b599f05787e9370128..4f8b5e791d8355e9431eaba388411bb5c5025af7 100644 (file)
 
 #include <functional>
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 template <class V, class HashFcn = std::hash<V> >
 class CDHashSet;
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDSET_FORWARD_H */
index 308ca6de69b7288bee507985f9c29617af6353d0..316a9fa5eecee3dd83a32ff483a7076b791f967d 100644 (file)
@@ -44,9 +44,7 @@
 
 #pragma once
 
-namespace cvc5::internal {
-namespace context {
-
+namespace cvc5::context {
 
 template <class Key, class Data, class HashFcn = std::hash<Key> >
 class InsertHashMap {
@@ -349,7 +347,8 @@ public:
 };/* class CDInsertHashMap<> */
 
 template <class Data, class HashFcn>
-class CDInsertHashMap<TNode, Data, HashFcn> : public ContextObj {
+class CDInsertHashMap<internal::TNode, Data, HashFcn> : public ContextObj
+{
   /* CDInsertHashMap is challenging to get working with TNode.
    * Consider using CDHashMap<TNode,...> instead.
    *
@@ -365,5 +364,4 @@ class CDInsertHashMap<TNode, Data, HashFcn> : public ContextObj {
                 "Cannot create a CDInsertHashMap with TNode keys");
 };
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
index 3cf1b8698e393504ef9f2b4f9026f049a059280b..124a6ecc8fd123c80f5564263144a1eadf45b6d4 100644 (file)
 
 #include <functional>
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 template <class Key, class Data, class HashFcn = std::hash<Key> >
 class CDInsertHashMap;
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDINSERT_HASHMAP_FORWARD_H */
index faed937ca3e8f208d9a22c22371881d95d8b174e..62794c7d63c3978be9e316f119501fe4483f3d73 100644 (file)
@@ -30,8 +30,7 @@
 #include "context/context.h"
 #include "context/context_mm.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 /**
  * Generic context-dependent dynamic array.  Note that for efficiency,
@@ -437,7 +436,6 @@ class CDList<T, CleanUp, ContextMemoryAllocator<T> > : public ContextObj {
                 "Cannot create a CDList with a ContextMemoryAllocator.");
 };
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDLIST_H */
index 685211e28a0778d7bd48751f57765a208a6fdb5d..7e7a0b7461632263de39a2d6e2df0124aab266f5 100644 (file)
@@ -35,8 +35,7 @@
 
 /// \cond internals
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 template <class T>
 class DefaultCleanUp {
@@ -49,7 +48,6 @@ class CDList;
 
 /// \endcond
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDLIST_FORWARD_H */
index 993bf6bd7098748a1f57670e98181819947da18d..fb7c890012afd6516b40507cace9fccc4ad9a8e8 100644 (file)
@@ -24,8 +24,7 @@
 #include "context/cdo.h"
 #include "context/context.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 class CDRaised {
 private:
@@ -73,5 +72,4 @@ public:
   }
 };/* class CDMaybe<T> */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
index f7fd4f76337387ccd8fb94e8d6df0bd2de18e8bd..cfc8c8a406cfebe078b5d1783c1d5d3b4ca96040 100644 (file)
@@ -20,8 +20,7 @@
 
 #include "context/context.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 /**
  * Most basic template for context-dependent objects.  Simply makes a copy
@@ -169,7 +168,6 @@ public:
 
 };/* class CDO */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDO_H */
index 6472fd5ca22dc3b12f626d2dfc9729cde037673b..7f380c03d5871a81f92edfa155c43d7aabef8006 100644 (file)
@@ -28,8 +28,7 @@
 #include "context/context.h"
 #include "context/cdlist.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 template <class T, class CleanUp = DefaultCleanUp<T>, class Allocator = std::allocator<T> >
 class CDQueue;
@@ -155,7 +154,6 @@ public:
 
 };/* class CDQueue<> */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDQUEUE_H */
index bfb5f2a4feebd5994876056cfbee893340a26944..a6427f9dd56afbf089628f3e4323c0f6b8194963 100644 (file)
@@ -25,8 +25,7 @@
 #include "context/cdlist.h"
 #include "context/cdo.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 class Context;
 
@@ -89,7 +88,6 @@ public:
 
 };/* class CDTrailQueue<> */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CDTRAIL_QUEUE_H */
index 7a5d88252ae39503f66934618402e6773c791f78..129a4f96175b0a0c86fee855c85877743c1b7cf4 100644 (file)
@@ -20,9 +20,7 @@
 #include "base/check.h"
 #include "context/context.h"
 
-namespace cvc5::internal {
-namespace context {
-
+namespace cvc5::context {
 
 Context::Context() : d_pCNOpre(NULL), d_pCNOpost(NULL) {
   // Create new memory manager
@@ -347,5 +345,4 @@ void Scope::enqueueToGarbageCollect(ContextObj* obj) {
   d_garbage.push_back(obj);
 }
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
index 1b73531f1ce94040c57e4edd465bd6ee0a15538b..c227d97ea99d245e95f76292962e5f1f4cde2141 100644 (file)
@@ -28,8 +28,7 @@
 #include "base/output.h"
 #include "context/context_mm.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 class Context;
 class Scope;
@@ -735,7 +734,6 @@ inline void Scope::addToChain(ContextObj* pContextObj)
   d_pContextObjList = pContextObj;
 }
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CONTEXT_H */
index 55660edb1293062c960c29b397eef285d7a71d4e..01fd23010904850de6fa56edfd6b6440bc704231 100644 (file)
@@ -28,8 +28,7 @@
 #include "base/output.h"
 #include "context/context_mm.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 #ifndef CVC5_DEBUG_CONTEXT_MEMORY_MANAGER
 
@@ -173,5 +172,4 @@ unsigned ContextMemoryManager::getMaxAllocationSize()
 
 #endif /* CVC5_DEBUG_CONTEXT_MEMORY_MANAGER */
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
index 0fdb78045fd7efe2af5840e0c0a7298fb2421d2a..742aab8460bf49786eb38012e1590d3978d70d03 100644 (file)
@@ -25,8 +25,7 @@
 #endif
 #include <vector>
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 
 #ifndef CVC5_DEBUG_CONTEXT_MEMORY_MANAGER
 
@@ -261,7 +260,6 @@ inline bool operator!=(const ContextMemoryAllocator<T>& a1,
   return a1.d_mm != a2.d_mm;
 }
 
-}  // namespace context
-}  // namespace cvc5::internal
+}  // namespace cvc5::context
 
 #endif /* CVC5__CONTEXT__CONTEXT_MM_H */
index cce1d6871b6fc1e76e8113cd6de504b39cc0cf1a..89e64afa6c33c625ccb0e4a213193ce3fc061275 100644 (file)
@@ -50,7 +50,7 @@ std::ostream& operator<<(std::ostream& out, cvc5::internal::Kind k)
  * decide whether it's safe to modify big expressions by changing the grouping of
  * the arguments. */
 /* TODO: This could be generated. */
-bool isAssociative(::cvc5::internal::Kind k)
+bool isAssociative(cvc5::internal::Kind k)
 {
   switch(k) {
   case kind::AND:
@@ -63,7 +63,7 @@ bool isAssociative(::cvc5::internal::Kind k)
   }
 }
 
-std::string kindToString(::cvc5::internal::Kind k) { return toString(k); }
+std::string kindToString(cvc5::internal::Kind k) { return toString(k); }
 
 }  // namespace kind
 
@@ -84,7 +84,7 @@ std::ostream& operator<<(std::ostream& out, TypeConstant typeConstant)
 
 namespace theory {
 
-TheoryId kindToTheoryId(::cvc5::internal::Kind k)
+TheoryId kindToTheoryId(cvc5::internal::Kind k)
 {
   switch (k)
   {
@@ -99,7 +99,7 @@ ${kind_to_theory_id}
   throw IllegalArgumentException("", "k", __PRETTY_FUNCTION__, "bad kind");
 }
 
-TheoryId typeConstantToTheoryId(::cvc5::internal::TypeConstant typeConstant)
+TheoryId typeConstantToTheoryId(cvc5::internal::TypeConstant typeConstant)
 {
   switch (typeConstant)
   {
index ca7df0944db033a7d773f1a41cc1dff1db2b9e42..b3b511c9dc70979c0fb01fb698b1c563900f9f21 100644 (file)
@@ -40,7 +40,7 @@ enum Kind_t
 
 // import Kind into the "cvc5" namespace but keep the individual kind
 // constants under kind::
-typedef ::cvc5::internal::kind::Kind_t Kind;
+typedef cvc5::internal::kind::Kind_t Kind;
 
 namespace kind {
 
@@ -68,12 +68,12 @@ std::ostream& operator<<(std::ostream&, cvc5::internal::Kind);
  * decide whether it's safe to modify big expressions by changing the grouping of
  * the arguments. */
 /* TODO: This could be generated. */
-bool isAssociative(::cvc5::internal::Kind k);
-std::string kindToString(::cvc5::internal::Kind k);
+bool isAssociative(cvc5::internal::Kind k);
+std::string kindToString(cvc5::internal::Kind k);
 
 struct KindHashFunction
 {
-  inline size_t operator()(::cvc5::internal::Kind k) const { return k; }
+  inline size_t operator()(cvc5::internal::Kind k) const { return k; }
 }; /* struct KindHashFunction */
 
 }  // namespace kind
@@ -101,9 +101,9 @@ std::ostream& operator<<(std::ostream& out, TypeConstant typeConstant);
 
 namespace theory {
 
-::cvc5::internal::theory::TheoryId kindToTheoryId(::cvc5::internal::Kind k);
-::cvc5::internal::theory::TheoryId typeConstantToTheoryId(
-    ::cvc5::internal::TypeConstant typeConstant);
+cvc5::internal::theory::TheoryId kindToTheoryId(cvc5::internal::Kind k);
+cvc5::internal::theory::TheoryId typeConstantToTheoryId(
+    cvc5::internal::TypeConstant typeConstant);
 
 }  // namespace theory
 }  // namespace cvc5::internal
index 693b55930e444378f67a60f0907a2cf0768777e2..91eef65c2227d63d393fdc9e9db07e47157cbf3b 100644 (file)
@@ -74,8 +74,8 @@ namespace metakind {
 template <Kind k, class T, bool pool>
 struct NodeValueConstCompare
 {
-  static bool compare(const ::cvc5::internal::expr::NodeValue* x,
-                      const ::cvc5::internal::expr::NodeValue* y)
+  static bool compare(const cvc5::internal::expr::NodeValue* x,
+                      const cvc5::internal::expr::NodeValue* y)
   {
     if (pool)
     {
@@ -96,13 +96,13 @@ struct NodeValueConstCompare
     return x->getConst<T>() == y->getConst<T>();
   }
 
-  static size_t constHash(const ::cvc5::internal::expr::NodeValue* nv)
+  static size_t constHash(const cvc5::internal::expr::NodeValue* nv)
   {
     return nv->getConst<T>().hash();
   }
 };
 
-size_t NodeValueCompare::constHash(const ::cvc5::internal::expr::NodeValue* nv)
+size_t NodeValueCompare::constHash(const cvc5::internal::expr::NodeValue* nv)
 {
   Assert(nv->getMetaKind() == kind::metakind::CONSTANT);
 
@@ -111,13 +111,14 @@ size_t NodeValueCompare::constHash(const ::cvc5::internal::expr::NodeValue* nv)
 // clang-format off
     ${metakind_constHashes}
 // clang-format on
-default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
+    default:
+      Unhandled() << cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
   }
 }
 
 template <bool pool>
-bool NodeValueCompare::compare(const ::cvc5::internal::expr::NodeValue* nv1,
-                               const ::cvc5::internal::expr::NodeValue* nv2)
+bool NodeValueCompare::compare(const cvc5::internal::expr::NodeValue* nv1,
+                               const cvc5::internal::expr::NodeValue* nv2)
 {
   if(nv1->d_kind != nv2->d_kind) {
     return false;
@@ -130,7 +131,8 @@ bool NodeValueCompare::compare(const ::cvc5::internal::expr::NodeValue* nv1,
 // clang-format off
 ${metakind_compares}
 // clang-format on
-default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv1->d_kind);
+default:
+  Unhandled() << cvc5::internal::expr::NodeValue::dKindToKind(nv1->d_kind);
     }
   }
 
@@ -138,9 +140,9 @@ default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv1->d_ki
     return false;
   }
 
-  ::cvc5::internal::expr::NodeValue::const_nv_iterator i = nv1->nv_begin();
-  ::cvc5::internal::expr::NodeValue::const_nv_iterator j = nv2->nv_begin();
-  ::cvc5::internal::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end();
+  cvc5::internal::expr::NodeValue::const_nv_iterator i = nv1->nv_begin();
+  cvc5::internal::expr::NodeValue::const_nv_iterator j = nv2->nv_begin();
+  cvc5::internal::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end();
 
   while(i != i_end) {
     if((*i) != (*j)) {
@@ -154,12 +156,14 @@ default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv1->d_ki
 }
 
 template bool NodeValueCompare::compare<true>(
-    const ::cvc5::internal::expr::NodeValue* nv1, const ::cvc5::internal::expr::NodeValue* nv2);
+    const cvc5::internal::expr::NodeValue* nv1,
+    const cvc5::internal::expr::NodeValue* nv2);
 template bool NodeValueCompare::compare<false>(
-    const ::cvc5::internal::expr::NodeValue* nv1, const ::cvc5::internal::expr::NodeValue* nv2);
+    const cvc5::internal::expr::NodeValue* nv1,
+    const cvc5::internal::expr::NodeValue* nv2);
 
 void nodeValueConstantToStream(std::ostream& out,
-                               const ::cvc5::internal::expr::NodeValue* nv)
+                               const cvc5::internal::expr::NodeValue* nv)
 {
   Assert(nv->getMetaKind() == kind::metakind::CONSTANT);
 
@@ -168,7 +172,8 @@ void nodeValueConstantToStream(std::ostream& out,
 // clang-format off
 ${metakind_constPrinters}
 // clang-format on
-default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
+default:
+  Unhandled() << cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
   }
 }
 
@@ -189,7 +194,7 @@ default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kin
  * This doesn't support "non-inlined" NodeValues, which shouldn't need this
  * kind of cleanup.
  */
-void deleteNodeValueConstant(::cvc5::internal::expr::NodeValue* nv)
+void deleteNodeValueConstant(cvc5::internal::expr::NodeValue* nv)
 {
   Assert(nv->getMetaKind() == kind::metakind::CONSTANT);
 
@@ -198,14 +203,15 @@ void deleteNodeValueConstant(::cvc5::internal::expr::NodeValue* nv)
 // clang-format off
 ${metakind_constDeleters}
 // clang-format on
-default: Unhandled() << ::cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
+default:
+  Unhandled() << cvc5::internal::expr::NodeValue::dKindToKind(nv->d_kind);
   }
 }
 
 // re-enable the strict-aliasing warning
 # pragma GCC diagnostic warning "-Wstrict-aliasing"
 
-uint32_t getMinArityForKind(::cvc5::internal::Kind k)
+uint32_t getMinArityForKind(cvc5::internal::Kind k)
 {
   static const unsigned lbs[] = {
     0, /* NULL_EXPR */
@@ -219,7 +225,7 @@ ${metakind_lbchildren}
   return lbs[k];
 }
 
-uint32_t getMaxArityForKind(::cvc5::internal::Kind k)
+uint32_t getMaxArityForKind(cvc5::internal::Kind k)
 {
   static const unsigned ubs[] = {
     0, /* NULL_EXPR */
@@ -240,7 +246,7 @@ ${metakind_ubchildren}
  * example, since the kind of functions is just VARIABLE, it should map
  * VARIABLE to APPLY_UF.
  */
-Kind operatorToKind(::cvc5::internal::expr::NodeValue* nv)
+Kind operatorToKind(cvc5::internal::expr::NodeValue* nv)
 {
   if(nv->getKind() == kind::BUILTIN) {
     return nv->getConst<Kind>();
index c9e6e4c3685c59906d7e85b8b32ce5ed0d026122..6fcfcbccef3a7c0819f90701899e734e1603c27d 100644 (file)
@@ -38,9 +38,9 @@ namespace metakind {
 
 struct NodeValueCompare {
   template <bool pool>
-  static bool compare(const ::cvc5::internal::expr::NodeValue* nv1,
-                      const ::cvc5::internal::expr::NodeValue* nv2);
-  static size_t constHash(const ::cvc5::internal::expr::NodeValue* nv);
+  static bool compare(const cvc5::internal::expr::NodeValue* nv1,
+                      const cvc5::internal::expr::NodeValue* nv2);
+  static size_t constHash(const cvc5::internal::expr::NodeValue* nv);
 };/* struct NodeValueCompare */
 
 /**
@@ -67,7 +67,7 @@ enum MetaKind_t {
  * @param nv the node value representing a constant node
  */
 void nodeValueConstantToStream(std::ostream& out,
-                               const ::cvc5::internal::expr::NodeValue* nv);
+                               const cvc5::internal::expr::NodeValue* nv);
 
 /**
  * Cleanup to be performed when a NodeValue zombie is collected, and
@@ -78,18 +78,18 @@ void nodeValueConstantToStream(std::ostream& out,
  * This doesn't support "non-inlined" NodeValues, which shouldn't need this
  * kind of cleanup.
  */
-void deleteNodeValueConstant(::cvc5::internal::expr::NodeValue* nv);
+void deleteNodeValueConstant(cvc5::internal::expr::NodeValue* nv);
 
 /** Return the minimum arity of the given kind. */
-uint32_t getMinArityForKind(::cvc5::internal::Kind k);
+uint32_t getMinArityForKind(cvc5::internal::Kind k);
 /** Return the maximum arity of the given kind. */
-uint32_t getMaxArityForKind(::cvc5::internal::Kind k);
+uint32_t getMaxArityForKind(cvc5::internal::Kind k);
 
 }  // namespace metakind
 
 // import MetaKind into the "cvc5::internal::kind" namespace but keep the
 // individual MetaKind constants under kind::metakind::
-typedef ::cvc5::internal::kind::metakind::MetaKind_t MetaKind;
+typedef cvc5::internal::kind::metakind::MetaKind_t MetaKind;
 
 /**
  * Get the metakind for a particular kind.
@@ -101,7 +101,7 @@ MetaKind metaKindOf(Kind k);
  * example, since the kind of functions is just VARIABLE, it should map
  * VARIABLE to APPLY_UF.
  */
-Kind operatorToKind(::cvc5::internal::expr::NodeValue* nv);
+Kind operatorToKind(cvc5::internal::expr::NodeValue* nv);
 
 }  // namespace kind
 
@@ -111,7 +111,8 @@ namespace expr {
 struct NodeValuePoolEq {
   bool operator()(const NodeValue* nv1, const NodeValue* nv2) const
   {
-    return ::cvc5::internal::kind::metakind::NodeValueCompare::compare<true>(nv1, nv2);
+    return cvc5::internal::kind::metakind::NodeValueCompare::compare<true>(nv1,
+                                                                           nv2);
   }
 };
 
index 490e0adb1b05a20fd0b3878db2d2dfcaf2471448..d67e8f3930c41e2cf280a02566f45f0676da7dd7 100644 (file)
@@ -44,7 +44,7 @@ namespace expr {
 namespace kind {
   namespace metakind {
 
-  template < ::cvc5::internal::Kind k, class T, bool pool>
+  template <cvc5::internal::Kind k, class T, bool pool>
   struct NodeValueConstCompare;
 
   struct NodeValueCompare;
@@ -60,10 +60,10 @@ namespace expr {
 class NodeValue
 {
   template <bool>
-  friend class ::cvc5::internal::NodeTemplate;
-  friend class ::cvc5::internal::TypeNode;
-  friend class ::cvc5::internal::NodeBuilder;
-  friend class ::cvc5::internal::NodeManager;
+  friend class cvc5::internal::NodeTemplate;
+  friend class cvc5::internal::TypeNode;
+  friend class cvc5::internal::NodeBuilder;
+  friend class cvc5::internal::NodeManager;
 
   template <Kind k, class T, bool pool>
   friend struct kind::metakind::NodeValueConstCompare;
index 846254bf286873090769caef5208e90e09f3f38e..7d05a785b5ee1c0831939b4d26b5951474d6c4cc 100644 (file)
@@ -20,7 +20,7 @@
 #include "context/cdlist.h"
 #include "context/cdo.h"
 
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5 {
 
index f6153372a03fbc6aab752544f59caff961946aff..a765da1575373a800da442df896485ae7c415a32 100644 (file)
 
 namespace cvc5::internal {
 
-using ::cvc5::internal::context::CDHashMap;
-using ::cvc5::internal::context::CDHashSet;
-using ::cvc5::internal::context::Context;
-using ::std::copy;
-using ::std::endl;
-using ::std::ostream_iterator;
-using ::std::pair;
-using ::std::string;
-using ::std::vector;
+using context::CDHashMap;
+using context::CDHashSet;
+using context::Context;
+using std::copy;
+using std::endl;
+using std::ostream_iterator;
+using std::pair;
+using std::string;
+using std::vector;
 
 /** Overloaded type trie.
  *
index 22d9fad91976c3a1e8137c95326fd9e4545af1de..001f79b8efe44dd7804bcd358f89f994b0318817 100644 (file)
@@ -56,7 +56,7 @@ class LearnedLiteralManager : protected EnvObj
 
  private:
   /** Learned literal map */
-  typedef context::CDHashSet<Node> NodeSet;
+  using NodeSet = context::CDHashSet<Node>;
   /** Learned literals */
   NodeSet d_learnedLits;
 };
index 4b24d223d440e160ca755283625c680c12ef4ffe..82e9a4b1770860643889d8b615e5437f7b671fcc 100644 (file)
 #include "theory/substitutions.h"
 #include "util/statistics_stats.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 class Context;
 }
+namespace cvc5::internal {
 namespace preprocessing {
 namespace passes {
 
index 4176ac03cd743d6175c2fca33ff4b0348de87a28..da1dd5582521151ac69ea60d7fca39a271a3d47b 100644 (file)
@@ -133,8 +133,8 @@ class ScopedBool
 
 Solver::Solver(Env& env,
                cvc5::internal::prop::TheoryProxy* proxy,
-               cvc5::internal::context::Context* context,
-               cvc5::internal::context::UserContext* userContext,
+               context::Context* context,
+               context::UserContext* userContext,
                ProofNodeManager* pnm,
                bool enableIncremental)
     : EnvObj(env),
index bb2167d0d58d1e175dacc7b7a7e3666ccd9bb2dc..5704133f43dd0157508657c3594b07c653bc0f60 100644 (file)
@@ -75,7 +75,7 @@ class Solver : protected EnvObj
   cvc5::internal::prop::TheoryProxy* d_proxy;
 
   /** The contexts from the SMT solver */
-  cvc5::internal::context::Context* d_context;
+  context::Context* d_context;
 
   /** The current assertion level (user) */
   int assertionLevel;
@@ -132,8 +132,8 @@ public:
     //
  Solver(Env& env,
         cvc5::internal::prop::TheoryProxy* proxy,
-        cvc5::internal::context::Context* context,
-        cvc5::internal::context::UserContext* userContext,
+        context::Context* context,
+        context::UserContext* userContext,
         ProofNodeManager* pnm,
         bool enableIncremental = false);
  virtual ~Solver();
index fdbdb6ad89a0b871d09b68b9a21b827bcecf2742..cb9c034ad5ea4311f7da27b1767a5c7a24338afe 100644 (file)
@@ -50,7 +50,7 @@ class MinisatSatSolver : public CDCLTSatSolverInterface, protected EnvObj
   static void  toSatClause    (const Minisat::Clause& clause, SatClause& sat_clause);
   void initialize(context::Context* context,
                   TheoryProxy* theoryProxy,
-                  cvc5::internal::context::UserContext* userContext,
+                  context::UserContext* userContext,
                   ProofNodeManager* pnm) override;
 
   ClauseId addClause(SatClause& clause, bool removable) override;
index c1e4a93b3f13734cb110ac59ff56eb4b6f50a0c5..879fb51c60e2f8da52042b3a6cc25f2b86f1907f 100644 (file)
@@ -49,8 +49,8 @@ static DoubleOption opt_simp_garbage_frac(_cat, "simp-gc-frac", "The fraction of
 
 SimpSolver::SimpSolver(Env& env,
                        cvc5::internal::prop::TheoryProxy* proxy,
-                       cvc5::internal::context::Context* context,
-                       cvc5::internal::context::UserContext* userContext,
+                       context::Context* context,
+                       context::UserContext* userContext,
                        ProofNodeManager* pnm,
                        bool enableIncremental)
     : Solver(env, proxy, context, userContext, pnm, enableIncremental),
index be795681b0cf2b9a5f853f9746afdadea216c4f2..79d37c3f460339cbd1c2ee66b760bfaf48177cf6 100644 (file)
@@ -44,8 +44,8 @@ class SimpSolver : public Solver {
     //
   SimpSolver(Env& env,
              cvc5::internal::prop::TheoryProxy* proxy,
-             cvc5::internal::context::Context* context,
-             cvc5::internal::context::UserContext* userContext,
+             context::Context* context,
+             context::UserContext* userContext,
              ProofNodeManager* pnm,
              bool enableIncremental = false);
   ~SimpSolver();
index 47b9b9f225e7aec3bfb6d7ff39c5d0913ac0f89e..024273c2ff43246292861005ae53fa5a24558210 100644 (file)
@@ -124,7 +124,7 @@ class CDCLTSatSolverInterface : public SatSolver
 
   virtual void initialize(context::Context* context,
                           prop::TheoryProxy* theoryProxy,
-                          cvc5::internal::context::UserContext* userContext,
+                          context::UserContext* userContext,
                           ProofNodeManager* pnm) = 0;
 
   virtual void push() = 0;
index 155b16ec278c02be09bad4976d1f7b837626c996..12f4cc5be68bb6cd3b3f908b5b5f826982c47f96 100644 (file)
 #include "theory/theory_id.h"
 #include "util/statistics_registry.h"
 
+namespace cvc5::context {
+class Context;
+class UserContext;
+}  // namespace cvc5::context
+
 namespace cvc5::internal {
 
 class NodeManager;
@@ -39,11 +44,6 @@ enum class OutputTag;
 }
 using OutputTag = options::OutputTag;
 
-namespace context {
-class Context;
-class UserContext;
-}  // namespace context
-
 namespace smt {
 class PfManager;
 }
index 5ad20f41546163a75c1515d38d9faa7a96446474..e5a6e152ec7400b1536169aa46533759ccbf3f22 100644 (file)
 #include <memory>
 
 #include "expr/node.h"
+
+namespace cvc5::context {
+class Context;
+class UserContext;
+}  // namespace cvc5::context
+
 namespace cvc5::internal {
 
 class Env;
@@ -30,10 +36,6 @@ class NodeManager;
 class Options;
 class StatisticsRegistry;
 
-namespace context {
-class Context;
-class UserContext;
-}  // namespace context
 namespace options {
 enum class OutputTag;
 }
index 59264ee70e886c2a42b7943093c777ec0b76f8fd..3babf40ae3984c685521c7955cf35f6897908bb4 100644 (file)
@@ -77,7 +77,7 @@ using namespace std;
 using namespace cvc5::internal::smt;
 using namespace cvc5::internal::preprocessing;
 using namespace cvc5::internal::prop;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::theory;
 
 namespace cvc5::internal {
@@ -140,11 +140,14 @@ Result SolverEngine::getStatusOfLastCommand() const
 {
   return d_state->getStatus();
 }
-context::UserContext* SolverEngine::getUserContext()
+UserContext* SolverEngine::getUserContext()
 {
   return d_env->getUserContext();
 }
-context::Context* SolverEngine::getContext() { return d_env->getContext(); }
+Context* SolverEngine::getContext()
+{
+  return d_env->getContext();
+}
 
 TheoryEngine* SolverEngine::getTheoryEngine()
 {
@@ -1159,7 +1162,7 @@ std::pair<Node, Node> SolverEngine::getSepHeapAndNilExpr(void)
 std::vector<Node> SolverEngine::getAssertionsInternal()
 {
   Assert(d_state->isFullyInited());
-  const context::CDList<Node>& al = d_asserts->getAssertionList();
+  const CDList<Node>& al = d_asserts->getAssertionList();
   std::vector<Node> res;
   for (const Node& n : al)
   {
@@ -1442,7 +1445,7 @@ void SolverEngine::checkUnsatCore()
 
 void SolverEngine::checkModel(bool hardFailure)
 {
-  const context::CDList<Node>& al = d_asserts->getAssertionList();
+  const CDList<Node>& al = d_asserts->getAssertionList();
   // we always enable the assertion list, so it is able to be checked
 
   TimerStat::CodeTimer checkModelTimer(d_stats->d_checkModelTime);
index 5bdc3201b864789e077037cae30794147a7e9b35..bfcc45dce238d84a0e7e4f997884eff4e744e24d 100644 (file)
 #include "util/result.h"
 #include "util/synth_result.h"
 
+namespace cvc5::context {
+class Context;
+class UserContext;
+}  // namespace cvc5::context
+
 namespace cvc5 {
 
 class Solver;
@@ -54,15 +59,6 @@ struct InstantiationList;
 
 /* -------------------------------------------------------------------------- */
 
-/* -------------------------------------------------------------------------- */
-
-namespace context {
-class Context;
-class UserContext;
-}  // namespace context
-
-/* -------------------------------------------------------------------------- */
-
 namespace preprocessing {
 class PreprocessingPassContext;
 }
index 6f2866a1c03d925da59bd8361e8c3976614fd3f5..530fba94bcb32933eb7dacef2c71e66de8b0a7bf 100644 (file)
@@ -34,11 +34,8 @@ namespace cvc5::internal {
 namespace theory {
 namespace arith {
 
-
-ArithStaticLearner::ArithStaticLearner(context::Context* userContext) :
-  d_minMap(userContext),
-  d_maxMap(userContext),
-  d_statistics()
+ArithStaticLearner::ArithStaticLearner(context::Context* userContext)
+    : d_minMap(userContext), d_maxMap(userContext), d_statistics()
 {
 }
 
index 703bdbfd94f34070554dbc415693780c004f6328..f1cc8379dae5f9a13608655129b7b40cd02de2be 100644 (file)
 #include "theory/arith/delta_rational.h"
 #include "util/statistics_stats.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 class Context;
 }
+
+namespace cvc5::internal {
 namespace theory {
 namespace arith {
 
@@ -44,29 +45,29 @@ private:
  CDNodeToMinMaxMap d_maxMap;
 
 public:
-  ArithStaticLearner(context::Context* userContext);
-  ~ArithStaticLearner();
-  void staticLearning(TNode n, NodeBuilder& learned);
-
-  void addBound(TNode n);
+ ArithStaticLearner(context::Context* userContext);
+ ~ArithStaticLearner();
+ void staticLearning(TNode n, NodeBuilder& learned);
 
- private:
-  void process(TNode n, NodeBuilder& learned, const TNodeSet& defTrue);
+ void addBound(TNode n);
 
-  void iteMinMax(TNode n, NodeBuilder& learned);
-  void iteConstant(TNode n, NodeBuilder& learned);
-
-  /**
-   * These fields are designed to be accessible to ArithStaticLearner methods.
-   */
-  class Statistics
-  {
-   public:
-    IntStat d_iteMinMaxApplications;
-    IntStat d_iteConstantApplications;
-
-    Statistics();
-  };
+private:
+ void process(TNode n, NodeBuilder& learned, const TNodeSet& defTrue);
+
+ void iteMinMax(TNode n, NodeBuilder& learned);
+ void iteConstant(TNode n, NodeBuilder& learned);
+
+ /**
+  * These fields are designed to be accessible to ArithStaticLearner methods.
+  */
+ class Statistics
+ {
+  public:
+   IntStat d_iteMinMaxApplications;
+   IntStat d_iteConstantApplications;
+
+   Statistics();
+ };
 
   Statistics d_statistics;
 
index cf0ec43406c935333eaea26f01ef401bb19b5f20..29c2d45cb5d086fca91477802d2e6045fcc1937f 100644 (file)
 #include "util/dense_map.h"
 #include "util/statistics_stats.h"
 
+namespace cvc5::context {
+class Context;
+class UserContext;
+}  // namespace cvc5::context
+
 namespace cvc5::internal {
 
 class ProofNodeManager;
 class EagerProofGenerator;
 
-namespace context {
-class Context;
-class UserContext;
-}
-
 namespace theory {
 struct EeSetupInfo;
 
index c0ac9d07a18e8ef387a9d242b9c1edfea772adfa..e925bba581c8dfa717194f85f684fc4c03518f3f 100644 (file)
@@ -2019,12 +2019,12 @@ bool ConstraintDatabase::variableDatabaseIsSetup(ArithVar v) const {
   return v < d_varDatabases.size();
 }
 
-
-ConstraintDatabase::Watches::Watches(context::Context* satContext, context::Context* userContext):
-  d_constraintProofs(satContext),
-  d_canBePropagatedWatches(satContext),
-  d_assertionOrderWatches(satContext),
-  d_splitWatches(userContext)
+ConstraintDatabase::Watches::Watches(context::Context* satContext,
+                                     context::Context* userContext)
+    : d_constraintProofs(satContext),
+      d_canBePropagatedWatches(satContext),
+      d_assertionOrderWatches(satContext),
+      d_splitWatches(userContext)
 {}
 
 
index 7aaa3a8ba0001bdd70c28718819ad48a2aaeb0f8..1a31d0b5105ca99306a37f495b632b63ee7839c2 100644 (file)
 #include "theory/arith/delta_rational.h"
 #include "util/statistics_stats.h"
 
+namespace cvc5::context {
+class Context;
+}
 namespace cvc5::internal {
 
 class ProofNodeManager;
 class EagerProofGenerator;
 
-namespace context {
-class Context;
-}
 namespace theory {
 
 namespace arith {
@@ -152,7 +152,6 @@ enum ArithProofType
  */
 enum ConstraintType {LowerBound, Equality, UpperBound, Disequality};
 
-
 typedef context::CDList<ConstraintCP> CDConstraintList;
 
 typedef std::unordered_map<Node, ConstraintP> NodetoConstraintMap;
@@ -1034,13 +1033,14 @@ class ConstraintDatabase : protected EnvObj
    */
   CDConstraintList d_antecedents;
 
-  typedef context::CDList<ConstraintRule, Constraint::ConstraintRuleCleanup> ConstraintRuleList;
-  typedef context::CDList<ConstraintP, Constraint::CanBePropagatedCleanup> CBPList;
-  typedef context::CDList<ConstraintP, Constraint::AssertionOrderCleanup> AOList;
+  typedef context::CDList<ConstraintRule, Constraint::ConstraintRuleCleanup>
+      ConstraintRuleList;
+  typedef context::CDList<ConstraintP, Constraint::CanBePropagatedCleanup>
+      CBPList;
+  typedef context::CDList<ConstraintP, Constraint::AssertionOrderCleanup>
+      AOList;
   typedef context::CDList<ConstraintP, Constraint::SplitCleanup> SplitList;
 
-
-
   /**
    * The watch lists are collected together as they need to be garbage collected
    * carefully.
index 8f17d4e4d3a440a3887f81bd27cce6dab43aef6f..e8dbd3dfcca9d65fae851716564d37e86af48b21 100644 (file)
 #include "util/rational.h"
 #include "util/statistics_stats.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 class Context;
 }
+namespace cvc5::internal {
 namespace theory {
 namespace arith {
 
@@ -65,7 +65,6 @@ class DioSolver : protected EnvObj
    */
   context::CDO<size_t> d_nextInputConstraintToEnqueue;
 
-
   /**
    * We maintain a map from the variables associated with proofs to an input constraint.
    * These variables can then be used in polynomial manipulations.
@@ -109,7 +108,8 @@ class DioSolver : protected EnvObj
   // /** Compare by d_minimal. */
   // struct TrailMinimalCoefficientOrder {
   //   const context::CDList<Constraint>& d_trail;
-  //   TrailMinimalCoefficientOrder(const context::CDList<Constraint>& trail):
+  //   TrailMinimalCoefficientOrder(const context::CDList<Constraint>&
+  //   trail):
   //     d_trail(trail)
   //   {}
 
@@ -175,8 +175,7 @@ class DioSolver : protected EnvObj
    */
   context::CDQueue<TrailIndex> d_decompositionLemmaQueue;
 
-public:
-
+ public:
   /** Construct a Diophantine equation solver with the given context. */
  DioSolver(Env& env);
 
index c7504b263e23f41e6747929ba6e3b46d516ff4ee..3dc132b7f2eab0b93bd59938dd42a1962fbb94ce 100644 (file)
@@ -92,7 +92,7 @@ Node mkIRP(const Node& var,
 }  // namespace
 
 CoveringsProofGenerator::CoveringsProofGenerator(context::Context* ctx,
-                                     ProofNodeManager* pnm)
+                                                 ProofNodeManager* pnm)
     : d_pnm(pnm), d_proofs(pnm, ctx), d_current(nullptr)
 {
   d_false = NodeManager::currentNM()->mkConst<bool>(false);
index a643066f15095842ac5549d4f3c8c5be6fd029b9..51f50e942b981648dee03e048df9248e02d0c455 100644 (file)
 #include "expr/subs.h"
 #include "smt/env_obj.h"
 
-namespace cvc5::internal {
-
-namespace context {
+namespace cvc5::context {
 class Context;
 }
 
+namespace cvc5::internal {
+
 namespace theory {
 
 class TheoryModel;
index 58218a73152a923df7423f3a3feaca2123ea530b..5b9afde812dc8416bac4594636aa3a3b550a083a 100644 (file)
@@ -27,20 +27,21 @@ namespace cvc5::internal {
 namespace theory {
 namespace arith {
 
-ArithVariables::ArithVariables(context::Context* c, DeltaComputeCallback deltaComputingFunc)
- : d_vars(),
-   d_safeAssignment(),
-   d_numberOfVariables(0),
-   d_pool(),
-   d_released(),
-   d_nodeToArithVarMap(),
-   d_boundsQueue(),
-   d_enqueueingBoundCounts(true),
-   d_lbRevertHistory(c, true, LowerBoundCleanUp(this)),
-   d_ubRevertHistory(c, true, UpperBoundCleanUp(this)),
-   d_deltaIsSafe(false),
-   d_delta(-1,1),
-   d_deltaComputingFunc(deltaComputingFunc)
+ArithVariables::ArithVariables(context::Context* c,
+                               DeltaComputeCallback deltaComputingFunc)
+    : d_vars(),
+      d_safeAssignment(),
+      d_numberOfVariables(0),
+      d_pool(),
+      d_released(),
+      d_nodeToArithVarMap(),
+      d_boundsQueue(),
+      d_enqueueingBoundCounts(true),
+      d_lbRevertHistory(c, true, LowerBoundCleanUp(this)),
+      d_ubRevertHistory(c, true, UpperBoundCleanUp(this)),
+      d_deltaIsSafe(false),
+      d_delta(-1, 1),
+      d_deltaComputingFunc(deltaComputingFunc)
 { }
 
 ArithVar ArithVariables::getNumberOfVariables() const {
index 05f3db6bed491ad1dad8787cb8dc419d0d08a7e7..4375ee62924360e2bda48745483cb3a3ab0a1642 100644 (file)
 #include "theory/arith/constraint_forward.h"
 #include "theory/arith/delta_rational.h"
 
-namespace cvc5::internal {
-namespace context {
+namespace cvc5::context {
 class Context;
 }
+namespace cvc5::internal {
 namespace theory {
 namespace arith {
 
@@ -235,25 +235,25 @@ private:
 
 
 public:
-
-  ArithVariables(context::Context* c, DeltaComputeCallback deltaComputation);
-
-  /**
-   * This sets the lower bound for a variable in the current context.
-   * This must be stronger the previous constraint.
-   */
-  void setLowerBoundConstraint(ConstraintP lb);
-
-  /**
-   * This sets the upper bound for a variable in the current context.
-   * This must be stronger the previous constraint.
-   */
-  void setUpperBoundConstraint(ConstraintP ub);
-
-  /** Returns the constraint for the upper bound of a variable. */
 inline ConstraintP getUpperBoundConstraint(ArithVar x) const{
-    return d_vars[x].d_ub;
 }
+ ArithVariables(context::Context* c, DeltaComputeCallback deltaComputation);
+
+ /**
+  * This sets the lower bound for a variable in the current context.
+  * This must be stronger the previous constraint.
+  */
+ void setLowerBoundConstraint(ConstraintP lb);
+
+ /**
+  * This sets the upper bound for a variable in the current context.
+  * This must be stronger the previous constraint.
+  */
+ void setUpperBoundConstraint(ConstraintP ub);
+
+ /** Returns the constraint for the upper bound of a variable. */
+ inline ConstraintP getUpperBoundConstraint(ArithVar x) const
+ {
+   return d_vars[x].d_ub;
+ }
   /** Returns the constraint for the lower bound of a variable. */
   inline ConstraintP getLowerBoundConstraint(ArithVar x) const{
     return d_vars[x].d_lb;
index 6e11f124d5806fca30b5d7c0793920848c1c07e1..bfbaa79c616e79733d02465def8f7f899dca7c23 100644 (file)
@@ -719,11 +719,10 @@ private:
   void branchVector(const std::vector<ArithVar>& lemmas);
 
   context::CDO<unsigned> d_cutCount;
-  context::CDHashSet<ArithVar, std::hash<ArithVar> > d_cutInContext;
+  context::CDHashSet<ArithVar, std::hash<ArithVar>> d_cutInContext;
 
   context::CDO<bool> d_likelyIntegerInfeasible;
 
-
   context::CDO<bool> d_guessedCoeffSet;
   ArithRatPairVec d_guessedCoeffs;
 
index 15db3e1fae36d13e065a49ba822b2a0fd1ce3858..a911837cb386c0904ec59369af8591df4aa3486a 100644 (file)
@@ -43,8 +43,7 @@ Info::~Info() {
   in_stores->deleteSelf();
 }
 
-ArrayInfo::ArrayInfo(context::Context* c,
-                     std::string statisticsPrefix)
+ArrayInfo::ArrayInfo(context::Context* c, std::string statisticsPrefix)
     : ct(c),
       info_map(),
       d_mergeInfoTimer(smtStatisticsRegistry().registerTimer(
index a1136a2720dc887c4bbfabd234518ee39547a113..fb5ecd841d0257268f34f37a43f9d1dca626eafc 100644 (file)
@@ -56,33 +56,34 @@ bool inList(const CTNodeList* l, const TNode el);
 
 class Info {
 public:
-  context::CDO<bool> isNonLinear;
-  context::CDO<bool> rIntro1Applied;
-  context::CDO<TNode> modelRep;
-  context::CDO<TNode> constArr;
-  context::CDO<TNode> weakEquivPointer;
-  context::CDO<TNode> weakEquivIndex;
-  context::CDO<TNode> weakEquivSecondary;
-  context::CDO<TNode> weakEquivSecondaryReason;
-  CTNodeList* indices;
-  CTNodeList* stores;
-  CTNodeList* in_stores;
-
-  Info(context::Context* c);
-  ~Info();
-
-  /**
-   * prints the information
-   */
-  void print() const {
-    Assert(indices != NULL && stores != NULL && in_stores != NULL);
-    Trace("arrays-info")<<"  indices   ";
-    printList(indices);
-    Trace("arrays-info")<<"  stores ";
-    printList(stores);
-    Trace("arrays-info")<<"  in_stores ";
-    printList(in_stores);
-  }
+ context::CDO<bool> isNonLinear;
+ context::CDO<bool> rIntro1Applied;
+ context::CDO<TNode> modelRep;
+ context::CDO<TNode> constArr;
+ context::CDO<TNode> weakEquivPointer;
+ context::CDO<TNode> weakEquivIndex;
+ context::CDO<TNode> weakEquivSecondary;
+ context::CDO<TNode> weakEquivSecondaryReason;
+ CTNodeList* indices;
+ CTNodeList* stores;
+ CTNodeList* in_stores;
+
+ Info(context::Context* c);
+ ~Info();
+
+ /**
+  * prints the information
+  */
+ void print() const
+ {
+   Assert(indices != NULL && stores != NULL && in_stores != NULL);
+   Trace("arrays-info") << "  indices   ";
+   printList(indices);
+   Trace("arrays-info") << "  stores ";
+   printList(stores);
+   Trace("arrays-info") << "  in_stores ";
+   printList(in_stores);
+ }
 };/* class Info */
 
 typedef std::unordered_map<Node, Info*> CNodeInfoMap;
@@ -98,33 +99,33 @@ typedef std::unordered_map<Node, Info*> CNodeInfoMap;
  */
 class ArrayInfo {
 private:
 context::Context* ct;
 CNodeInfoMap info_map;
-
 CTNodeList* emptyList;
-
 /* == STATISTICS == */
-
 /** time spent in preregisterTerm() */
 TimerStat d_mergeInfoTimer;
 AverageStat d_avgIndexListLength;
 AverageStat d_avgStoresListLength;
 AverageStat d_avgInStoresListLength;
 IntStat d_listsCount;
 IntStat d_callsMergeInfo;
 IntStat d_maxList;
 SizeStat<CNodeInfoMap> d_tableSize;
-
 /**
-   * checks if a certain element is in the list l
-   * FIXME: better way to check for duplicates?
-   */
-
 /**
-   * helper method that merges two lists into the first
-   * without adding duplicates
-   */
 void mergeLists(CTNodeList* la, const CTNodeList* lb) const;
+ context::Context* ct;
+ CNodeInfoMap info_map;
+
+ CTNodeList* emptyList;
+
+ /* == STATISTICS == */
+
+ /** time spent in preregisterTerm() */
+ TimerStat d_mergeInfoTimer;
+ AverageStat d_avgIndexListLength;
+ AverageStat d_avgStoresListLength;
+ AverageStat d_avgInStoresListLength;
+ IntStat d_listsCount;
+ IntStat d_callsMergeInfo;
+ IntStat d_maxList;
+ SizeStat<CNodeInfoMap> d_tableSize;
+
+ /**
+  * checks if a certain element is in the list l
+  * FIXME: better way to check for duplicates?
+  */
+
+ /**
+  * helper method that merges two lists into the first
+  * without adding duplicates
+  */
+ void mergeLists(CTNodeList* la, const CTNodeList* lb) const;
 
 public:
   const Info* emptyInfo;
index 8752779fd4125321c1f7e7b8c8da4ae7f1ddba0a..e82f30c0197a442f02a5a6e9c60c07bb2acf01fd 100644 (file)
@@ -1190,7 +1190,8 @@ void TheoryArrays::postCheck(Effort level)
       && weakEquiv)
   {
     // Replay all array merges to update weak equivalence data structures
-    context::CDList<Node>::iterator it = d_arrayMerges.begin(), iend = d_arrayMerges.end();
+    context::CDList<Node>::iterator it = d_arrayMerges.begin(),
+                                    iend = d_arrayMerges.end();
     TNode a, b, eq;
     for (; it != iend; ++it) {
       eq = *it;
index 0b10859c6dded4cf7ed4c8631e6cc7bbe518991b..05f58085bbc4ff7f8b1411c2ea2b1514cad63c90 100644 (file)
@@ -371,7 +371,7 @@ class TheoryArrays : public Theory {
   using RowLemmaType = std::tuple<TNode, TNode, TNode, TNode>;
 
   context::CDQueue<RowLemmaType> d_RowQueue;
-  context::CDHashSet<RowLemmaType, RowLemmaTypeHashFunction > d_RowAlreadyAdded;
+  context::CDHashSet<RowLemmaType, RowLemmaTypeHashFunction> d_RowAlreadyAdded;
 
   typedef context::CDHashSet<Node> CDNodeSet;
 
@@ -389,24 +389,29 @@ class TheoryArrays : public Theory {
   context::CDList<TNode> d_constReadsList;
   context::Context* d_constReadsContext;
   /** Helper class to keep d_constReadsContext in sync with satContext */
-  class ContextPopper : public context::ContextNotifyObj {
+  class ContextPopper : public context::ContextNotifyObj
+  {
     context::Context* d_satContext;
     context::Context* d_contextToPop;
-  protected:
-   void contextNotifyPop() override
-   {
-     if (d_contextToPop->getLevel() > d_satContext->getLevel())
-     {
-       d_contextToPop->pop();
-     }
+
+   protected:
+    void contextNotifyPop() override
+    {
+      if (d_contextToPop->getLevel() > d_satContext->getLevel())
+      {
+        d_contextToPop->pop();
+      }
     }
-  public:
+
+   public:
     ContextPopper(context::Context* context, context::Context* contextToPop)
-      :context::ContextNotifyObj(context), d_satContext(context),
-       d_contextToPop(contextToPop)
-    {}
+        : context::ContextNotifyObj(context),
+          d_satContext(context),
+          d_contextToPop(contextToPop)
+    {
+    }
 
-  };/* class ContextPopper */
+  }; /* class ContextPopper */
   ContextPopper d_contextPopper;
 
   // The decision requests we have for the core
index 866d3ae8653bf2a556e99fd679429f030620d715..958dc7eadb11034f41fbecbf684523770696938a 100644 (file)
 #include "expr/node.h"
 #include "context/cdo.h"
 
-namespace cvc5::internal {
-
-namespace context {
-  class Context;
-  }  // namespace context
+namespace cvc5::context {
+class Context;
+}
 
+namespace cvc5::internal {
 namespace theory {
 namespace arrays {
 
 // NodeType \in { Node, TNode }
 template <class NodeType, class NodeHash>
-class UnionFind : context::ContextNotifyObj {
+class UnionFind : context::ContextNotifyObj
+{
   /** Our underlying map type. */
   typedef std::unordered_map<NodeType, NodeType, NodeHash> MapType;
 
@@ -55,9 +55,9 @@ class UnionFind : context::ContextNotifyObj {
   context::CDO<size_t> d_offset;
 
  public:
-  UnionFind(context::Context* ctxt) :
-    context::ContextNotifyObj(ctxt),
-    d_offset(ctxt, 0) {
+  UnionFind(context::Context* ctxt)
+      : context::ContextNotifyObj(ctxt), d_offset(ctxt, 0)
+  {
   }
 
   /**
@@ -84,7 +84,7 @@ class UnionFind : context::ContextNotifyObj {
    */
   void notify();
 
-};/* class UnionFind<> */
+}; /* class UnionFind<> */
 
 template <class NodeType, class NodeHash>
 inline TNode UnionFind<NodeType, NodeHash>::debugFind(TNode n) const {
index 0b956098228e46d9fc1ce986b8752c376a75b504..db71ba7ef104410557a1122a9825ead2d20b3620 100644 (file)
@@ -21,9 +21,9 @@
 using namespace cvc5::internal;
 
 AtomRequests::AtomRequests(context::Context* context)
-: d_allRequests(context)
-, d_requests(context)
-, d_triggerToRequestMap(context)
+    : d_allRequests(context),
+      d_requests(context),
+      d_triggerToRequestMap(context)
 {}
 
 AtomRequests::element_index AtomRequests::getList(TNode trigger) const {
index 32257b5b01445057a1cac755cf968d3026d9b95d..c9c12d483acb5cca7da401b638587ad0aa12a89a 100644 (file)
@@ -25,7 +25,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index b8b874248bdc9d44e5a084958be340c127f845bc..7c33f5699d737c9708d70727fe44617b67cffc49 100644 (file)
@@ -26,7 +26,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 2561e7b6d76116d46d4a1f57f1d71cba0b9bb2fc..2a019b9804fd60264f364812ffb88f7178da68ca 100644 (file)
@@ -120,8 +120,7 @@ BVSolverBitblast::BVSolverBitblast(Env& env,
       d_bbInputFacts(context()),
       d_assumptions(context()),
       d_assertions(context()),
-      d_epg(pnm ? new EagerProofGenerator(pnm, userContext(), "")
-                : nullptr),
+      d_epg(pnm ? new EagerProofGenerator(pnm, userContext(), "") : nullptr),
       d_factLiteralCache(context()),
       d_literalFactCache(context()),
       d_propagate(options().bv.bitvectorPropagate),
index ba3e3ea66cdb4bbd90f1f0885671fa43da44fd23..79b5c04ad2649e822760ae148f2104551e726edd 100644 (file)
@@ -368,7 +368,6 @@ class IntBlaster : protected EnvObj
 
   /** an SolverEngine for context */
   context::Context* d_context;
-
 };
 
 }  // namespace cvc5::internal
index 798e8690b7dafe95564db4098c604f459de19a64..39ca108687e052369d68f495fb102f308988efa4 100644 (file)
@@ -39,7 +39,7 @@
 
 using namespace cvc5::internal;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::theory;
 using namespace cvc5::internal::theory::datatypes;
 
index 8bbd179c7a5ef18c055ba89879e5216aa73b565e..6ff5261ff59bc072014f75350b029a222dff501d 100644 (file)
@@ -43,7 +43,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
@@ -680,9 +680,7 @@ void TheoryDatatypes::merge( Node t1, Node t2 ){
 }
 
 TheoryDatatypes::EqcInfo::EqcInfo(context::Context* c)
-    : d_inst(c, false),
-      d_constructor(c, Node::null()),
-      d_selectors(c, false)
+    : d_inst(c, false), d_constructor(c, Node::null()), d_selectors(c, false)
 {}
 
 bool TheoryDatatypes::hasLabel( EqcInfo* eqc, Node n ){
index 284c13c929ff1bd00492a906e7ef82e61fd7261b..a54ea6275354cae99ef731b5b4d9e3b307ff3071 100644 (file)
@@ -78,14 +78,14 @@ private:
   class EqcInfo
   {
   public:
-    EqcInfo( context::Context* c );
-    ~EqcInfo(){}
-    //whether we have instantiatied this eqc
-    context::CDO< bool > d_inst;
-    //constructor equal to this eqc
-    context::CDO< Node > d_constructor;
-    //all selectors whose argument is this eqc
-    context::CDO< bool > d_selectors;
+   EqcInfo(context::Context* c);
+   ~EqcInfo() {}
+   // whether we have instantiatied this eqc
+   context::CDO<bool> d_inst;
+   // constructor equal to this eqc
+   context::CDO<Node> d_constructor;
+   // all selectors whose argument is this eqc
+   context::CDO<bool> d_selectors;
   };
   /** does eqc of n have a label (do we know its constructor)? */
   bool hasLabel( EqcInfo* eqc, Node n );
index 732cbb5ec371e782299e4a332c8d4de320501811..bcf956088a5163eb6b89f5bb4501e4df3d608ea2 100644 (file)
@@ -41,7 +41,7 @@ class Theory;
  */
 class EngineOutputChannel : public theory::OutputChannel
 {
-  friend class TheoryEngine;
+  friend class internal::TheoryEngine;
 
  public:
   EngineOutputChannel(TheoryEngine* engine, theory::TheoryId theory);
index aead0414e4628167e90f02eb92f4a01b5a0d97f8..97ee04c3d0dbc50c1c45fb36b73f1bc1fb6fd14c 100644 (file)
 #include "util/floatingpoint_literal_symfpu.h"
 
 namespace symfpu {
-using namespace ::cvc5::internal::theory::fp::symfpuSymbolic;
-
-#define CVC5_SYM_ITE_DFN(T)                                                \
-  template <>                                                              \
-  struct ite<symbolicProposition, T>                                       \
-  {                                                                        \
-    static const T iteOp(const symbolicProposition& _cond,                 \
-                         const T& _l,                                      \
-                         const T& _r)                                      \
-    {                                                                      \
-      ::cvc5::internal::NodeManager* nm = ::cvc5::internal::NodeManager::currentNM();          \
-                                                                           \
-      ::cvc5::internal::Node cond = _cond;                                           \
-      ::cvc5::internal::Node l = _l;                                                 \
-      ::cvc5::internal::Node r = _r;                                                 \
-                                                                           \
-      /* Handle some common symfpu idioms */                               \
-      if (cond.isConst())                                                  \
-      {                                                                    \
-        return (cond == nm->mkConst(::cvc5::internal::BitVector(1U, 1U))) ? l : r;   \
-      }                                                                    \
-      else                                                                 \
-      {                                                                    \
-        if (l.getKind() == ::cvc5::internal::kind::BITVECTOR_ITE)                    \
-        {                                                                  \
-          if (l[1] == r)                                                   \
-          {                                                                \
-            return nm->mkNode(                                             \
-                ::cvc5::internal::kind::BITVECTOR_ITE,                               \
-                nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND,                    \
-                           cond,                                           \
-                           nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, l[0])), \
-                l[2],                                                      \
-                r);                                                        \
-          }                                                                \
-          else if (l[2] == r)                                              \
-          {                                                                \
-            return nm->mkNode(                                             \
-                ::cvc5::internal::kind::BITVECTOR_ITE,                               \
-                nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND, cond, l[0]),       \
-                l[1],                                                      \
-                r);                                                        \
-          }                                                                \
-        }                                                                  \
-        else if (r.getKind() == ::cvc5::internal::kind::BITVECTOR_ITE)               \
-        {                                                                  \
-          if (r[1] == l)                                                   \
-          {                                                                \
-            return nm->mkNode(                                             \
-                ::cvc5::internal::kind::BITVECTOR_ITE,                               \
-                nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND,                    \
-                           nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, cond),  \
-                           nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, r[0])), \
-                r[2],                                                      \
-                l);                                                        \
-          }                                                                \
-          else if (r[2] == l)                                              \
-          {                                                                \
-            return nm->mkNode(                                             \
-                ::cvc5::internal::kind::BITVECTOR_ITE,                               \
-                nm->mkNode(::cvc5::internal::kind::BITVECTOR_AND,                    \
-                           nm->mkNode(::cvc5::internal::kind::BITVECTOR_NOT, cond),  \
-                           r[0]),                                          \
-                r[1],                                                      \
-                l);                                                        \
-          }                                                                \
-        }                                                                  \
-      }                                                                    \
-      return T(nm->mkNode(::cvc5::internal::kind::BITVECTOR_ITE, cond, l, r));       \
-    }                                                                      \
+using namespace cvc5::internal::theory::fp::symfpuSymbolic;
+
+#define CVC5_SYM_ITE_DFN(T)                                                  \
+  template <>                                                                \
+  struct ite<symbolicProposition, T>                                         \
+  {                                                                          \
+    static const T iteOp(const symbolicProposition& _cond,                   \
+                         const T& _l,                                        \
+                         const T& _r)                                        \
+    {                                                                        \
+      cvc5::internal::NodeManager* nm =                                      \
+          cvc5::internal::NodeManager::currentNM();                          \
+                                                                             \
+      cvc5::internal::Node cond = _cond;                                     \
+      cvc5::internal::Node l = _l;                                           \
+      cvc5::internal::Node r = _r;                                           \
+                                                                             \
+      /* Handle some common symfpu idioms */                                 \
+      if (cond.isConst())                                                    \
+      {                                                                      \
+        return (cond == nm->mkConst(cvc5::internal::BitVector(1U, 1U))) ? l  \
+                                                                        : r; \
+      }                                                                      \
+      else                                                                   \
+      {                                                                      \
+        if (l.getKind() == cvc5::internal::kind::BITVECTOR_ITE)              \
+        {                                                                    \
+          if (l[1] == r)                                                     \
+          {                                                                  \
+            return nm->mkNode(                                               \
+                cvc5::internal::kind::BITVECTOR_ITE,                         \
+                nm->mkNode(                                                  \
+                    cvc5::internal::kind::BITVECTOR_AND,                     \
+                    cond,                                                    \
+                    nm->mkNode(cvc5::internal::kind::BITVECTOR_NOT, l[0])),  \
+                l[2],                                                        \
+                r);                                                          \
+          }                                                                  \
+          else if (l[2] == r)                                                \
+          {                                                                  \
+            return nm->mkNode(                                               \
+                cvc5::internal::kind::BITVECTOR_ITE,                         \
+                nm->mkNode(cvc5::internal::kind::BITVECTOR_AND, cond, l[0]), \
+                l[1],                                                        \
+                r);                                                          \
+          }                                                                  \
+        }                                                                    \
+        else if (r.getKind() == cvc5::internal::kind::BITVECTOR_ITE)         \
+        {                                                                    \
+          if (r[1] == l)                                                     \
+          {                                                                  \
+            return nm->mkNode(                                               \
+                cvc5::internal::kind::BITVECTOR_ITE,                         \
+                nm->mkNode(                                                  \
+                    cvc5::internal::kind::BITVECTOR_AND,                     \
+                    nm->mkNode(cvc5::internal::kind::BITVECTOR_NOT, cond),   \
+                    nm->mkNode(cvc5::internal::kind::BITVECTOR_NOT, r[0])),  \
+                r[2],                                                        \
+                l);                                                          \
+          }                                                                  \
+          else if (r[2] == l)                                                \
+          {                                                                  \
+            return nm->mkNode(                                               \
+                cvc5::internal::kind::BITVECTOR_ITE,                         \
+                nm->mkNode(                                                  \
+                    cvc5::internal::kind::BITVECTOR_AND,                     \
+                    nm->mkNode(cvc5::internal::kind::BITVECTOR_NOT, cond),   \
+                    r[0]),                                                   \
+                r[1],                                                        \
+                l);                                                          \
+          }                                                                  \
+        }                                                                    \
+      }                                                                      \
+      return T(nm->mkNode(cvc5::internal::kind::BITVECTOR_ITE, cond, l, r)); \
+    }                                                                        \
   }
 
 // Can (unsurprisingly) only ITE things which contain Nodes
@@ -391,8 +396,9 @@ symbolicBitVector<true> symbolicBitVector<true>::maxValue(const bwt& w)
   symbolicBitVector<true> leadingZero(symbolicBitVector<true>::zero(1));
   symbolicBitVector<true> base(symbolicBitVector<true>::allOnes(w - 1));
 
-  return symbolicBitVector<true>(::cvc5::internal::NodeManager::currentNM()->mkNode(
-      ::cvc5::internal::kind::BITVECTOR_CONCAT, leadingZero, base));
+  return symbolicBitVector<true>(
+      cvc5::internal::NodeManager::currentNM()->mkNode(
+          cvc5::internal::kind::BITVECTOR_CONCAT, leadingZero, base));
 }
 
 template <>
@@ -407,8 +413,9 @@ symbolicBitVector<true> symbolicBitVector<true>::minValue(const bwt& w)
   symbolicBitVector<true> leadingOne(symbolicBitVector<true>::one(1));
   symbolicBitVector<true> base(symbolicBitVector<true>::zero(w - 1));
 
-  return symbolicBitVector<true>(::cvc5::internal::NodeManager::currentNM()->mkNode(
-      ::cvc5::internal::kind::BITVECTOR_CONCAT, leadingOne, base));
+  return symbolicBitVector<true>(
+      cvc5::internal::NodeManager::currentNM()->mkNode(
+          cvc5::internal::kind::BITVECTOR_CONCAT, leadingOne, base));
 }
 
 template <>
@@ -793,8 +800,8 @@ Node FpWordBlaster::rmToNode(const rm& r) const
 Node FpWordBlaster::propToNode(const prop& p) const
 {
   NodeManager* nm = NodeManager::currentNM();
-  Node value =
-      nm->mkNode(kind::EQUAL, p, nm->mkConst(::cvc5::internal::BitVector(1U, 1U)));
+  Node value = nm->mkNode(
+      kind::EQUAL, p, nm->mkConst(cvc5::internal::BitVector(1U, 1U)));
   return value;
 }
 Node FpWordBlaster::ubvToNode(const ubv& u) const { return u; }
index ac6f1072c50b4a1f684fb4d48bbc4734838a4692..d52fd4084091a37f9953b6d5eef1b789e9da5edf 100644 (file)
@@ -430,7 +430,8 @@ void TheoryFp::wordBlastAndEquateTerm(TNode node)
     NodeManager* nm = NodeManager::currentNM();
 
     handleLemma(
-        nm->mkNode(kind::EQUAL, addA, nm->mkConst(::cvc5::internal::BitVector(1U, 1U))),
+        nm->mkNode(
+            kind::EQUAL, addA, nm->mkConst(cvc5::internal::BitVector(1U, 1U))),
         InferenceId::FP_EQUATE_TERM);
 
     ++oldSize;
@@ -447,11 +448,12 @@ void TheoryFp::wordBlastAndEquateTerm(TNode node)
       NodeManager* nm = NodeManager::currentNM();
 
       handleLemma(
-          nm->mkNode(kind::EQUAL,
-                     node,
-                     nm->mkNode(kind::EQUAL,
-                                wordBlasted,
-                                nm->mkConst(::cvc5::internal::BitVector(1U, 1U)))),
+          nm->mkNode(
+              kind::EQUAL,
+              node,
+              nm->mkNode(kind::EQUAL,
+                         wordBlasted,
+                         nm->mkConst(cvc5::internal::BitVector(1U, 1U)))),
           InferenceId::FP_EQUATE_TERM);
     }
     else
index 007bbebb1e7c14320bb3f032023891c3b7eaba06..9ffc185fc58697944f4bfab13ac9f999cd18f659 100644 (file)
@@ -1076,275 +1076,280 @@ RewriteResponse maxTotal(TNode node, bool isPreRewrite)
   /**
    * Initialize the rewriter.
    */
-TheoryFpRewriter::TheoryFpRewriter(context::UserContext* u) : d_fpExpDef(u)
-{
-  /* Set up the pre-rewrite dispatch table */
-  for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
+  TheoryFpRewriter::TheoryFpRewriter(context::UserContext* u) : d_fpExpDef(u)
   {
-    d_preRewriteTable[i] = rewrite::notFP;
-  }
+    /* Set up the pre-rewrite dispatch table */
+    for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
+    {
+      d_preRewriteTable[i] = rewrite::notFP;
+    }
 
-  /******** Constants ********/
-  /* No rewriting possible for constants */
-  d_preRewriteTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
-  d_preRewriteTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
-
-  /******** Sorts(?) ********/
-  /* These kinds should only appear in types */
-  // d_preRewriteTable[kind::ROUNDINGMODE_TYPE] = rewrite::type;
-  d_preRewriteTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
-
-  /******** Operations ********/
-  d_preRewriteTable[kind::FLOATINGPOINT_FP] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_ABS] = rewrite::compactAbs;
-  d_preRewriteTable[kind::FLOATINGPOINT_NEG] = rewrite::removeDoubleNegation;
-  d_preRewriteTable[kind::FLOATINGPOINT_ADD] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_SUB] =
-      rewrite::convertSubtractionToAddition;
-  d_preRewriteTable[kind::FLOATINGPOINT_MULT] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_DIV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_FMA] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_SQRT] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_REM] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_RTI] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_MIN] = rewrite::compactMinMax;
-  d_preRewriteTable[kind::FLOATINGPOINT_MAX] = rewrite::compactMinMax;
-  d_preRewriteTable[kind::FLOATINGPOINT_MIN_TOTAL] = rewrite::compactMinMax;
-  d_preRewriteTable[kind::FLOATINGPOINT_MAX_TOTAL] = rewrite::compactMinMax;
-
-  /******** Comparisons ********/
-  d_preRewriteTable[kind::FLOATINGPOINT_EQ] =
-      rewrite::then<rewrite::breakChain, rewrite::ieeeEqToEq>;
-  d_preRewriteTable[kind::FLOATINGPOINT_LEQ] =
-      rewrite::then<rewrite::breakChain, rewrite::leqId>;
-  d_preRewriteTable[kind::FLOATINGPOINT_LT] =
-      rewrite::then<rewrite::breakChain, rewrite::ltId>;
-  d_preRewriteTable[kind::FLOATINGPOINT_GEQ] =
-      rewrite::then<rewrite::breakChain, rewrite::geqToleq>;
-  d_preRewriteTable[kind::FLOATINGPOINT_GT] =
-      rewrite::then<rewrite::breakChain, rewrite::gtTolt>;
-
-  /******** Classifications ********/
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_NORMAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_SUBNORMAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_ZERO] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_INF] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_NAN] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_NEG] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_IS_POS] = rewrite::identity;
-
-  /******** Conversions ********/
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_UBV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_SBV] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_REAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] = rewrite::identity;
-
-  /******** Variables ********/
-  d_preRewriteTable[kind::VARIABLE] = rewrite::variable;
-  d_preRewriteTable[kind::BOUND_VARIABLE] = rewrite::variable;
-  d_preRewriteTable[kind::SKOLEM] = rewrite::variable;
-  d_preRewriteTable[kind::INST_CONSTANT] = rewrite::variable;
-
-  d_preRewriteTable[kind::EQUAL] = rewrite::equal;
-
-  /******** Components for bit-blasting ********/
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_NAN] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_INF] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_ZERO] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGN] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] = rewrite::identity;
-  d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
-      rewrite::identity;
-  d_preRewriteTable[kind::ROUNDINGMODE_BITBLAST] = rewrite::identity;
-
-  /* Set up the post-rewrite dispatch table */
-  for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
-  {
-    d_postRewriteTable[i] = rewrite::notFP;
-  }
+    /******** Constants ********/
+    /* No rewriting possible for constants */
+    d_preRewriteTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
+    d_preRewriteTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
+
+    /******** Sorts(?) ********/
+    /* These kinds should only appear in types */
+    // d_preRewriteTable[kind::ROUNDINGMODE_TYPE] = rewrite::type;
+    d_preRewriteTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
+
+    /******** Operations ********/
+    d_preRewriteTable[kind::FLOATINGPOINT_FP] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_ABS] = rewrite::compactAbs;
+    d_preRewriteTable[kind::FLOATINGPOINT_NEG] = rewrite::removeDoubleNegation;
+    d_preRewriteTable[kind::FLOATINGPOINT_ADD] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_SUB] =
+        rewrite::convertSubtractionToAddition;
+    d_preRewriteTable[kind::FLOATINGPOINT_MULT] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_DIV] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_FMA] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_SQRT] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_REM] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_RTI] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_MIN] = rewrite::compactMinMax;
+    d_preRewriteTable[kind::FLOATINGPOINT_MAX] = rewrite::compactMinMax;
+    d_preRewriteTable[kind::FLOATINGPOINT_MIN_TOTAL] = rewrite::compactMinMax;
+    d_preRewriteTable[kind::FLOATINGPOINT_MAX_TOTAL] = rewrite::compactMinMax;
+
+    /******** Comparisons ********/
+    d_preRewriteTable[kind::FLOATINGPOINT_EQ] =
+        rewrite::then<rewrite::breakChain, rewrite::ieeeEqToEq>;
+    d_preRewriteTable[kind::FLOATINGPOINT_LEQ] =
+        rewrite::then<rewrite::breakChain, rewrite::leqId>;
+    d_preRewriteTable[kind::FLOATINGPOINT_LT] =
+        rewrite::then<rewrite::breakChain, rewrite::ltId>;
+    d_preRewriteTable[kind::FLOATINGPOINT_GEQ] =
+        rewrite::then<rewrite::breakChain, rewrite::geqToleq>;
+    d_preRewriteTable[kind::FLOATINGPOINT_GT] =
+        rewrite::then<rewrite::breakChain, rewrite::gtTolt>;
+
+    /******** Classifications ********/
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_NORMAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_SUBNORMAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_ZERO] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_INF] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_NAN] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_NEG] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_IS_POS] = rewrite::identity;
+
+    /******** Conversions ********/
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] =
+        rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_UBV] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_SBV] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_REAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] = rewrite::identity;
+
+    /******** Variables ********/
+    d_preRewriteTable[kind::VARIABLE] = rewrite::variable;
+    d_preRewriteTable[kind::BOUND_VARIABLE] = rewrite::variable;
+    d_preRewriteTable[kind::SKOLEM] = rewrite::variable;
+    d_preRewriteTable[kind::INST_CONSTANT] = rewrite::variable;
+
+    d_preRewriteTable[kind::EQUAL] = rewrite::equal;
+
+    /******** Components for bit-blasting ********/
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_NAN] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_INF] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_ZERO] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGN] = rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] =
+        rewrite::identity;
+    d_preRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
+        rewrite::identity;
+    d_preRewriteTable[kind::ROUNDINGMODE_BITBLAST] = rewrite::identity;
+
+    /* Set up the post-rewrite dispatch table */
+    for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
+    {
+      d_postRewriteTable[i] = rewrite::notFP;
+    }
 
-  /******** Constants ********/
-  /* No rewriting possible for constants */
-  d_postRewriteTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
-  d_postRewriteTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
-
-  /******** Sorts(?) ********/
-  /* These kinds should only appear in types */
-  // d_postRewriteTable[kind::ROUNDINGMODE_TYPE] = rewrite::type;
-  d_postRewriteTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
-
-  /******** Operations ********/
-  d_postRewriteTable[kind::FLOATINGPOINT_FP] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_ABS] = rewrite::compactAbs;
-  d_postRewriteTable[kind::FLOATINGPOINT_NEG] = rewrite::removeDoubleNegation;
-  d_postRewriteTable[kind::FLOATINGPOINT_ADD] = rewrite::reorderBinaryOperation;
-  d_postRewriteTable[kind::FLOATINGPOINT_SUB] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_MULT] =
-      rewrite::reorderBinaryOperation;
-  d_postRewriteTable[kind::FLOATINGPOINT_DIV] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_FMA] = rewrite::reorderFMA;
-  d_postRewriteTable[kind::FLOATINGPOINT_SQRT] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_REM] = rewrite::compactRemainder;
-  d_postRewriteTable[kind::FLOATINGPOINT_RTI] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_MIN] = rewrite::compactMinMax;
-  d_postRewriteTable[kind::FLOATINGPOINT_MAX] = rewrite::compactMinMax;
-  d_postRewriteTable[kind::FLOATINGPOINT_MIN_TOTAL] = rewrite::compactMinMax;
-  d_postRewriteTable[kind::FLOATINGPOINT_MAX_TOTAL] = rewrite::compactMinMax;
-
-  /******** Comparisons ********/
-  d_postRewriteTable[kind::FLOATINGPOINT_EQ] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_LEQ] = rewrite::leqId;
-  d_postRewriteTable[kind::FLOATINGPOINT_LT] = rewrite::ltId;
-  d_postRewriteTable[kind::FLOATINGPOINT_GEQ] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_GT] = rewrite::identity;
-
-  /******** Classifications ********/
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_NORMAL] =
-      rewrite::removeSignOperations;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_SUBNORMAL] =
-      rewrite::removeSignOperations;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_ZERO] =
-      rewrite::removeSignOperations;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_INF] =
-      rewrite::removeSignOperations;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_NAN] =
-      rewrite::removeSignOperations;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_NEG] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_IS_POS] = rewrite::identity;
-
-  /******** Conversions ********/
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] =
-      rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] =
-      rewrite::toFPSignedBV;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_UBV] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_SBV] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_REAL] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] = rewrite::identity;
-
-  /******** Variables ********/
-  d_postRewriteTable[kind::VARIABLE] = rewrite::variable;
-  d_postRewriteTable[kind::BOUND_VARIABLE] = rewrite::variable;
-  d_postRewriteTable[kind::SKOLEM] = rewrite::variable;
-  d_postRewriteTable[kind::INST_CONSTANT] = rewrite::variable;
-
-  d_postRewriteTable[kind::EQUAL] = rewrite::equal;
-
-  /******** Components for bit-blasting ********/
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_NAN] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_INF] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_ZERO] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGN] = rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] =
-      rewrite::identity;
-  d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
-      rewrite::identity;
-  d_postRewriteTable[kind::ROUNDINGMODE_BITBLAST] = rewrite::identity;
-
-  /* Set up the post-rewrite constant fold table */
-  for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
-  {
-    // Note that this is identity, not notFP
-    // Constant folding is called after post-rewrite
-    // So may have to deal with cases of things being
-    // re-written to non-floating-point sorts (i.e. true).
-    d_constantFoldTable[i] = rewrite::identity;
-  }
+    /******** Constants ********/
+    /* No rewriting possible for constants */
+    d_postRewriteTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
+    d_postRewriteTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
+
+    /******** Sorts(?) ********/
+    /* These kinds should only appear in types */
+    // d_postRewriteTable[kind::ROUNDINGMODE_TYPE] = rewrite::type;
+    d_postRewriteTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
+
+    /******** Operations ********/
+    d_postRewriteTable[kind::FLOATINGPOINT_FP] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_ABS] = rewrite::compactAbs;
+    d_postRewriteTable[kind::FLOATINGPOINT_NEG] = rewrite::removeDoubleNegation;
+    d_postRewriteTable[kind::FLOATINGPOINT_ADD] =
+        rewrite::reorderBinaryOperation;
+    d_postRewriteTable[kind::FLOATINGPOINT_SUB] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_MULT] =
+        rewrite::reorderBinaryOperation;
+    d_postRewriteTable[kind::FLOATINGPOINT_DIV] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_FMA] = rewrite::reorderFMA;
+    d_postRewriteTable[kind::FLOATINGPOINT_SQRT] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_REM] = rewrite::compactRemainder;
+    d_postRewriteTable[kind::FLOATINGPOINT_RTI] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_MIN] = rewrite::compactMinMax;
+    d_postRewriteTable[kind::FLOATINGPOINT_MAX] = rewrite::compactMinMax;
+    d_postRewriteTable[kind::FLOATINGPOINT_MIN_TOTAL] = rewrite::compactMinMax;
+    d_postRewriteTable[kind::FLOATINGPOINT_MAX_TOTAL] = rewrite::compactMinMax;
+
+    /******** Comparisons ********/
+    d_postRewriteTable[kind::FLOATINGPOINT_EQ] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_LEQ] = rewrite::leqId;
+    d_postRewriteTable[kind::FLOATINGPOINT_LT] = rewrite::ltId;
+    d_postRewriteTable[kind::FLOATINGPOINT_GEQ] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_GT] = rewrite::identity;
+
+    /******** Classifications ********/
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_NORMAL] =
+        rewrite::removeSignOperations;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_SUBNORMAL] =
+        rewrite::removeSignOperations;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_ZERO] =
+        rewrite::removeSignOperations;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_INF] =
+        rewrite::removeSignOperations;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_NAN] =
+        rewrite::removeSignOperations;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_NEG] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_IS_POS] = rewrite::identity;
+
+    /******** Conversions ********/
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] =
+        rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] =
+        rewrite::toFPSignedBV;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_UBV] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_SBV] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_REAL] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] = rewrite::identity;
+
+    /******** Variables ********/
+    d_postRewriteTable[kind::VARIABLE] = rewrite::variable;
+    d_postRewriteTable[kind::BOUND_VARIABLE] = rewrite::variable;
+    d_postRewriteTable[kind::SKOLEM] = rewrite::variable;
+    d_postRewriteTable[kind::INST_CONSTANT] = rewrite::variable;
+
+    d_postRewriteTable[kind::EQUAL] = rewrite::equal;
+
+    /******** Components for bit-blasting ********/
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_NAN] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_INF] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_ZERO] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGN] = rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] =
+        rewrite::identity;
+    d_postRewriteTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
+        rewrite::identity;
+    d_postRewriteTable[kind::ROUNDINGMODE_BITBLAST] = rewrite::identity;
+
+    /* Set up the post-rewrite constant fold table */
+    for (uint32_t i = 0; i < kind::LAST_KIND; ++i)
+    {
+      // Note that this is identity, not notFP
+      // Constant folding is called after post-rewrite
+      // So may have to deal with cases of things being
+      // re-written to non-floating-point sorts (i.e. true).
+      d_constantFoldTable[i] = rewrite::identity;
+    }
 
-  /******** Constants ********/
-  /* Already folded! */
-  d_constantFoldTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
-  d_constantFoldTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
-
-  /******** Sorts(?) ********/
-  /* These kinds should only appear in types */
-  d_constantFoldTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
-
-  /******** Operations ********/
-  d_constantFoldTable[kind::FLOATINGPOINT_FP] = constantFold::fpLiteral;
-  d_constantFoldTable[kind::FLOATINGPOINT_ABS] = constantFold::abs;
-  d_constantFoldTable[kind::FLOATINGPOINT_NEG] = constantFold::neg;
-  d_constantFoldTable[kind::FLOATINGPOINT_ADD] = constantFold::add;
-  d_constantFoldTable[kind::FLOATINGPOINT_MULT] = constantFold::mult;
-  d_constantFoldTable[kind::FLOATINGPOINT_DIV] = constantFold::div;
-  d_constantFoldTable[kind::FLOATINGPOINT_FMA] = constantFold::fma;
-  d_constantFoldTable[kind::FLOATINGPOINT_SQRT] = constantFold::sqrt;
-  d_constantFoldTable[kind::FLOATINGPOINT_REM] = constantFold::rem;
-  d_constantFoldTable[kind::FLOATINGPOINT_RTI] = constantFold::rti;
-  d_constantFoldTable[kind::FLOATINGPOINT_MIN] = constantFold::min;
-  d_constantFoldTable[kind::FLOATINGPOINT_MAX] = constantFold::max;
-  d_constantFoldTable[kind::FLOATINGPOINT_MIN_TOTAL] = constantFold::minTotal;
-  d_constantFoldTable[kind::FLOATINGPOINT_MAX_TOTAL] = constantFold::maxTotal;
-
-  /******** Comparisons ********/
-  d_constantFoldTable[kind::FLOATINGPOINT_LEQ] = constantFold::leq;
-  d_constantFoldTable[kind::FLOATINGPOINT_LT] = constantFold::lt;
-
-  /******** Classifications ********/
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_NORMAL] = constantFold::isNormal;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_SUBNORMAL] =
-      constantFold::isSubnormal;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_ZERO] = constantFold::isZero;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_INF] = constantFold::isInfinite;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_NAN] = constantFold::isNaN;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_NEG] = constantFold::isNegative;
-  d_constantFoldTable[kind::FLOATINGPOINT_IS_POS] = constantFold::isPositive;
-
-  /******** Conversions ********/
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] =
-      constantFold::convertFromIEEEBitVectorLiteral;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] =
-      constantFold::constantConvert;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] =
-      constantFold::convertFromRealLiteral;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] =
-      constantFold::convertFromSBV;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] =
-      constantFold::convertFromUBV;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_UBV] = constantFold::convertToUBV;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_SBV] = constantFold::convertToSBV;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_REAL] =
-      constantFold::convertToReal;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] =
-      constantFold::convertToUBVTotal;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] =
-      constantFold::convertToSBVTotal;
-  d_constantFoldTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] =
-      constantFold::convertToRealTotal;
-
-  /******** Variables ********/
-  d_constantFoldTable[kind::VARIABLE] = rewrite::variable;
-  d_constantFoldTable[kind::BOUND_VARIABLE] = rewrite::variable;
-
-  d_constantFoldTable[kind::EQUAL] = constantFold::equal;
-
-  /******** Components for bit-blasting ********/
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_NAN] =
-      constantFold::componentFlag;
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_INF] =
-      constantFold::componentFlag;
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_ZERO] =
-      constantFold::componentFlag;
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_SIGN] =
-      constantFold::componentFlag;
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] =
-      constantFold::componentExponent;
-  d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
-      constantFold::componentSignificand;
-  d_constantFoldTable[kind::ROUNDINGMODE_BITBLAST] =
-      constantFold::roundingModeBitBlast;
+    /******** Constants ********/
+    /* Already folded! */
+    d_constantFoldTable[kind::CONST_FLOATINGPOINT] = rewrite::identity;
+    d_constantFoldTable[kind::CONST_ROUNDINGMODE] = rewrite::identity;
+
+    /******** Sorts(?) ********/
+    /* These kinds should only appear in types */
+    d_constantFoldTable[kind::FLOATINGPOINT_TYPE] = rewrite::type;
+
+    /******** Operations ********/
+    d_constantFoldTable[kind::FLOATINGPOINT_FP] = constantFold::fpLiteral;
+    d_constantFoldTable[kind::FLOATINGPOINT_ABS] = constantFold::abs;
+    d_constantFoldTable[kind::FLOATINGPOINT_NEG] = constantFold::neg;
+    d_constantFoldTable[kind::FLOATINGPOINT_ADD] = constantFold::add;
+    d_constantFoldTable[kind::FLOATINGPOINT_MULT] = constantFold::mult;
+    d_constantFoldTable[kind::FLOATINGPOINT_DIV] = constantFold::div;
+    d_constantFoldTable[kind::FLOATINGPOINT_FMA] = constantFold::fma;
+    d_constantFoldTable[kind::FLOATINGPOINT_SQRT] = constantFold::sqrt;
+    d_constantFoldTable[kind::FLOATINGPOINT_REM] = constantFold::rem;
+    d_constantFoldTable[kind::FLOATINGPOINT_RTI] = constantFold::rti;
+    d_constantFoldTable[kind::FLOATINGPOINT_MIN] = constantFold::min;
+    d_constantFoldTable[kind::FLOATINGPOINT_MAX] = constantFold::max;
+    d_constantFoldTable[kind::FLOATINGPOINT_MIN_TOTAL] = constantFold::minTotal;
+    d_constantFoldTable[kind::FLOATINGPOINT_MAX_TOTAL] = constantFold::maxTotal;
+
+    /******** Comparisons ********/
+    d_constantFoldTable[kind::FLOATINGPOINT_LEQ] = constantFold::leq;
+    d_constantFoldTable[kind::FLOATINGPOINT_LT] = constantFold::lt;
+
+    /******** Classifications ********/
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_NORMAL] = constantFold::isNormal;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_SUBNORMAL] =
+        constantFold::isSubnormal;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_ZERO] = constantFold::isZero;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_INF] = constantFold::isInfinite;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_NAN] = constantFold::isNaN;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_NEG] = constantFold::isNegative;
+    d_constantFoldTable[kind::FLOATINGPOINT_IS_POS] = constantFold::isPositive;
+
+    /******** Conversions ********/
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_IEEE_BV] =
+        constantFold::convertFromIEEEBitVectorLiteral;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_FP] =
+        constantFold::constantConvert;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_REAL] =
+        constantFold::convertFromRealLiteral;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_SBV] =
+        constantFold::convertFromSBV;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_FP_FROM_UBV] =
+        constantFold::convertFromUBV;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_UBV] =
+        constantFold::convertToUBV;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_SBV] =
+        constantFold::convertToSBV;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_REAL] =
+        constantFold::convertToReal;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_UBV_TOTAL] =
+        constantFold::convertToUBVTotal;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_SBV_TOTAL] =
+        constantFold::convertToSBVTotal;
+    d_constantFoldTable[kind::FLOATINGPOINT_TO_REAL_TOTAL] =
+        constantFold::convertToRealTotal;
+
+    /******** Variables ********/
+    d_constantFoldTable[kind::VARIABLE] = rewrite::variable;
+    d_constantFoldTable[kind::BOUND_VARIABLE] = rewrite::variable;
+
+    d_constantFoldTable[kind::EQUAL] = constantFold::equal;
+
+    /******** Components for bit-blasting ********/
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_NAN] =
+        constantFold::componentFlag;
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_INF] =
+        constantFold::componentFlag;
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_ZERO] =
+        constantFold::componentFlag;
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_SIGN] =
+        constantFold::componentFlag;
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_EXPONENT] =
+        constantFold::componentExponent;
+    d_constantFoldTable[kind::FLOATINGPOINT_COMPONENT_SIGNIFICAND] =
+        constantFold::componentSignificand;
+    d_constantFoldTable[kind::ROUNDINGMODE_BITBLAST] =
+        constantFold::roundingModeBitBlast;
 }
 
   /**
index 88012ff499818e17f950aaf6c9652858424ecba3..7dd27f980a06ceb051ef545ad5f69aa946eb816c 100644 (file)
@@ -27,7 +27,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 0b94bdc37efe4b70fd5613951e558e1044336707..af2beff4bd9037eb38e8165f5c8163675c4f4e99 100644 (file)
@@ -27,7 +27,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 32d1111b09707a69bbf1c8cced9bede91698a90a..f2c10a9fa14440c11dd78b4cd7412e3270476beb 100644 (file)
@@ -29,7 +29,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 9751518db9c0ae7ca0219bb074bf80c10e245763..bee9ee5970aed863a63d4212d558cc9f5812251e 100644 (file)
@@ -157,9 +157,9 @@ void ConjectureGenerator::eqNotifyMerge(TNode t1, TNode t2)
   }
 }
 
-
-ConjectureGenerator::EqcInfo::EqcInfo( context::Context* c ) : d_rep( c, Node::null() ){
-
+ConjectureGenerator::EqcInfo::EqcInfo(context::Context* c)
+    : d_rep(c, Node::null())
+{
 }
 
 ConjectureGenerator::EqcInfo* ConjectureGenerator::getOrMakeEqcInfo( TNode n, bool doMake ) {
index bf7eface52fb594e6cd8fa63322915c31ac99c32..473391380cc0d74a0b9429f34b41d58446e2fd80 100644 (file)
@@ -274,9 +274,9 @@ class ConjectureGenerator : public QuantifiersModule
   NotifyClass d_notify;
   class EqcInfo{
   public:
-    EqcInfo( context::Context* c );
-    //representative
-    context::CDO< Node > d_rep;
+   EqcInfo(context::Context* c);
+   // representative
+   context::CDO<Node> d_rep;
   };
   /** get or make eqc info */
   EqcInfo* getOrMakeEqcInfo( TNode n, bool doMake = false );
index 1993e81c7247bc9bad9f297f0750bfdb083136df..964af97b6272667f5d4aa08bc0feacc325d79169 100644 (file)
@@ -25,7 +25,7 @@
 #include "theory/quantifiers/term_util.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::theory::quantifiers::inst;
 
 namespace cvc5::internal {
index d79f4a641aff006a333029d64e43fd51f7c804ba..c730743616af9c44cff42df6110bcbb0f538a289 100644 (file)
@@ -19,7 +19,7 @@
 #include "theory/quantifiers/term_database.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index ac58a4d9f797e2f04b129c79b4d75153e242074b..441786b5f07a63c25ce1dd70d70227ce9dee93af 100644 (file)
@@ -23,7 +23,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index ab54e7c5276dab61c7b0c217a73ecf477e2478b9..c36901413a2ca8141b5b36af65fc1c19d3ea2ec2 100644 (file)
@@ -74,7 +74,7 @@ class EqualityQuery : public QuantifiersUtil
   /** Pointer to the model */
   FirstOrderModel* d_model;
   /** quantifiers equality inference */
-  context::CDO< unsigned > d_eqi_counter;
+  context::CDO<unsigned> d_eqi_counter;
   /** internal representatives */
   std::map< TypeNode, std::map< Node, Node > > d_int_rep;
   /** rep score */
index 57be2d8d4444b2fbac43a39590b3334aa81e1d1b..53dbd67f6591e1140397f8645e826b09e16f07b8 100644 (file)
@@ -25,7 +25,7 @@
 #include "theory/quantifiers/term_util.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 43254103b1acb7dd23a40fae581b226e4696a0fa..8a5705bcf3a520311562a57e709d16e7395ee0c2 100644 (file)
@@ -51,7 +51,8 @@ class BoundedIntegers : public QuantifiersModule
   typedef context::CDHashMap<Node, int> NodeIntMap;
   typedef context::CDHashMap<Node, Node> NodeNodeMap;
   typedef context::CDHashMap<int, bool> IntBoolMap;
-private:
+
+ private:
   //for determining bounds
   bool hasNonBoundVar( Node f, Node b, std::map< Node, bool >& visited );
   bool hasNonBoundVar( Node f, Node b );
index 27d49bc46508674629c3ccaf73c003c88a073959..a69630a00e7ab06f0a71d009a9d0fbf525e72ea4 100644 (file)
@@ -32,7 +32,7 @@
 #include "theory/rewriter.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 0bf6b4a78eb37a9e7a77ca854fd32a897521a409..7c5cd90a54dfc1e01d0e7eb95cb27506ae5eb081 100644 (file)
@@ -26,7 +26,7 @@
 using namespace std;
 using namespace cvc5::internal;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::theory;
 using namespace cvc5::internal::theory::quantifiers;
 
index 2c4db6ae79ebe399029a2a337f007b75741a9c1f..ff61df74f458506f451fc769e62326339da7eef4 100644 (file)
@@ -24,7 +24,7 @@
 #include "theory/quantifiers/term_database.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index b56637f1455da3982a80aadd88757d7556818da1..2a6fa4394d2b50fc1ffdf3d94ebdaf0e3e3e5d26 100644 (file)
@@ -21,7 +21,7 @@
 #include "theory/quantifiers/term_database.h"
 #include "theory/uf/equality_engine_iterator.h"
 
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index edcc0efca1d363517c5123b5c163993d1f87ff16..c946731d090b73ecb380294d6e8db830493fbf25 100644 (file)
@@ -23,7 +23,7 @@
 #include "theory/quantifiers/term_util.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index a0c592765643f274d7e2f48e8418f5c86008fa79..c03823ea55416667aec64fa61fee80d1b0618b1f 100644 (file)
@@ -24,7 +24,7 @@
 #include "theory/quantifiers/term_tuple_enumerator.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index a9cb1140a2d3ae7b22524c879900568d96019e99..958daa878f0081fc0fb077c3c70d17286485706d 100644 (file)
@@ -36,7 +36,7 @@
 #include "theory/rewriter.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 0e146ce20963059b8308620bb90ab803b3543c2e..be658147d19c344f5fd1482f17bd57e03905f91d 100644 (file)
@@ -17,7 +17,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 3988da8c9c7644bb418aa25205c470269099ac52..c69ffb6de474bf1bde46a2c5a0775e2053674765 100644 (file)
@@ -27,7 +27,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index d4285f4e38460d1512c9d11974c7b8cd8e1a4194..a61fcb48525196bce69814b7e8496b6a6ececf12 100644 (file)
@@ -47,7 +47,7 @@ namespace quantifiers {
  */
 class QuantifiersModules
 {
-  friend class ::cvc5::internal::theory::QuantifiersEngine;
+  friend class theory::QuantifiersEngine;
 
  public:
   QuantifiersModules();
index 4bf8e528e6e0d7df473fa85b71bf06865e10e7d3..c87667525bdc1cb36c9e48f03e4b7e7826feed19 100644 (file)
@@ -37,7 +37,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index ac41dbbffb3c148ea93438e3751559ca4082c3f9..e5f888093b24ed8895fd509c79449c65901e0c28 100644 (file)
@@ -26,7 +26,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 6a82c60e2e92c8a233a3ee2ef1287b77899f8b31..d0994bf22017219081582f2117685017cfd6bd75 100644 (file)
@@ -24,7 +24,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 87d147e9444ebeaa680ce46b8894bc2fecac123a..6b3d9fe102f14f84418c0b993353b89de762c27e 100644 (file)
@@ -31,7 +31,7 @@
 #include "theory/uf/equality_engine.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 900adb6b12afdd4dbabff167befc222f6cd60ff2..b1252b7878ada1642df5237c9a1f4fabd85ce597 100644 (file)
@@ -24,7 +24,7 @@
 #include "theory/valuation.h"
 
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index bac943b159dbf838775a0f3e3528cab64a687535..be462e60be5b1eec9af79c48c65c0f4aa426d173 100644 (file)
@@ -57,7 +57,7 @@ class TermRegistry;
  */
 class QuantifiersEngine : protected EnvObj
 {
-  friend class ::cvc5::internal::TheoryEngine;
+  friend class internal::TheoryEngine;
   typedef context::CDHashMap<Node, bool> BoolMap;
   typedef context::CDHashSet<Node> NodeSet;
 
index df161616a3fa265bc071d46f9ccf74dc026432a4..48da252b3821870f2ecfd04be06aa431aac8db0e 100644 (file)
@@ -922,9 +922,9 @@ void TheorySep::conflict(TNode a, TNode b) {
   d_im.conflictEqConstantMerge(a, b);
 }
 
-
-TheorySep::HeapAssertInfo::HeapAssertInfo( context::Context* c ) : d_pto(c), d_has_neg_pto(c,false) {
-
+TheorySep::HeapAssertInfo::HeapAssertInfo(context::Context* c)
+    : d_pto(c), d_has_neg_pto(c, false)
+{
 }
 
 TheorySep::HeapAssertInfo * TheorySep::getOrMakeEqcInfo( Node n, bool doMake ) {
index f3371dd6a948006fa432ad6263cab226af4417b8..a2ba94969127587b7d8d154c0c47d8770bcec24f 100644 (file)
@@ -275,10 +275,10 @@ class TheorySep : public Theory {
 
   class HeapAssertInfo {
   public:
-    HeapAssertInfo( context::Context* c );
-    ~HeapAssertInfo(){}
-    context::CDO< Node > d_pto;
-    context::CDO< bool > d_has_neg_pto;
+   HeapAssertInfo(context::Context* c);
+   ~HeapAssertInfo() {}
+   context::CDO<Node> d_pto;
+   context::CDO<bool> d_has_neg_pto;
   };
   std::map< Node, HeapAssertInfo * > d_eqc_info;
   HeapAssertInfo * getOrMakeEqcInfo( Node n, bool doMake = false );
index 28b84a16175fb39aba1ad2472ad7063822dad56a..398a21d730725d08017ff4ee76f79eff1b20c3d5 100644 (file)
@@ -100,10 +100,10 @@ class TheorySetsPrivate : protected EnvObj
   class EqcInfo
   {
   public:
-    EqcInfo( context::Context* c );
-    ~EqcInfo(){}
-    // singleton or emptyset equal to this eqc
-    context::CDO< Node > d_singleton;
+   EqcInfo(context::Context* c);
+   ~EqcInfo() {}
+   // singleton or emptyset equal to this eqc
+   context::CDO<Node> d_singleton;
   };
   /** information necessary for equivalence classes */
   std::map< Node, EqcInfo* > d_eqc_info;
index 6de70acc94ab70d88328c8ea1e9fb1691ea7a508..7802aa63a19f794315a05777fb625c7e04b72f7b 100644 (file)
@@ -35,7 +35,8 @@ namespace cvc5::internal {
 class Env;
 class TheoryEngine;
 
-class SharedTermsDatabase : public context::ContextNotifyObj {
+class SharedTermsDatabase : public context::ContextNotifyObj
+{
  public:
   /** A container for a list of shared terms */
   typedef std::vector<TNode> shared_terms_list;
index bbaca6b06bcaf848ebf3d7e35ba1486265a3941d..cb0c37cf770b72ec179df7e47959061f96b5ae7c 100644 (file)
@@ -20,7 +20,7 @@
 #include "theory/strings/word.h"
 #include "util/rational.h"
 
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index b48300e8157abdb8be191a52126cc9b4b5ce83e3..0a2fab83da396dbe125454d0e8a9eb534fad3841 100644 (file)
@@ -21,7 +21,7 @@
 #include "theory/strings/word.h"
 #include "util/rational.h"
 
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 1955b2b6334f7fdc40a21cd142ebacfcba0d26d7..9d75ececaa801902d03f5e8a57f3f814a75e7b2b 100644 (file)
@@ -25,7 +25,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 382105eb9328a1f1c94506d8b3b78348a067d9a1..dcbb1a6bd9ab642743bdf13bcdfe81b0c5f9ece8 100644 (file)
@@ -28,7 +28,7 @@
 #include "util/string.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
@@ -2524,7 +2524,7 @@ void CoreSolver::checkNormalFormsDeq()
 {
   eq::EqualityEngine* ee = d_state.getEqualityEngine();
   std::map< Node, std::map< Node, bool > > processed;
-  
+
   const context::CDList<Node>& deqs = d_state.getDisequalityList();
 
   NodeManager* nm = NodeManager::currentNM();
index 06b19272d1f12a13e6cf93aeb4ccf5a9e5265564..1c1d1384f8ddd24a4267c2cce0a5a86b1198e1cd 100644 (file)
@@ -19,7 +19,7 @@
 #include "theory/strings/word.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 40649e927df021a5db668b1fa6c6fa2ae0b8a8ca..2324b5674664071a2540f56efd273b76c568a112 100644 (file)
@@ -23,7 +23,7 @@
 #include "util/statistics_registry.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 651431afaea00adaed7cfe39ce95b154e1ae2527..fb6a9977f2e1ae6af405ece6bb4830dfe597b117 100644 (file)
@@ -23,7 +23,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index faacc0402075464affc9bde3a34618d6e7a9b346..6368d1e430e5b82df9879e68712aa48af173a284 100644 (file)
@@ -26,7 +26,7 @@
 #include "util/statistics_value.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
@@ -51,7 +51,7 @@ RegExpSolver::RegExpSolver(Env& env,
       d_processed_memberships(context()),
       d_regexp_opr(env, tr.getSkolemCache())
 {
-  d_emptyString = NodeManager::currentNM()->mkConst(::cvc5::internal::String(""));
+  d_emptyString = NodeManager::currentNM()->mkConst(cvc5::internal::String(""));
   d_emptyRegexp = NodeManager::currentNM()->mkNode(REGEXP_NONE);
   d_true = NodeManager::currentNM()->mkConst(true);
   d_false = NodeManager::currentNM()->mkConst(false);
index 431564b829e106afe4968c413644d03ef28c9b4f..be3025a7a0e779aee19bb0720424c3d2f3d9b0df 100644 (file)
@@ -3574,7 +3574,7 @@ Node SequencesRewriter::rewritePrefixSuffix(Node n)
   Node val;
   if (isPrefix)
   {
-    val = NodeManager::currentNM()->mkConstInt(::cvc5::internal::Rational(0));
+    val = NodeManager::currentNM()->mkConstInt(cvc5::internal::Rational(0));
   }
   else
   {
index 38672e63c3f4af47eebc8afaf8973bcd1eacd893..946671f7d4e59dd7df418227f5568684d1bb11f2 100644 (file)
@@ -21,7 +21,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index d0f5a70dd798ce255cb2ddc8827f1a1e9c59c4b4..e38c13bf4c6ba32c100e28dd2268cb270d4c4fa7 100644 (file)
@@ -18,7 +18,7 @@
 #include "util/rational.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 5372b50cf83aab9d6315985a887e04fd61b7a3d0..322c9b99e6531d3acffe9c39617ddb9cfd9a1080 100644 (file)
@@ -29,7 +29,7 @@
 #include "util/string.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 30abd1df3e37de3a09d0b685373ed43a69a5cfe2..0416be16cb2b3a57ca49be654abe8ecfc13e46a9 100644 (file)
@@ -33,7 +33,7 @@
 #include "theory/valuation.h"
 
 using namespace std;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 using namespace cvc5::internal::kind;
 
 namespace cvc5::internal {
index 134102db2edbe9be3377a01974cfcb05a6107df4..e72779b5861f8bfa61977ce8fc8194bec2d11254 100644 (file)
@@ -99,7 +99,7 @@ namespace eq {
 class Theory : protected EnvObj
 {
   friend class CarePairArgumentCallback;
-  friend class ::cvc5::internal::TheoryEngine;
+  friend class internal::TheoryEngine;
 
  protected:
   /** Name of this theory instance. Along with the TheoryId this should
index aa10da4ac3e62400a8ebed1d3a22c4b29590fd7c..959575ccd6e09e13e470bb85f4bd7fe0e5cd2279 100644 (file)
@@ -335,7 +335,9 @@ void TheoryEngine::printAssertions(const char* tag) {
 
         if (d_logicInfo.isSharingEnabled()) {
           Trace(tag) << "Shared terms of " << theory->getId() << ": " << endl;
-          context::CDList<TNode>::const_iterator it = theory->shared_terms_begin(), it_end = theory->shared_terms_end();
+          context::CDList<TNode>::const_iterator
+              it = theory->shared_terms_begin(),
+              it_end = theory->shared_terms_end();
           for (unsigned i = 0; it != it_end; ++ it, ++i) {
               Trace(tag) << "[" << i << "]: " << (*it) << endl;
           }
@@ -1843,10 +1845,12 @@ void TheoryEngine::checkTheoryAssertionsWithModel(bool hardFailure) {
   for(TheoryId theoryId = THEORY_FIRST; theoryId < THEORY_LAST; ++theoryId) {
     Theory* theory = d_theoryTable[theoryId];
     if(theory && d_logicInfo.isTheoryEnabled(theoryId)) {
-      for(context::CDList<Assertion>::const_iterator it = theory->facts_begin(),
-            it_end = theory->facts_end();
-          it != it_end;
-          ++it) {
+      for (context::CDList<Assertion>::const_iterator
+               it = theory->facts_begin(),
+               it_end = theory->facts_end();
+           it != it_end;
+           ++it)
+      {
         Node assertion = (*it).d_assertion;
         if (hasRelevantAssertions
             && relevantAssertions.find(assertion) == relevantAssertions.end())
index c434a8e9138566e1063d51f3ea4103331816fb1d..c6962d171ac860caf50c841343bd327fd5c3fbe0 100644 (file)
@@ -28,7 +28,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index 2119054a2edce369f9eabf9920b6b7e3c1f4be4f..7ca737fa8ae7e4b733c424c9ddbb432075259109 100644 (file)
@@ -28,7 +28,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
index b193adfdeef6a4a3204dde7c218f55a0305b5004..9898ba808ace76cd8be2bdb4a191af2c5d80402a 100644 (file)
@@ -33,7 +33,7 @@
 
 using namespace std;
 using namespace cvc5::internal::kind;
-using namespace cvc5::internal::context;
+using namespace cvc5::context;
 
 namespace cvc5::internal {
 namespace theory {
@@ -46,15 +46,17 @@ typedef Region::RegionNodeInfo RegionNodeInfo;
 typedef RegionNodeInfo::DiseqList DiseqList;
 
 Region::Region(SortModel* cf, context::Context* c)
-  : d_cf( cf )
-  , d_testCliqueSize( c, 0 )
-  , d_splitsSize( c, 0 )
-  , d_testClique( c )
-  , d_splits( c )
-  , d_reps_size( c, 0 )
-  , d_total_diseq_external( c, 0 )
-  , d_total_diseq_internal( c, 0 )
-  , d_valid( c, true ) {}
+    : d_cf(cf),
+      d_testCliqueSize(c, 0),
+      d_splitsSize(c, 0),
+      d_testClique(c),
+      d_splits(c),
+      d_reps_size(c, 0),
+      d_total_diseq_external(c, 0),
+      d_total_diseq_internal(c, 0),
+      d_valid(c, true)
+{
+}
 
 Region::~Region() {
   for(iterator i = begin(), iend = end(); i != iend; ++i) {
index d5155141fbf951a5f2fb499c6bd2b44a31df614e..7aef63c294399d06d60adf275dc94954337c58cb 100644 (file)
@@ -69,14 +69,14 @@ class CardinalityExtension : protected EnvObj
         /** disequality list for node */
         class DiseqList {
         public:
-          DiseqList( context::Context* c )
-            : d_size( c, 0 ), d_disequalities( c ) {}
-          ~DiseqList(){}
-
-          void setDisequal( Node n, bool valid ){
-            Assert((!isSet(n)) || getDisequalityValue(n) != valid);
-            d_disequalities[ n ] = valid;
-            d_size = d_size + ( valid ? 1 : -1 );
+         DiseqList(context::Context* c) : d_size(c, 0), d_disequalities(c) {}
+         ~DiseqList() {}
+
+         void setDisequal(Node n, bool valid)
+         {
+           Assert((!isSet(n)) || getDisequalityValue(n) != valid);
+           d_disequalities[n] = valid;
+           d_size = d_size + (valid ? 1 : -1);
           }
           bool isSet(Node n) const {
             return d_disequalities.find(n) != d_disequalities.end();
@@ -93,13 +93,14 @@ class CardinalityExtension : protected EnvObj
           iterator end() { return d_disequalities.end(); }
 
         private:
-          context::CDO< int > d_size;
-          NodeBoolMap d_disequalities;
+         context::CDO<int> d_size;
+         NodeBoolMap d_disequalities;
         }; /* class DiseqList */
        public:
         /** constructor */
-        RegionNodeInfo( context::Context* c )
-          : d_internal(c), d_external(c), d_valid(c, true) {
+        RegionNodeInfo(context::Context* c)
+            : d_internal(c), d_external(c), d_valid(c, true)
+        {
           d_disequalities[0] = &d_internal;
           d_disequalities[1] = &d_external;
         }
@@ -123,7 +124,7 @@ class CardinalityExtension : protected EnvObj
        private:
         DiseqList d_internal;
         DiseqList d_external;
-        context::CDO< bool > d_valid;
+        context::CDO<bool> d_valid;
         DiseqList* d_disequalities[2];
       }; /* class RegionNodeInfo */
 
@@ -132,7 +133,7 @@ class CardinalityExtension : protected EnvObj
       SortModel* d_cf;
 
       context::CDO<size_t> d_testCliqueSize;
-      context::CDO< unsigned > d_splitsSize;
+      context::CDO<unsigned> d_splitsSize;
       //a postulated clique
       NodeBoolMap d_testClique;
       //disequalities needed for this clique to happen
@@ -140,19 +141,19 @@ class CardinalityExtension : protected EnvObj
       //number of valid representatives in this region
       context::CDO<size_t> d_reps_size;
       //total disequality size (external)
-      context::CDO< unsigned > d_total_diseq_external;
+      context::CDO<unsigned> d_total_diseq_external;
       //total disequality size (internal)
-      context::CDO< unsigned > d_total_diseq_internal;
+      context::CDO<unsigned> d_total_diseq_internal;
       /** set rep */
       void setRep( Node n, bool valid );
       //region node infomation
       std::map< Node, RegionNodeInfo* > d_nodes;
       //whether region is valid
-      context::CDO< bool > d_valid;
+      context::CDO<bool> d_valid;
 
      public:
       //constructor
-      Region( SortModel* cf, context::Context* c );
+      Region(SortModel* cf, context::Context* c);
       virtual ~Region();
 
       typedef std::map< Node, RegionNodeInfo* >::iterator iterator;
@@ -228,11 +229,11 @@ class CardinalityExtension : protected EnvObj
     /** the score for each node for splitting */
     NodeIntMap d_split_score;
     /** number of valid disequalities in d_disequalities */
-    context::CDO< unsigned > d_disequalities_index;
+    context::CDO<unsigned> d_disequalities_index;
     /** list of all disequalities */
     std::vector< Node > d_disequalities;
     /** number of representatives in all regions */
-    context::CDO< unsigned > d_reps;
+    context::CDO<unsigned> d_reps;
 
     /** get number of disequalities from node n to region ri */
     int getNumDisequalitiesToRegion( Node n, int ri );
@@ -268,7 +269,7 @@ class CardinalityExtension : protected EnvObj
     /** cardinality literals */
     std::map<uint32_t, Node> d_cardinality_literal;
     /** whether a positive cardinality constraint has been asserted */
-    context::CDO< bool > d_hasCard;
+    context::CDO<bool> d_hasCard;
     /** clique lemmas that have been asserted */
     std::map< int, std::vector< std::vector< Node > > > d_cliques;
     /** maximum negatively asserted cardinality */
@@ -276,7 +277,7 @@ class CardinalityExtension : protected EnvObj
     /** list of fresh representatives allocated */
     std::vector< Node > d_fresh_aloc_reps;
     /** whether we are initialized */
-    context::CDO< bool > d_initialized;
+    context::CDO<bool> d_initialized;
     /** simple check cardinality */
     void simpleCheckCardinality();
 
index 28da5abfff0d0a1dff0526f5e44376d36cf2362d..8d9e3e91dae87981e1712efb2f6a03e16934161a 100644 (file)
@@ -53,8 +53,8 @@ class ProofEqEngine;
  * Class for keeping an incremental congruence closure over a set of terms. It provides
  * notifications via an EqualityEngineNotify object.
  */
-class EqualityEngine : public context::ContextNotifyObj, protected EnvObj {
-
+class EqualityEngine : public context::ContextNotifyObj, protected EnvObj
+{
   friend class EqClassesIterator;
   friend class EqClassIterator;
 
index c236fbdc2c547ac46f568fff6cf503ef322cb97f..da89b04d5c5e457f25559ed39b09f0e376c2bf5e 100644 (file)
@@ -50,7 +50,7 @@ namespace cvc5::internal {
 namespace theory {
 namespace uf {
 
-using namespace ::cvc5::internal::context;
+using namespace cvc5::context;
 
 SymmetryBreaker::Template::Template() :
   d_template(),
index 191a7116e799f3c3a9b67713457d4b6dacd823ad..082997d43c8375914d89f170d57cd15a6e659421 100644 (file)
@@ -170,7 +170,7 @@ public:
 
 std::ostream& operator<<(
     std::ostream& out,
-    const ::cvc5::internal::theory::uf::SymmetryBreaker::Permutation& p);
+    const cvc5::internal::theory::uf::SymmetryBreaker::Permutation& p);
 
 }  // namespace cvc5::internal
 
index df4914fb5fe2530050de777d6a350cbb053b2724..f1e9a452de3d53fa6ede61240567b98ce16084da 100644 (file)
@@ -508,7 +508,7 @@ struct FloatingPointToBVHashFunction
 {
   inline size_t operator()(const FloatingPointToBV& fptbv) const
   {
-    UnsignedHashFunction< ::cvc5::internal::BitVectorSize> f;
+    UnsignedHashFunction<cvc5::internal::BitVectorSize> f;
     return (key ^ 0x46504256) ^ f(fptbv.d_bv_size);
   }
 }; /* struct FloatingPointToBVHashFunction */
index b77184ff9682913154a5800931c3706c94a93459..88605dce5933ccbe622de39679500e58c71e10fa 100644 (file)
 
 namespace symfpu {
 
-#define CVC5_LIT_ITE_DFN(T)                                            \
-  template <>                                                          \
-  struct ite<::cvc5::internal::symfpuLiteral::Cvc5Prop, T>                       \
-  {                                                                    \
-    static const T& iteOp(const ::cvc5::internal::symfpuLiteral::Cvc5Prop& cond, \
-                          const T& l,                                  \
-                          const T& r)                                  \
-    {                                                                  \
-      return cond ? l : r;                                             \
-    }                                                                  \
+#define CVC5_LIT_ITE_DFN(T)                                                    \
+  template <>                                                                  \
+  struct ite<cvc5::internal::symfpuLiteral::Cvc5Prop, T>                       \
+  {                                                                            \
+    static const T& iteOp(const cvc5::internal::symfpuLiteral::Cvc5Prop& cond, \
+                          const T& l,                                          \
+                          const T& r)                                          \
+    {                                                                          \
+      return cond ? l : r;                                                     \
+    }                                                                          \
   }
 
-CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::rm);
-CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::prop);
-CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::sbv);
-CVC5_LIT_ITE_DFN(::cvc5::internal::symfpuLiteral::traits::ubv);
+CVC5_LIT_ITE_DFN(cvc5::internal::symfpuLiteral::traits::rm);
+CVC5_LIT_ITE_DFN(cvc5::internal::symfpuLiteral::traits::prop);
+CVC5_LIT_ITE_DFN(cvc5::internal::symfpuLiteral::traits::sbv);
+CVC5_LIT_ITE_DFN(cvc5::internal::symfpuLiteral::traits::ubv);
 
 #undef CVC5_LIT_ITE_DFN
 }  // namespace symfpu
index 6c35a3ba0723e0272d4cae631db616ce5d134006..a82555e84231b94fa0aff73dc9d2fd4fe96aa09e 100644 (file)
@@ -45,8 +45,8 @@ class wrappedBitVector;
 
 using Cvc5BitWidth = uint32_t;
 using Cvc5Prop = bool;
-using Cvc5RM = ::cvc5::internal::RoundingMode;
-using Cvc5FPSize = ::cvc5::internal::FloatingPointSize;
+using Cvc5RM = cvc5::internal::RoundingMode;
+using Cvc5FPSize = cvc5::internal::FloatingPointSize;
 using Cvc5UnsignedBitVector = wrappedBitVector<false>;
 using Cvc5SignedBitVector = wrappedBitVector<true>;
 
index 1acca29646221a63e132f47a6ad75bb257bff4d1..00c8fb7a75f68c6bb4dcac2bac4cefc17b7ff943 100644 (file)
@@ -522,7 +522,7 @@ Rational String::toNumber() const
 
 namespace strings {
 
-size_t StringHashFunction::operator()(const ::cvc5::internal::String& s) const
+size_t StringHashFunction::operator()(const cvc5::internal::String& s) const
 {
   uint64_t ret = fnv1a::offsetBasis;
   for (unsigned c : s.d_str)
index 6b3d59117a99a71a154459f80cdfed9b1baf6dd7..4cacbb8e1bc044e59564987fa379bdbbd9ebd90e 100644 (file)
@@ -273,7 +273,7 @@ namespace strings {
 
 struct StringHashFunction
 {
-  size_t operator()(const ::cvc5::internal::String& s) const;
+  size_t operator()(const cvc5::internal::String& s) const;
 }; /* struct StringHashFunction */
 
 }  // namespace strings
index 051c306245cc2e34a9e717c13d6f93711e5a15c3..5ef8c747c0a0af724b3959ca11c66c0dc10b639d 100644 (file)
@@ -28,9 +28,9 @@
 
 namespace cvc5::internal {
 
-using context::CDHashMap;
-using context::CDInsertHashMap;
-using context::Context;
+using cvc5::context::CDHashMap;
+using cvc5::context::CDInsertHashMap;
+using cvc5::context::Context;
 
 namespace test {
 
index 3a27252d1ca8927ca3b3b4b2136ee9a33c41f55a..fde9517d0b69070e473adc15313fc44a4f3fbbbe 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * Black box testing of context::CDMap<>.
+ * Black box testing of cvc5::context::CDMap<>.
  */
 
 #include <map>
@@ -23,8 +23,8 @@
 namespace cvc5::internal {
 namespace test {
 
-using context::CDHashMap;
-using context::Context;
+using cvc5::context::CDHashMap;
+using cvc5::context::Context;
 
 class TestContextBlackCDHashMap : public TestContext
 {
index 3210fa5ef628d444cda78d44593ccd12127a436a..038bc01386d41f7316bf164fa0c40fca731a9dae 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * White box testing of context::CDMap<>.
+ * White box testing of cvc5::context::CDMap<>.
  */
 
 #include "base/check.h"
index 843e6b655a1695bcac77a2373a0d5926b5a6c892..2772e150350f926fed4802199833217343ce2679 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * Black box testing of context::CDList<>.
+ * Black box testing of cvc5::context::CDList<>.
  */
 
 #include <limits.h>
index 57bd6150ffb549eac09a79e0fcdc43b81c458c49..564d5f73efce6837a2ece08e5c402b6d94937e3b 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * Black box testing of context::CDO<>.
+ * Black box testing of cvc5::context::CDO<>.
  */
 
 #include <iostream>
index bde4c9d2392692095a672c2d8d40e4e473c93ee6..12efc52cadf1d56ce9301042e8f2fee692a0392a 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * Black box testing of context::Context.
+ * Black box testing of cvc5::context::Context.
  */
 
 #include <iostream>
index a539a6e28f871752d7a5dd3f41125382455e88d8..8c9101be5390fb3e537095c2c5f004b999b59daa 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * Black box testing of context::ContextMemoryManager.
+ * Black box testing of cvc5::context::ContextMemoryManager.
  */
 
 #include <cstring>
index f1c570c36073a220adcf6ebf76436df26ae09805..2fef425b36ee80f9b8484806f99beb5aac769b7a 100644 (file)
@@ -10,7 +10,7 @@
  * directory for licensing information.
  * ****************************************************************************
  *
- * White box testing of context::Context.
+ * White box testing of cvc5::context::Context.
  */
 
 #include "base/check.h"
index 4bb3d9bf2a3bfe433f0314391f44c8d4c0703f79..29c6f123cdc93550aec715d5533fa2fb07002641 100644 (file)
@@ -29,7 +29,7 @@
 
 namespace cvc5::internal {
 
-using namespace context;
+using namespace cvc5::context;
 using namespace prop;
 using namespace smt;
 using namespace theory;
@@ -109,7 +109,7 @@ class TestPropWhiteCnfStream : public TestSmt
     TestSmt::SetUp();
     d_theoryEngine = d_slvEngine->getTheoryEngine();
     d_satSolver.reset(new FakeSatSolver());
-    d_cnfContext.reset(new context::Context());
+    d_cnfContext.reset(new Context());
     d_cnfRegistrar.reset(new prop::NullRegistrar);
     d_cnfStream.reset(new prop::CnfStream(d_slvEngine->getEnv(),
                                           d_satSolver.get(),
index 5e875cb524270040405593a8d849abd06be277e5..455319c6b6981580b0374f4b9c84780117e5f348 100644 (file)
@@ -25,8 +25,8 @@ namespace test {
 class TestContext : public TestInternal
 {
  protected:
-  void SetUp() override { d_context.reset(new context::Context()); }
-  std::unique_ptr<context::Context> d_context;
+  void SetUp() override { d_context.reset(new cvc5::context::Context()); }
+  std::unique_ptr<cvc5::context::Context> d_context;
 };
 
 }  // namespace test
index fa0fbbd73a774351bf921eaac146a9dde4d1ed1d..0f643397d1b5b5d677fbba6243739d4491fc4766 100644 (file)
@@ -37,7 +37,7 @@ namespace cvc5::internal {
 
 using namespace theory;
 using namespace expr;
-using namespace context;
+using namespace cvc5::context;
 using namespace kind;
 using namespace theory::bv;