From: Gereon Kremer Date: Thu, 4 Mar 2021 19:36:02 +0000 (+0100) Subject: Add proper define for libpoly usage (#6050) X-Git-Tag: cvc5-1.0.0~2153 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=452efb4bfe87f1628185c8b5c40acf4533c93c46;p=cvc5.git Add proper define for libpoly usage (#6050) When adding libpoly, we forgot to add a proper define to cvc4autoconfig and included real_algebraic_number.h everywhere to get this define. This PR introduces the CVC4_POLY_IMP define and removes all obsolete includes to real_algebraic_number.h. --- diff --git a/cmake/ConfigureCVC4.cmake b/cmake/ConfigureCVC4.cmake index 6da71dc64..9c160e4fc 100644 --- a/cmake/ConfigureCVC4.cmake +++ b/cmake/ConfigureCVC4.cmake @@ -95,5 +95,7 @@ check_c_source_compiles( set(CVC4_CLN_IMP ${CVC4_USE_CLN_IMP}) # Defined if using the GMP multi-precision arithmetic library. set(CVC4_GMP_IMP ${CVC4_USE_GMP_IMP}) +# Defined if using the libpoly polynomial library. +set(CVC4_POLY_IMP ${CVC4_USE_POLY_IMP}) # Define the full name of this package. set(CVC4_PACKAGE_NAME "${PROJECT_NAME}") diff --git a/cvc4autoconfig.h.in b/cvc4autoconfig.h.in index 48d826697..3d3412d66 100644 --- a/cvc4autoconfig.h.in +++ b/cvc4autoconfig.h.in @@ -28,6 +28,9 @@ /* Define to use the GMP multi-precision arithmetic library. */ #cmakedefine CVC4_GMP_IMP +/* Define to use the libpoly polynomial library. */ +#cmakedefine CVC4_POLY_IMP + /* Define to 1 if Boost threading library has support for thread attributes. */ #cmakedefine01 BOOST_HAS_THREAD_ATTR diff --git a/src/theory/arith/nl/cad/cdcac.h b/src/theory/arith/nl/cad/cdcac.h index 8736b7a08..ada6286f7 100644 --- a/src/theory/arith/nl/cad/cdcac.h +++ b/src/theory/arith/nl/cad/cdcac.h @@ -20,8 +20,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD__CDCAC_H #define CVC4__THEORY__ARITH__NL__CAD__CDCAC_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/cad/cdcac_utils.h b/src/theory/arith/nl/cad/cdcac_utils.h index 335735574..153341c7e 100644 --- a/src/theory/arith/nl/cad/cdcac_utils.h +++ b/src/theory/arith/nl/cad/cdcac_utils.h @@ -19,8 +19,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD__CDCAC_UTILS_H #define CVC4__THEORY__ARITH__NL__CAD__CDCAC_UTILS_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/cad/constraints.h b/src/theory/arith/nl/cad/constraints.h index 1df61e706..10079e9bb 100644 --- a/src/theory/arith/nl/cad/constraints.h +++ b/src/theory/arith/nl/cad/constraints.h @@ -19,8 +19,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD__CONSTRAINTS_H #define CVC4__THEORY__ARITH__NL__CAD__CONSTRAINTS_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/cad/projections.h b/src/theory/arith/nl/cad/projections.h index dd485b372..3820716c2 100644 --- a/src/theory/arith/nl/cad/projections.h +++ b/src/theory/arith/nl/cad/projections.h @@ -19,8 +19,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD_PROJECTIONS_H #define CVC4__THEORY__ARITH__NL__CAD_PROJECTIONS_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_USE_POLY #include diff --git a/src/theory/arith/nl/cad/proof_generator.h b/src/theory/arith/nl/cad/proof_generator.h index fd2458271..055de98fe 100644 --- a/src/theory/arith/nl/cad/proof_generator.h +++ b/src/theory/arith/nl/cad/proof_generator.h @@ -17,8 +17,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD__PROOF_GENERATOR_H #define CVC4__THEORY__ARITH__NL__CAD__PROOF_GENERATOR_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/cad/variable_ordering.h b/src/theory/arith/nl/cad/variable_ordering.h index 2e56a64b4..4954e0e46 100644 --- a/src/theory/arith/nl/cad/variable_ordering.h +++ b/src/theory/arith/nl/cad/variable_ordering.h @@ -19,8 +19,6 @@ #ifndef CVC4__THEORY__ARITH__NL__CAD__VARIABLE_ORDERING_H #define CVC4__THEORY__ARITH__NL__CAD__VARIABLE_ORDERING_H -#include "util/real_algebraic_number.h" - #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/cad_solver.h b/src/theory/arith/nl/cad_solver.h index b67d78f0d..7d0346eab 100644 --- a/src/theory/arith/nl/cad_solver.h +++ b/src/theory/arith/nl/cad_solver.h @@ -21,7 +21,6 @@ #include "expr/node.h" #include "theory/arith/nl/cad/cdcac.h" #include "theory/arith/nl/cad/proof_checker.h" -#include "util/real_algebraic_number.h" namespace CVC4 { namespace theory { diff --git a/src/theory/arith/nl/icp/candidate.h b/src/theory/arith/nl/icp/candidate.h index a2160472d..4a52456ff 100644 --- a/src/theory/arith/nl/icp/candidate.h +++ b/src/theory/arith/nl/icp/candidate.h @@ -15,7 +15,7 @@ #ifndef CVC4__THEORY__ARITH__ICP__CANDIDATE_H #define CVC4__THEORY__ARITH__ICP__CANDIDATE_H -#include "util/real_algebraic_number.h" +#include "cvc4_private.h" #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/icp/icp_solver.h b/src/theory/arith/nl/icp/icp_solver.h index b9ecfc437..9b41ed6e0 100644 --- a/src/theory/arith/nl/icp/icp_solver.h +++ b/src/theory/arith/nl/icp/icp_solver.h @@ -15,7 +15,7 @@ #ifndef CVC4__THEORY__ARITH__ICP__ICP_SOLVER_H #define CVC4__THEORY__ARITH__ICP__ICP_SOLVER_H -#include "util/real_algebraic_number.h" +#include "cvc4_private.h" #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/icp/intersection.h b/src/theory/arith/nl/icp/intersection.h index cdc166139..db14184b0 100644 --- a/src/theory/arith/nl/icp/intersection.h +++ b/src/theory/arith/nl/icp/intersection.h @@ -15,9 +15,12 @@ #ifndef CVC4__THEORY__ARITH__ICP__INTERSECTION_H #define CVC4__THEORY__ARITH__ICP__INTERSECTION_H -#include "util/real_algebraic_number.h" +#include "cvc4_private.h" #ifdef CVC4_POLY_IMP + +#include + namespace poly { class Interval; } diff --git a/src/theory/arith/nl/icp/interval.h b/src/theory/arith/nl/icp/interval.h index d2b0fd4f5..01968e70f 100644 --- a/src/theory/arith/nl/icp/interval.h +++ b/src/theory/arith/nl/icp/interval.h @@ -15,7 +15,7 @@ #ifndef CVC4__THEORY__ARITH__ICP__INTERVAL_H #define CVC4__THEORY__ARITH__ICP__INTERVAL_H -#include "util/real_algebraic_number.h" +#include "cvc4_private.h" #ifdef CVC4_POLY_IMP #include diff --git a/src/theory/arith/nl/poly_conversion.h b/src/theory/arith/nl/poly_conversion.h index 102d2d6ae..94ed5e318 100644 --- a/src/theory/arith/nl/poly_conversion.h +++ b/src/theory/arith/nl/poly_conversion.h @@ -17,7 +17,7 @@ #ifndef CVC4__THEORY__ARITH__NL__POLY_CONVERSION_H #define CVC4__THEORY__ARITH__NL__POLY_CONVERSION_H -#include "util/real_algebraic_number.h" +#include "cvc4_private.h" #ifdef CVC4_POLY_IMP @@ -28,6 +28,7 @@ #include #include "expr/node.h" +#include "util/real_algebraic_number.h" namespace CVC4 { namespace theory {