diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-05-26 07:30:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 14:30:17 +0000 |
commit | a24d6c8cf774f971a3eff62f73b2558b01b04440 (patch) | |
tree | 5c8f1054bd8da3b56eb501409a205081294eee06 /src/preprocessing | |
parent | 7440f0568b99842d87cb1f86eec21aed9f46b92a (diff) |
More precise includes of `Node` constants (#6617)
We store constants, e.g., BitVector and Rational, in our node infrastructure. As a result, we were indirectly including some headers in almost all files, e.g., the GMP headers. This commit changes that by forward-declaring the classes for the constants. As a result, we have to include headers like util/rational.h explicitly when we use Rational but it saves about 3 minutes in compile time (CPU time).
The commit changes RoundingMode from an enum to an enum class such that it can be forward declared.
Diffstat (limited to 'src/preprocessing')
-rw-r--r-- | src/preprocessing/passes/bv_gauss.h | 1 | ||||
-rw-r--r-- | src/preprocessing/passes/bv_to_int.cpp | 3 | ||||
-rw-r--r-- | src/preprocessing/passes/int_to_bv.cpp | 2 | ||||
-rw-r--r-- | src/preprocessing/passes/miplib_trick.cpp | 1 | ||||
-rw-r--r-- | src/preprocessing/passes/real_to_int.cpp | 1 | ||||
-rw-r--r-- | src/preprocessing/passes/unconstrained_simplifier.cpp | 2 | ||||
-rw-r--r-- | src/preprocessing/util/ite_utilities.cpp | 1 |
7 files changed, 11 insertions, 0 deletions
diff --git a/src/preprocessing/passes/bv_gauss.h b/src/preprocessing/passes/bv_gauss.h index c7cec2cc0..8fafcb741 100644 --- a/src/preprocessing/passes/bv_gauss.h +++ b/src/preprocessing/passes/bv_gauss.h @@ -23,6 +23,7 @@ #include "expr/node.h" #include "preprocessing/preprocessing_pass.h" +#include "util/integer.h" namespace cvc5 { namespace preprocessing { diff --git a/src/preprocessing/passes/bv_to_int.cpp b/src/preprocessing/passes/bv_to_int.cpp index 8b5d2417b..b6f53f8c2 100644 --- a/src/preprocessing/passes/bv_to_int.cpp +++ b/src/preprocessing/passes/bv_to_int.cpp @@ -34,6 +34,9 @@ #include "theory/bv/theory_bv_rewrite_rules_operator_elimination.h" #include "theory/bv/theory_bv_rewrite_rules_simplification.h" #include "theory/rewriter.h" +#include "util/bitvector.h" +#include "util/iand.h" +#include "util/rational.h" namespace cvc5 { namespace preprocessing { diff --git a/src/preprocessing/passes/int_to_bv.cpp b/src/preprocessing/passes/int_to_bv.cpp index 779e0a931..7f03b9459 100644 --- a/src/preprocessing/passes/int_to_bv.cpp +++ b/src/preprocessing/passes/int_to_bv.cpp @@ -30,6 +30,8 @@ #include "preprocessing/assertion_pipeline.h" #include "theory/rewriter.h" #include "theory/theory.h" +#include "util/bitvector.h" +#include "util/rational.h" namespace cvc5 { namespace preprocessing { diff --git a/src/preprocessing/passes/miplib_trick.cpp b/src/preprocessing/passes/miplib_trick.cpp index f27ff836a..79fcc4028 100644 --- a/src/preprocessing/passes/miplib_trick.cpp +++ b/src/preprocessing/passes/miplib_trick.cpp @@ -31,6 +31,7 @@ #include "theory/theory_engine.h" #include "theory/theory_model.h" #include "theory/trust_substitutions.h" +#include "util/rational.h" namespace cvc5 { namespace preprocessing { diff --git a/src/preprocessing/passes/real_to_int.cpp b/src/preprocessing/passes/real_to_int.cpp index 9e84dc851..a60b4a097 100644 --- a/src/preprocessing/passes/real_to_int.cpp +++ b/src/preprocessing/passes/real_to_int.cpp @@ -25,6 +25,7 @@ #include "theory/arith/arith_msum.h" #include "theory/rewriter.h" #include "theory/theory_model.h" +#include "util/rational.h" using namespace cvc5::theory; diff --git a/src/preprocessing/passes/unconstrained_simplifier.cpp b/src/preprocessing/passes/unconstrained_simplifier.cpp index 54115bb54..f13de5e74 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.cpp +++ b/src/preprocessing/passes/unconstrained_simplifier.cpp @@ -27,6 +27,8 @@ #include "smt/smt_statistics_registry.h" #include "theory/logic_info.h" #include "theory/rewriter.h" +#include "util/bitvector.h" +#include "util/rational.h" namespace cvc5 { namespace preprocessing { diff --git a/src/preprocessing/util/ite_utilities.cpp b/src/preprocessing/util/ite_utilities.cpp index 3e1b3659a..13910f534 100644 --- a/src/preprocessing/util/ite_utilities.cpp +++ b/src/preprocessing/util/ite_utilities.cpp @@ -28,6 +28,7 @@ #include "smt/smt_statistics_registry.h" #include "theory/rewriter.h" #include "theory/theory.h" +#include "util/rational.h" using namespace std; namespace cvc5 { |