From: Aina Niemetz Date: Thu, 15 Apr 2021 20:04:55 +0000 (-0700) Subject: Rename occurrences of CVC4 to CVC5. (#6351) X-Git-Tag: cvc5-1.0.0~1896 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77bca094a140b35341257f125a55212ff0108250;p=cvc5.git Rename occurrences of CVC4 to CVC5. (#6351) This renames everything but GitHub links and build system related macros. Switching the build system to cvc5 will be the last step in the renaming process. --- diff --git a/docs/cpp/exceptions.rst b/docs/cpp/exceptions.rst index 93a680533..414f27a78 100644 --- a/docs/cpp/exceptions.rst +++ b/docs/cpp/exceptions.rst @@ -2,26 +2,26 @@ Exceptions ========== The CVC5 API communicates certain errors using exceptions. We broadly -distinguish two types of exceptions: :cpp:class:`CVC4ApiException -` and :cpp:class:`CVC4ApiRecoverableException -` (which is derived from -:cpp:class:`CVC4ApiException `). +distinguish two types of exceptions: :cpp:class:`CVC5ApiException +` and :cpp:class:`CVC5ApiRecoverableException +` (which is derived from +:cpp:class:`CVC5ApiException `). -If any method fails with a :cpp:class:`CVC4ApiRecoverableException -`, the solver behaves as if the failing +If any method fails with a :cpp:class:`CVC5ApiRecoverableException +`, the solver behaves as if the failing method was not called. The solver can still be used safely. -If, however, a method fails with a :cpp:class:`CVC4ApiException -`, the associated object may be in an unsafe state +If, however, a method fails with a :cpp:class:`CVC5ApiException +`, the associated object may be in an unsafe state and it should no longer be used. -.. doxygenclass:: cvc5::api::CVC4ApiException +.. doxygenclass:: cvc5::api::CVC5ApiException :project: cvc5 :members: :undoc-members: -.. doxygenclass:: cvc5::api::CVC4ApiRecoverableException +.. doxygenclass:: cvc5::api::CVC5ApiRecoverableException :project: cvc5 :members: :undoc-members: diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index 5c3cbd3f5..2b4cc4795 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -22,7 +22,7 @@ * The only special case is when we use 3rd party back-ends we have no control * over, and which throw (invalid_argument) exceptions anyways. In this case, * we do not replicate argument checks but delegate them to the back-end, - * catch thrown exceptions, and raise a CVC4ApiException. + * catch thrown exceptions, and raise a CVC5ApiException. * * Our Integer implementation, e.g., is such a special case since we support * two different back end implementations (GMP, CLN). Be aware that they do @@ -786,18 +786,18 @@ size_t KindHashFunction::operator()(Kind k) const { return k; } namespace { -class CVC4ApiExceptionStream +class CVC5ApiExceptionStream { public: - CVC4ApiExceptionStream() {} + CVC5ApiExceptionStream() {} /* Note: This needs to be explicitly set to 'noexcept(false)' since it is * a destructor that throws an exception and in C++11 all destructors * default to noexcept(true) (else this triggers a call to std::terminate). */ - ~CVC4ApiExceptionStream() noexcept(false) + ~CVC5ApiExceptionStream() noexcept(false) { if (std::uncaught_exceptions() == 0) { - throw CVC4ApiException(d_stream.str()); + throw CVC5ApiException(d_stream.str()); } } @@ -807,18 +807,18 @@ class CVC4ApiExceptionStream std::stringstream d_stream; }; -class CVC4ApiRecoverableExceptionStream +class CVC5ApiRecoverableExceptionStream { public: - CVC4ApiRecoverableExceptionStream() {} + CVC5ApiRecoverableExceptionStream() {} /* Note: This needs to be explicitly set to 'noexcept(false)' since it is * a destructor that throws an exception and in C++11 all destructors * default to noexcept(true) (else this triggers a call to std::terminate). */ - ~CVC4ApiRecoverableExceptionStream() noexcept(false) + ~CVC5ApiRecoverableExceptionStream() noexcept(false) { if (std::uncaught_exceptions() == 0) { - throw CVC4ApiRecoverableException(d_stream.str()); + throw CVC5ApiRecoverableException(d_stream.str()); } } @@ -835,14 +835,14 @@ class CVC4ApiRecoverableExceptionStream } \ catch (const UnrecognizedOptionException& e) \ { \ - throw CVC4ApiRecoverableException(e.getMessage()); \ + throw CVC5ApiRecoverableException(e.getMessage()); \ } \ catch (const cvc5::RecoverableModalException& e) \ { \ - throw CVC4ApiRecoverableException(e.getMessage()); \ + throw CVC5ApiRecoverableException(e.getMessage()); \ } \ - catch (const cvc5::Exception& e) { throw CVC4ApiException(e.getMessage()); } \ - catch (const std::invalid_argument& e) { throw CVC4ApiException(e.what()); } + catch (const cvc5::Exception& e) { throw CVC5ApiException(e.getMessage()); } \ + catch (const std::invalid_argument& e) { throw CVC5ApiException(e.what()); } } // namespace @@ -4329,7 +4329,7 @@ Term Solver::mkRealFromStrHelper(const std::string& s) const catch (const std::invalid_argument& e) { /* Catch to throw with a more meaningful error message. To be caught in - * enclosing CVC5_API_TRY_CATCH_* block to throw CVC4ApiException. */ + * enclosing CVC5_API_TRY_CATCH_* block to throw CVC5ApiException. */ std::stringstream message; message << "Cannot construct Real or Int from string argument '" << s << "'" << std::endl; @@ -4454,18 +4454,18 @@ Term Solver::mkTermHelper(Kind kind, const std::vector& children) const if (kind == INTS_DIVISION || kind == XOR || kind == MINUS || kind == DIVISION || kind == HO_APPLY || kind == REGEXP_DIFF) { - // left-associative, but CVC4 internally only supports 2 args + // left-associative, but cvc5 internally only supports 2 args res = d_nodeMgr->mkLeftAssociative(k, echildren); } else if (kind == IMPLIES) { - // right-associative, but CVC4 internally only supports 2 args + // right-associative, but cvc5 internally only supports 2 args res = d_nodeMgr->mkRightAssociative(k, echildren); } else if (kind == EQUAL || kind == LT || kind == GT || kind == LEQ || kind == GEQ) { - // "chainable", but CVC4 internally only supports 2 args + // "chainable", but cvc5 internally only supports 2 args res = d_nodeMgr->mkChain(k, echildren); } else if (kind::isAssociative(k)) @@ -4813,7 +4813,7 @@ Sort Solver::getRoundingModeSort(void) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return Sort(this, getNodeManager()->roundingModeType()); //////// @@ -4851,7 +4851,7 @@ Sort Solver::mkFloatingPointSort(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; CVC5_API_ARG_CHECK_EXPECTED(exp > 0, exp) << "exponent size > 0"; CVC5_API_ARG_CHECK_EXPECTED(sig > 0, sig) << "significand size > 0"; //////// all checks before this line @@ -5351,7 +5351,7 @@ Term Solver::mkPosInf(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper( FloatingPoint::makeInf(FloatingPointSize(exp, sig), false)); @@ -5364,7 +5364,7 @@ Term Solver::mkNegInf(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper( FloatingPoint::makeInf(FloatingPointSize(exp, sig), true)); @@ -5377,7 +5377,7 @@ Term Solver::mkNaN(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper( FloatingPoint::makeNaN(FloatingPointSize(exp, sig))); @@ -5390,7 +5390,7 @@ Term Solver::mkPosZero(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper( FloatingPoint::makeZero(FloatingPointSize(exp, sig), false)); @@ -5403,7 +5403,7 @@ Term Solver::mkNegZero(uint32_t exp, uint32_t sig) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper( FloatingPoint::makeZero(FloatingPointSize(exp, sig), true)); @@ -5416,7 +5416,7 @@ Term Solver::mkRoundingMode(RoundingMode rm) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; //////// all checks before this line return mkValHelper(s_rmodes.at(rm)); //////// @@ -5471,7 +5471,7 @@ Term Solver::mkFloatingPoint(uint32_t exp, uint32_t sig, Term val) const NodeManagerScope scope(getNodeManager()); CVC5_API_TRY_CATCH_BEGIN; CVC5_API_CHECK(Configuration::isBuiltWithSymFPU()) - << "Expected CVC4 to be compiled with SymFPU support"; + << "Expected cvc5 to be compiled with SymFPU support"; CVC5_API_SOLVER_CHECK_TERM(val); CVC5_API_ARG_CHECK_EXPECTED(exp > 0, exp) << "a value > 0"; CVC5_API_ARG_CHECK_EXPECTED(sig > 0, sig) << "a value > 0"; diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h index a7fe9f20a..dc834d8b5 100644 --- a/src/api/cpp/cvc5.h +++ b/src/api/cpp/cvc5.h @@ -63,19 +63,19 @@ struct APIStatistics; * Base class for all API exceptions. * If thrown, all API objects may be in an unsafe state. */ -class CVC4_EXPORT CVC4ApiException : public std::exception +class CVC4_EXPORT CVC5ApiException : public std::exception { public: /** * Construct with message from a string. * @param str The error message. */ - CVC4ApiException(const std::string& str) : d_msg(str) {} + CVC5ApiException(const std::string& str) : d_msg(str) {} /** * Construct with message from a string stream. * @param stream The error message. */ - CVC4ApiException(const std::stringstream& stream) : d_msg(stream.str()) {} + CVC5ApiException(const std::stringstream& stream) : d_msg(stream.str()) {} /** * Retrieve the message from this exception. * @return The error message. @@ -96,20 +96,20 @@ class CVC4_EXPORT CVC4ApiException : public std::exception * A recoverable API exception. * If thrown, API objects can still be used. */ -class CVC4_EXPORT CVC4ApiRecoverableException : public CVC4ApiException +class CVC4_EXPORT CVC5ApiRecoverableException : public CVC5ApiException { public: /** * Construct with message from a string. * @param str The error message. */ - CVC4ApiRecoverableException(const std::string& str) : CVC4ApiException(str) {} + CVC5ApiRecoverableException(const std::string& str) : CVC5ApiException(str) {} /** * Construct with message from a string stream. * @param stream The error message. */ - CVC4ApiRecoverableException(const std::stringstream& stream) - : CVC4ApiException(stream.str()) + CVC5ApiRecoverableException(const std::stringstream& stream) + : CVC5ApiException(stream.str()) { } }; @@ -163,7 +163,7 @@ class CVC4_EXPORT Result /** * Return true if query was a checkSat() or checkSatAssuming() query and - * CVC4 was not able to determine (un)satisfiability. + * cvc5 was not able to determine (un)satisfiability. */ bool isSatUnknown() const; @@ -179,7 +179,7 @@ class CVC4_EXPORT Result bool isNotEntailed() const; /** - * Return true if query was a checkEntailed() () query and CVC4 was not able + * Return true if query was a checkEntailed() () query and cvc5 was not able * to determine if it is entailed. */ bool isEntailmentUnknown() const; @@ -248,7 +248,7 @@ std::ostream& operator<<(std::ostream& out, class Datatype; /** - * The sort of a CVC4 term. + * The sort of a cvc5 term. */ class CVC4_EXPORT Sort { @@ -764,7 +764,7 @@ struct CVC4_EXPORT SortHashFunction /* -------------------------------------------------------------------------- */ /** - * A CVC4 operator. + * A cvc5 operator. * An operator is a term that represents certain operators, instantiated * with its required parameters, e.g., a term of kind BITVECTOR_EXTRACT. */ @@ -889,7 +889,7 @@ class CVC4_EXPORT Op /* -------------------------------------------------------------------------- */ /** - * A CVC4 Term. + * A cvc5 Term. */ class CVC4_EXPORT Term { @@ -1369,7 +1369,7 @@ class DatatypeConstructorIterator; class DatatypeIterator; /** - * A CVC4 datatype constructor declaration. + * A cvc5 datatype constructor declaration. */ class CVC4_EXPORT DatatypeConstructorDecl { @@ -1439,7 +1439,7 @@ class CVC4_EXPORT DatatypeConstructorDecl class Solver; /** - * A CVC4 datatype declaration. + * A cvc5 datatype declaration. */ class CVC4_EXPORT DatatypeDecl { @@ -1543,7 +1543,7 @@ class CVC4_EXPORT DatatypeDecl }; /** - * A CVC4 datatype selector. + * A cvc5 datatype selector. */ class CVC4_EXPORT DatatypeSelector { @@ -1612,7 +1612,7 @@ class CVC4_EXPORT DatatypeSelector }; /** - * A CVC4 datatype constructor. + * A cvc5 datatype constructor. */ class CVC4_EXPORT DatatypeConstructor { @@ -1839,7 +1839,7 @@ class CVC4_EXPORT DatatypeConstructor }; /** - * A CVC4 datatype. + * A cvc5 datatype. */ class CVC4_EXPORT Datatype { @@ -2277,8 +2277,8 @@ std::ostream& operator<<(std::ostream& out, const Grammar& g) CVC4_EXPORT; * Rounding modes for floating-point numbers. * * For many floating-point operations, infinitely precise results may not be - * representable with the number of available bits. Thus, the results are rounded in - * a certain way to one of the representable floating-point numbers. + * representable with the number of available bits. Thus, the results are + * rounded in a certain way to one of the representable floating-point numbers. * * \verbatim embed:rst:leading-asterisk * These rounding modes directly follow the SMT-LIB theory for floating-point @@ -2460,7 +2460,7 @@ std::ostream& operator<<(std::ostream& out, const Statistics& stats) CVC4_EXPORT /* -------------------------------------------------------------------------- */ /** - * A CVC4 solver. + * A cvc5 solver. */ class CVC4_EXPORT Solver { @@ -2519,7 +2519,7 @@ class CVC4_EXPORT Solver Sort getBooleanSort() const; /** - * @return sort Integer (in CVC4, Integer is a subtype of Real) + * @return sort Integer (in cvc5, Integer is a subtype of Real) */ Sort getIntegerSort() const; @@ -3052,7 +3052,7 @@ class CVC4_EXPORT Solver Term mkConstArray(const Sort& sort, const Term& val) const; /** - * Create a positive infinity floating-point constant. Requires CVC4 to be + * Create a positive infinity floating-point constant. Requires cvc5 to be * compiled with SymFPU support. * @param exp Number of bits in the exponent * @param sig Number of bits in the significand @@ -3061,7 +3061,7 @@ class CVC4_EXPORT Solver Term mkPosInf(uint32_t exp, uint32_t sig) const; /** - * Create a negative infinity floating-point constant. Requires CVC4 to be + * Create a negative infinity floating-point constant. Requires cvc5 to be * compiled with SymFPU support. * @param exp Number of bits in the exponent * @param sig Number of bits in the significand @@ -3070,7 +3070,7 @@ class CVC4_EXPORT Solver Term mkNegInf(uint32_t exp, uint32_t sig) const; /** - * Create a not-a-number (NaN) floating-point constant. Requires CVC4 to be + * Create a not-a-number (NaN) floating-point constant. Requires cvc5 to be * compiled with SymFPU support. * @param exp Number of bits in the exponent * @param sig Number of bits in the significand @@ -3079,7 +3079,7 @@ class CVC4_EXPORT Solver Term mkNaN(uint32_t exp, uint32_t sig) const; /** - * Create a positive zero (+0.0) floating-point constant. Requires CVC4 to be + * Create a positive zero (+0.0) floating-point constant. Requires cvc5 to be * compiled with SymFPU support. * @param exp Number of bits in the exponent * @param sig Number of bits in the significand @@ -3088,7 +3088,7 @@ class CVC4_EXPORT Solver Term mkPosZero(uint32_t exp, uint32_t sig) const; /** - * Create a negative zero (-0.0) floating-point constant. Requires CVC4 to be + * Create a negative zero (-0.0) floating-point constant. Requires cvc5 to be * compiled with SymFPU support. * @param exp Number of bits in the exponent * @param sig Number of bits in the significand @@ -3122,7 +3122,7 @@ class CVC4_EXPORT Solver Term mkAbstractValue(uint64_t index) const; /** - * Create a floating-point constant (requires CVC4 to be compiled with symFPU + * Create a floating-point constant (requires cvc5 to be compiled with symFPU * support). * @param exp Size of the exponent * @param sig Size of the significand diff --git a/src/api/cpp/cvc5_checks.h b/src/api/cpp/cvc5_checks.h index 9cfa0d252..d332652fd 100644 --- a/src/api/cpp/cvc5_checks.h +++ b/src/api/cpp/cvc5_checks.h @@ -29,19 +29,19 @@ namespace api { /** * The base check macro. - * Throws a CVC4ApiException if 'cond' is false. + * Throws a CVC5ApiException if 'cond' is false. */ #define CVC5_API_CHECK(cond) \ CVC5_PREDICT_TRUE(cond) \ - ? (void)0 : OstreamVoider() & CVC4ApiExceptionStream().ostream() + ? (void)0 : OstreamVoider() & CVC5ApiExceptionStream().ostream() /** * The base check macro for throwing recoverable exceptions. - * Throws a CVC4RecoverableApiException if 'cond' is false. + * Throws a CVC5ApiRecoverableException if 'cond' is false. */ #define CVC5_API_RECOVERABLE_CHECK(cond) \ CVC5_PREDICT_TRUE(cond) \ - ? (void)0 : OstreamVoider() & CVC4ApiRecoverableExceptionStream().ostream() + ? (void)0 : OstreamVoider() & CVC5ApiRecoverableExceptionStream().ostream() /* -------------------------------------------------------------------------- */ /* Not null checks. */ @@ -87,7 +87,7 @@ namespace api { CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ : OstreamVoider() \ - & CVC4ApiExceptionStream().ostream() \ + & CVC5ApiExceptionStream().ostream() \ << "Invalid kind '" << kindToString(kind) << "', expected " /* -------------------------------------------------------------------------- */ @@ -103,7 +103,7 @@ namespace api { CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ : OstreamVoider() \ - & CVC4ApiExceptionStream().ostream() \ + & CVC5ApiExceptionStream().ostream() \ << "Invalid argument '" << arg << "' for '" << #arg \ << "', expected " @@ -116,7 +116,7 @@ namespace api { CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ : OstreamVoider() \ - & CVC4ApiRecoverableExceptionStream().ostream() \ + & CVC5ApiRecoverableExceptionStream().ostream() \ << "Invalid argument '" << arg << "' for '" << #arg \ << "', expected " @@ -131,7 +131,7 @@ namespace api { CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ : OstreamVoider() \ - & CVC4ApiExceptionStream().ostream() \ + & CVC5ApiExceptionStream().ostream() \ << "Invalid size of argument '" << #arg << "', expected " /** @@ -147,7 +147,7 @@ namespace api { CVC5_PREDICT_TRUE(cond) \ ? (void)0 \ : OstreamVoider() \ - & CVC4ApiExceptionStream().ostream() \ + & CVC5ApiExceptionStream().ostream() \ << "Invalid " << (what) << " in '" << #args << "' at index " \ << (idx) << ", expected " diff --git a/src/api/cpp/cvc5_kind.h b/src/api/cpp/cvc5_kind.h index d1b0a277b..6cb4be3c8 100644 --- a/src/api/cpp/cvc5_kind.h +++ b/src/api/cpp/cvc5_kind.h @@ -29,7 +29,7 @@ namespace api { // TODO(Gereon): Fix links that involve std::vector. See https://github.com/doxygen/doxygen/issues/8503 /** - * The kind of a CVC4 term. + * The kind of a cvc5 term. * * Note that the underlying type of Kind must be signed (to enable range * checks for validity). The size of this type depends on the size of @@ -57,21 +57,21 @@ enum CVC4_EXPORT Kind : int32_t /** * Uninterpreted constant. - * + * * Parameters: * - 1: Sort of the constant * - 2: Index of the constant - * + * * Create with: * - `Solver::mkUninterpretedConst(const Sort& sort, int32_t index) const` */ UNINTERPRETED_CONSTANT, /** * Abstract value (other than uninterpreted sort constants). - * + * * Parameters: * - 1: Index of the abstract value - * + * * Create with: * - `Solver::mkAbstractValue(const std::string& index) const` * - `Solver::mkAbstractValue(uint64_t index) const` @@ -83,10 +83,10 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Equality, chainable. - * + * * Parameters: n > 1 * - 1..n: Terms with same sorts - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -95,10 +95,10 @@ enum CVC4_EXPORT Kind : int32_t EQUAL, /** * Disequality. - * + * * Parameters: n > 1 * - 1..n: Terms with same sorts - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -107,12 +107,12 @@ enum CVC4_EXPORT Kind : int32_t DISTINCT, /** * First-order constant. - * + * * Not permitted in bindings (forall, exists, ...). - * + * * Parameters: * - See @ref cvc5::api::Solver::mkConst() "mkConst()". - * + * * Create with: * - `Solver::mkConst(const Sort& sort, const std::string& symbol) const` * - `Solver::mkConst(const Sort& sort) const` @@ -120,12 +120,12 @@ enum CVC4_EXPORT Kind : int32_t CONSTANT, /** * (Bound) variable. - * + * * Permitted in bindings and in the lambda and quantifier bodies only. - * + * * Parameters: * - See @ref cvc5::api::Solver::mkVar() "mkVar()". - * + * * Create with: * - `Solver::mkVar(const Sort& sort, const std::string& symbol) const` */ @@ -136,10 +136,10 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Symbolic expression. - * + * * Parameters: n > 0 * - 1..n: terms - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` @@ -149,11 +149,11 @@ enum CVC4_EXPORT Kind : int32_t SEXPR, /** * Lambda expression. - * + * * Parameters: * - 1: BOUND_VAR_LIST * - 2: Lambda body - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -169,14 +169,14 @@ enum CVC4_EXPORT Kind : int32_t * (see https://planetmath.org/hilbertsvarepsilonoperator) if there is no x * that satisfies F. But if such x exists, the witness operator does not * enforce the axiom that ensures uniqueness up to logical equivalence: - * + * * @f[ * \forall x. F \equiv G \Rightarrow witness~x. F = witness~x. G * @f] * * For example if there are 2 elements of type T that satisfy F, then the * following formula is satisfiable: - * + * * (distinct * (witness ((x Int)) F) * (witness ((x Int)) F)) @@ -195,7 +195,7 @@ enum CVC4_EXPORT Kind : int32_t * Parameters: * - 1: BOUND_VAR_LIST * - 2: Witness body - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -206,10 +206,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Boolean constant. - * + * * Parameters: * - 1: Boolean value of the constant - * + * * Create with: * - `Solver::mkTrue() const` * - `Solver::mkFalse() const` @@ -218,20 +218,20 @@ enum CVC4_EXPORT Kind : int32_t CONST_BOOLEAN, /** * Logical negation. - * + * * Parameters: * - 1: Boolean Term to negate - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ NOT, /** * Logical conjunction. - * + * * Parameters: n > 1 * - 1..n: Boolean Term of the conjunction - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -240,10 +240,10 @@ enum CVC4_EXPORT Kind : int32_t AND, /** * Logical implication. - * + * * Parameters: n > 1 * - 1..n: Boolean Terms, right associative - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -252,10 +252,10 @@ enum CVC4_EXPORT Kind : int32_t IMPLIES, /** * Logical disjunction. - * + * * Parameters: n > 1 * - 1..n: Boolean Term of the disjunction - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -264,10 +264,10 @@ enum CVC4_EXPORT Kind : int32_t OR, /** * Logical exclusive disjunction, left associative. - * + * * Parameters: n > 1 * - 1..n: Boolean Terms, `[1] xor ... xor [n]` - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -276,14 +276,14 @@ enum CVC4_EXPORT Kind : int32_t XOR, /** * If-then-else. - * + * * Parameters: * - 1: is a Boolean condition Term * - 2: the 'then' Term * - 3: the 'else' Term * * 'then' and 'else' term must have same base sort. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -294,11 +294,11 @@ enum CVC4_EXPORT Kind : int32_t /** * Application of an uninterpreted function. - * + * * Parameters: n > 1 * - 1: Function Term * - 2..n: Function argument instantiation Terms - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -313,11 +313,11 @@ enum CVC4_EXPORT Kind : int32_t * Cardinality constraint on uninterpreted sort S. * Interpreted as a predicate that is true when the cardinality of S * is less than or equal to the value of the second argument. - * + * * Parameters: * - 1: Term of sort S * - 2: Positive integer constant that bounds the cardinality of sort S - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -327,10 +327,10 @@ enum CVC4_EXPORT Kind : int32_t * Cardinality value for uninterpreted sort S. * An operator that returns an integer indicating the value of the cardinality * of sort S. - * + * * Parameters: * - 1: Term of sort S - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -345,11 +345,11 @@ enum CVC4_EXPORT Kind : int32_t /** * Higher-order applicative encoding of function application, left * associative. - * + * * Parameters: n > 1 * - 1: Function to apply * - 2..n: Arguments of the function - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -361,10 +361,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Arithmetic addition. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -373,10 +373,10 @@ enum CVC4_EXPORT Kind : int32_t PLUS, /** * Arithmetic multiplication. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -385,10 +385,10 @@ enum CVC4_EXPORT Kind : int32_t MULT, /** * Operator for Integer AND - * + * * Parameters: * - 1: Size of the bit-vector that determines the semantics of the IAND - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * @@ -398,7 +398,7 @@ enum CVC4_EXPORT Kind : int32_t * - 1: Op of kind IAND * - 2: Integer term * - 3: Integer term - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -410,10 +410,10 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Arithmetic subtraction, left associative. - * + * * Parameters: * - 1..n: Terms of sort Integer, Real (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -422,20 +422,20 @@ enum CVC4_EXPORT Kind : int32_t MINUS, /** * Arithmetic negation. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ UMINUS, /** * Real division, division by 0 undefined, left associative. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -444,10 +444,10 @@ enum CVC4_EXPORT Kind : int32_t DIVISION, /** * Integer division, division by 0 undefined, left associative. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -456,11 +456,11 @@ enum CVC4_EXPORT Kind : int32_t INTS_DIVISION, /** * Integer modulus, division by 0 undefined. - * + * * Parameters: * - 1: Term of sort Integer * - 2: Term of sort Integer - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -468,21 +468,21 @@ enum CVC4_EXPORT Kind : int32_t INTS_MODULUS, /** * Absolute value. - * + * * Parameters: * - 1: Term of sort Integer - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ABS, /** * Arithmetic power. - * + * * Parameters: * - 1: Term of sort Integer, Real * - 2: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -490,159 +490,159 @@ enum CVC4_EXPORT Kind : int32_t POW, /** * Exponential function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ EXPONENTIAL, /** * Sine function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ SINE, /** * Cosine function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ COSINE, /** * Tangent function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ TANGENT, /** * Cosecant function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ COSECANT, /** * Secant function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ SECANT, /** * Cotangent function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ COTANGENT, /** * Arc sine function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCSINE, /** * Arc cosine function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCCOSINE, /** * Arc tangent function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCTANGENT, /** * Arc cosecant function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCCOSECANT, /** * Arc secant function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCSECANT, /** * Arc cotangent function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ ARCCOTANGENT, /** * Square root. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ SQRT, /** * Operator for the divisibility-by-k predicate. - * + * * Parameter: * - 1: The k to divide by (sort Integer) - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * * Apply divisibility-by-k predicate. - * + * * Parameters: * - 1: Op of kind DIVISIBLE * - 2: Integer Term - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -650,10 +650,10 @@ enum CVC4_EXPORT Kind : int32_t DIVISIBLE, /** * Multiple-precision rational constant. - * + * * Parameters: * See @ref cvc5::api::Solver::mkInteger() "mkInteger()", @ref cvc5::api::Solver::mkReal() "mkReal()". - * + * * Create with: * - `Solver::mkInteger(const std::string& s) const` * - `Solver::mkInteger(int64_t val) const` @@ -664,10 +664,10 @@ enum CVC4_EXPORT Kind : int32_t CONST_RATIONAL, /** * Less than, chainable. - * + * * Parameters: n * - 1..n: Terms of sort Integer, Real; [1] < ... < [n] - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -676,10 +676,10 @@ enum CVC4_EXPORT Kind : int32_t LT, /** * Less than or equal, chainable. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real; [1] <= ... <= [n] - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -687,10 +687,10 @@ enum CVC4_EXPORT Kind : int32_t LEQ, /** * Greater than, chainable. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real, [1] > ... > [n] - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -699,10 +699,10 @@ enum CVC4_EXPORT Kind : int32_t GT, /** * Greater than or equal, chainable. - * + * * Parameters: n > 1 * - 1..n: Terms of sort Integer, Real; [1] >= ... >= [n] - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -711,37 +711,37 @@ enum CVC4_EXPORT Kind : int32_t GEQ, /** * Is-integer predicate. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ IS_INTEGER, /** * Convert Term to Integer by the floor function. - * + * * Parameters: * - 1: Term of sort Integer, Real - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ TO_INTEGER, /** * Convert Term to Real. - * + * * Parameters: - * + * * - 1: Term of sort Integer, Real - * - * This is a no-op in CVC4, as Integer is a subtype of Real. + * + * This is a no-op in cvc5, as Integer is a subtype of Real. */ TO_REAL, /** * Pi constant. - * + * * Create with: * - `Solver::mkPi() const` * - `Solver::mkTerm(Kind kind) const` @@ -752,10 +752,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Fixed-size bit-vector constant. - * + * * Parameters: * See @ref cvc5::api::Solver::mkBitVector() "mkBitVector()". - * + * * Create with: * - `Solver::mkBitVector(uint32_t size, uint64_t val) const` * - `Solver::mkBitVector(const std::string& s, uint32_t base) const` @@ -764,10 +764,10 @@ enum CVC4_EXPORT Kind : int32_t CONST_BITVECTOR, /** * Concatenation of two or more bit-vectors. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -776,10 +776,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_CONCAT, /** * Bit-wise and. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -788,10 +788,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_AND, /** * Bit-wise or. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -800,10 +800,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_OR, /** * Bit-wise xor. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -812,20 +812,20 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_XOR, /** * Bit-wise negation. - * + * * Parameters: * - 1: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ BITVECTOR_NOT, /** * Bit-wise nand. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -833,10 +833,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_NAND, /** * Bit-wise nor. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -844,10 +844,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_NOR, /** * Bit-wise xnor, left associative. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -855,10 +855,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_XNOR, /** * Equality comparison (returns bit-vector of size 1). - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -867,10 +867,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_COMP, /** * Multiplication of two or more bit-vectors. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -879,10 +879,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_MULT, /** * Addition of two or more bit-vectors. - * + * * Parameters: n > 1 * - 1..n: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -891,10 +891,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_PLUS, /** * Subtraction of two bit-vectors. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -902,10 +902,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_SUB, /** * Negation of a bit-vector (two's complement). - * + * * Parameters: * - 1: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -920,7 +920,7 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -936,7 +936,7 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -953,7 +953,7 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -970,7 +970,7 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -987,7 +987,7 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -996,10 +996,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector shift left. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1008,10 +1008,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector logical shift right. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1020,10 +1020,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector arithmetic shift right. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1032,10 +1032,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector unsigned less than. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1044,10 +1044,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector unsigned less than or equal. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1056,10 +1056,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector unsigned greater than. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1068,10 +1068,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector unsigned greater than or equal. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1080,10 +1080,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector signed less than. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1092,10 +1092,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector signed less than or equal. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1104,10 +1104,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector signed greater than. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1116,10 +1116,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bit-vector signed greater than or equal. * The two bit-vector parameters must have same width. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1127,10 +1127,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_SGE, /** * Bit-vector unsigned less than, returns bit-vector of size 1. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1138,10 +1138,10 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_ULTBV, /** * Bit-vector signed less than. returns bit-vector of size 1. - * + * * Parameters: * - 1..2: Terms of bit-vector sort (sorts must match) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1149,14 +1149,14 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_SLTBV, /** * Same semantics as regular ITE, but condition is bit-vector of size 1. - * + * * Parameters: * - 1: Term of bit-vector sort of size 1, representing the condition * - 2: Term reprsenting the 'then' branch * - 3: Term representing the 'else' branch - * + * * 'then' and 'else' term must have same base sort. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1164,20 +1164,20 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_ITE, /** * Bit-vector redor. - * + * * Parameters: * - 1: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ BITVECTOR_REDOR, /** * Bit-vector redand. - * + * * Parameters: * - 1: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -1195,20 +1195,20 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Operator for bit-vector extract (from index 'high' to 'low'). - * + * * Parameters: * - 1: The 'high' index * - 2: The 'low' index - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param, uint32_t param) const` * * Apply bit-vector extract. - * + * * Parameters: * - 1: Op of kind BITVECTOR_EXTRACT * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1216,19 +1216,19 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_EXTRACT, /** * Operator for bit-vector repeat. - * + * * Parameter: * - 1: Number of times to repeat a given bit-vector - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply bit-vector repeat. - * + * * Parameters: * - 1: Op of kind BITVECTOR_REPEAT * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1236,19 +1236,19 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_REPEAT, /** * Operator for bit-vector zero-extend. - * + * * Parameter: * - 1: Number of bits by which a given bit-vector is to be extended - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply bit-vector zero-extend. - * + * * Parameters: * - 1: Op of kind BITVECTOR_ZERO_EXTEND * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1256,19 +1256,19 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_ZERO_EXTEND, /** * Operator for bit-vector sign-extend. - * + * * Parameter: * - 1: Number of bits by which a given bit-vector is to be extended - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply bit-vector sign-extend. - * + * * Parameters: * - 1: Op of kind BITVECTOR_SIGN_EXTEND * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1276,19 +1276,19 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_SIGN_EXTEND, /** * Operator for bit-vector rotate left. - * + * * Parameter: * - 1: Number of bits by which a given bit-vector is to be rotated - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply bit-vector rotate left. - * + * * Parameters: * - 1: Op of kind BITVECTOR_ROTATE_LEFT * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1296,19 +1296,19 @@ enum CVC4_EXPORT Kind : int32_t BITVECTOR_ROTATE_LEFT, /** * Operator for bit-vector rotate right. - * + * * Parameter: * - 1: Number of bits by which a given bit-vector is to be rotated - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply bit-vector rotate right. - * + * * Parameters: * - 1: Op of kind BITVECTOR_ROTATE_RIGHT * - 2: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1320,19 +1320,19 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Operator for the conversion from Integer to bit-vector. - * + * * Parameter: * - 1: Size of the bit-vector to convert to - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const`. * * Apply integer conversion to bit-vector. - * + * * Parameters: * - 1: Op of kind INT_TO_BITVECTOR * - 2: Integer term - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1340,10 +1340,10 @@ enum CVC4_EXPORT Kind : int32_t INT_TO_BITVECTOR, /** * Bit-vector conversion to (nonnegative) integer. - * + * * Parameter: * - 1: Term of bit-vector sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -1353,31 +1353,31 @@ enum CVC4_EXPORT Kind : int32_t /** * Floating-point constant, constructed from a double or string. - * + * * Parameters: * - 1: Size of the exponent * - 2: Size of the significand * - 3: Value of the floating-point constant as a bit-vector term - * + * * Create with: * - `Solver::mkFloatingPoint(uint32_t exp, uint32_t sig, Term val) const` */ CONST_FLOATINGPOINT, /** * Floating-point rounding mode term. - * + * * Create with: * - `Solver::mkRoundingMode(RoundingMode rm) const` */ CONST_ROUNDINGMODE, /** * Create floating-point literal from bit-vector triple. - * + * * Parameters: * - 1: Sign bit as a bit-vector term * - 2: Exponent bits as a bit-vector term * - 3: Significand bits as a bit-vector term (without hidden bit) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1385,10 +1385,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_FP, /** * Floating-point equality. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1396,32 +1396,32 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_EQ, /** * Floating-point absolute value. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ABS, /** * Floating-point negation. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_NEG, /** * Floating-point addition. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint * - 3: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1429,12 +1429,12 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_PLUS, /** * Floating-point sutraction. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint * - 3: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1442,12 +1442,12 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_SUB, /** * Floating-point multiply. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint * - 3: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1455,12 +1455,12 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_MULT, /** * Floating-point division. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint * - 3: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1468,24 +1468,24 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_DIV, /** * Floating-point fused multiply and add. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint * - 3: Term of sort FloatingPoint * - 4: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const std::vector& children) const` */ FLOATINGPOINT_FMA, /** * Floating-point square root. - * + * * Parameters: * - 1: CONST_ROUNDINGMODE * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1493,10 +1493,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_SQRT, /** * Floating-point remainder. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1504,10 +1504,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_REM, /** * Floating-point round to integral. - * + * * Parameters: * -1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1515,10 +1515,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_RTI, /** * Floating-point minimum. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1526,10 +1526,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_MIN, /** * Floating-point maximum. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1537,10 +1537,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_MAX, /** * Floating-point less than or equal. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1548,10 +1548,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_LEQ, /** * Floating-point less than. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1559,10 +1559,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_LT, /** * Floating-point greater than or equal. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1570,10 +1570,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_GEQ, /** * Floating-point greater than. - * + * * Parameters: * - 1..2: Terms of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1581,90 +1581,90 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_GT, /** * Floating-point is normal. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISN, /** * Floating-point is sub-normal. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISSN, /** * Floating-point is zero. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISZ, /** * Floating-point is infinite. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISINF, /** * Floating-point is NaN. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISNAN, /** * Floating-point is negative. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISNEG, /** * Floating-point is positive. - * + * * Parameters: * - 1: Term of floating point sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ FLOATINGPOINT_ISPOS, /** * Operator for to_fp from bit vector. - * + * * Parameters: * - 1: Exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Conversion from an IEEE-754 bit vector to floating-point. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_IEEE_BITVECTOR * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1672,20 +1672,20 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_IEEE_BITVECTOR, /** * Operator for to_fp from floating point. - * + * * Parameters: * - 1: Exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Conversion between floating-point sorts. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_FLOATINGPOINT * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1693,20 +1693,20 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_FLOATINGPOINT, /** * Operator for to_fp from real. - * + * * Parameters: * - 1: Exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Conversion from a real to floating-point. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_REAL * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1714,20 +1714,20 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_REAL, /** * Operator for to_fp from signed bit vector - * + * * Parameters: * - 1: Exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Conversion from a signed bit vector to floating-point. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1735,20 +1735,20 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR, /** * Operator for to_fp from unsigned bit vector. - * + * * Parameters: * - 1: Exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Converting an unsigned bit vector to floating-point. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1756,20 +1756,20 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR, /** * Operator for a generic to_fp. - * + * * Parameters: * - 1: exponent size * - 2: Significand size - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param1, uint32_t param2) const` * * Generic conversion to floating-point, used in parsing only. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_GENERIC * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1777,19 +1777,19 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_FP_GENERIC, /** * Operator for to_ubv. - * + * * Parameters: * - 1: Size of the bit-vector to convert to - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * * Conversion from a floating-point value to an unsigned bit vector. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_TO_UBV * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1797,19 +1797,19 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_UBV, /** * Operator for to_sbv. - * + * * Parameters: * - 1: Size of the bit-vector to convert to - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * * Conversion from a floating-point value to a signed bit vector. - * + * * Parameters: * - 1: Op of kind FLOATINGPOINT_TO_FP_TO_SBV * - 2: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1817,10 +1817,10 @@ enum CVC4_EXPORT Kind : int32_t FLOATINGPOINT_TO_SBV, /** * Floating-point to real. - * + * * Parameters: * - 1: Term of sort FloatingPoint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -1830,11 +1830,11 @@ enum CVC4_EXPORT Kind : int32_t /** * Array select. - * + * * Parameters: * - 1: Term of array sort * - 2: Selection index - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1842,12 +1842,12 @@ enum CVC4_EXPORT Kind : int32_t SELECT, /** * Array store. - * + * * Parameters: * - 1: Term of array sort * - 2: Store index * - 3: Term to store at the index - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1855,11 +1855,11 @@ enum CVC4_EXPORT Kind : int32_t STORE, /** * Constant array. - * + * * Parameters: * - 1: Array sort * - 2: Term representing a constant - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1880,7 +1880,7 @@ enum CVC4_EXPORT Kind : int32_t * - 2: Second array * - 3: Lower bound of range (inclusive) * - 4: Uppper bound of range (inclusive) - * + * * Create with: * - `Solver::mkTerm(const Op& op, const std::vector& children) const` * @@ -1904,11 +1904,11 @@ enum CVC4_EXPORT Kind : int32_t /** * Constructor application. - * + * * Paramters: n > 0 * - 1: Constructor (operator) * - 2..n: Parameters to the constructor - * + * * Create with: * - `Solver::mkTerm(const Op& op) const` * - `Solver::mkTerm(const Op& op, const Term& child) const` @@ -1919,22 +1919,22 @@ enum CVC4_EXPORT Kind : int32_t APPLY_CONSTRUCTOR, /** * Datatype selector application. - * + * * Parameters: * - 1: Selector (operator) * - 2: Datatype term (undefined if mis-applied) - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` */ APPLY_SELECTOR, /** * Datatype tester application. - * + * * Parameters: * - 1: Tester term * - 2: Datatype term - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -1950,20 +1950,20 @@ enum CVC4_EXPORT Kind : int32_t #endif /** * Operator for a tuple update. - * + * * Parameters: * - 1: Index of the tuple to be updated - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * * Apply tuple update. - * + * * Parameters: * - 1: Op of kind TUPLE_UPDATE (which references an index) * - 2: Tuple * - 3: Element to store in the tuple at the given index - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -1971,20 +1971,20 @@ enum CVC4_EXPORT Kind : int32_t TUPLE_UPDATE, /** * Operator for a record update. - * + * * Parameters: * - 1: Name of the field to be updated - * + * * Create with: * - `Solver::mkOp(Kind kind, const std::string& param) const` * * Record update. - * + * * Parameters: * - 1: Op of kind RECORD_UPDATE (which references a field) * - 2: Record term to update * - 3: Element to store in the record in the given field - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(const Op& op,, const std::vector& children) const` @@ -1995,16 +1995,16 @@ enum CVC4_EXPORT Kind : int32_t * For example, the smt2 syntax match term * `(match l (((cons h t) h) (nil 0)))` * is represented by the AST - * + * * (MATCH l * (MATCH_BIND_CASE (BOUND_VAR_LIST h t) (cons h t) h) * (MATCH_CASE nil 0)) - * + * * The type of the last argument of each case term could be equal. - * + * * Parameters: n > 1 * - 1..n: Terms of kind MATCH_CASE or MATCH_BIND_CASE - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -2015,11 +2015,11 @@ enum CVC4_EXPORT Kind : int32_t /** * Match case * A (constant) case expression to be used within a match expression. - * + * * Parameters: * - 1: Term denoting the pattern expression * - 2: Term denoting the return value - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2028,12 +2028,12 @@ enum CVC4_EXPORT Kind : int32_t /** * Match bind case * A (non-constant) case expression to be used within a match expression. - * + * * Parameters: * - 1: a BOUND_VAR_LIST Term containing the free variables of the case * - 2: Term denoting the pattern expression * - 3: Term denoting the return value - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2043,10 +2043,10 @@ enum CVC4_EXPORT Kind : int32_t * Datatypes size * An operator mapping datatypes to an integer denoting the number of * non-nullary applications of constructors they contain. - * + * * Parameters: * - 1: Datatype term - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2054,19 +2054,19 @@ enum CVC4_EXPORT Kind : int32_t DT_SIZE, /** * Operator for tuple projection indices - * + * * Parameters: * - 1: The tuple projection indices - * + * * Create with: * - `Solver::mkOp(Kind TUPLE_PROJECT, std::vector param) const` * * Constructs a new tuple from an existing one using the elements at the * given indices - * + * * Parameters: * - 1: a term of tuple sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -2089,22 +2089,22 @@ enum CVC4_EXPORT Kind : int32_t /** * Separation logic nil term. - * + * * Parameters: none - * + * * Create with: * - `Solver::mkSepNil(const Sort& sort) const` */ SEP_NIL, /** * Separation logic empty heap. - * + * * Parameters: * - 1: Term of the same sort as the sort of the location of the heap * that is constrained to be empty * - 2: Term of the same sort as the data sort of the heap that is * that is constrained to be empty - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2112,11 +2112,11 @@ enum CVC4_EXPORT Kind : int32_t SEP_EMP, /** * Separation logic points-to relation. - * + * * Parameters: * - 1: Location of the points-to constraint * - 2: Data of the points-to constraint - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2124,10 +2124,10 @@ enum CVC4_EXPORT Kind : int32_t SEP_PTO, /** * Separation logic star. - * + * * Parameters: n > 1 * - 1..n: Child constraints that hold in disjoint (separated) heaps - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -2136,12 +2136,12 @@ enum CVC4_EXPORT Kind : int32_t SEP_STAR, /** * Separation logic magic wand. - * + * * Parameters: * - 1: Antecendant of the magic wand constraint * - 2: Conclusion of the magic wand constraint, which is asserted to * hold in all heaps that are disjoint extensions of the antecedent. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2156,20 +2156,20 @@ enum CVC4_EXPORT Kind : int32_t /** * Empty set constant. - * + * * Parameters: * - 1: Sort of the set elements - * + * * Create with: * - `Solver::mkEmptySet(const Sort& sort) const` */ EMPTYSET, /** * Set union. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2177,10 +2177,10 @@ enum CVC4_EXPORT Kind : int32_t UNION, /** * Set intersection. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2188,10 +2188,10 @@ enum CVC4_EXPORT Kind : int32_t INTERSECTION, /** * Set subtraction. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2199,10 +2199,10 @@ enum CVC4_EXPORT Kind : int32_t SETMINUS, /** * Subset predicate. - * + * * Parameters: * - 1..2: Terms of set sort, [1] a subset of set [2]? - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2210,10 +2210,10 @@ enum CVC4_EXPORT Kind : int32_t SUBSET, /** * Set membership predicate. - * + * * Parameters: * - 1..2: Terms of set sort, [1] a member of set [2]? - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2222,21 +2222,21 @@ enum CVC4_EXPORT Kind : int32_t /** * Construct a singleton set from an element given as a parameter. * The returned set has same type of the element. - * + * * Parameters: * - 1: Single element - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ SINGLETON, /** * The set obtained by inserting elements; - * + * * Parameters: n > 0 * - 1..n-1: Elements inserted into set [n] * - n: Set Term - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` @@ -2246,20 +2246,20 @@ enum CVC4_EXPORT Kind : int32_t INSERT, /** * Set cardinality. - * + * * Parameters: * - 1: Set to determine the cardinality of - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ CARD, /** * Set complement with respect to finite universe. - * + * * Parameters: * - 1: Set to complement - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2267,17 +2267,17 @@ enum CVC4_EXPORT Kind : int32_t /** * Finite universe set. * All set variables must be interpreted as subsets of it. - * + * * Create with: * - `Solver::mkUniverseSet(const Sort& sort) const` */ UNIVERSE_SET, /** * Set join. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2285,10 +2285,10 @@ enum CVC4_EXPORT Kind : int32_t JOIN, /** * Set cartesian product. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2296,30 +2296,30 @@ enum CVC4_EXPORT Kind : int32_t PRODUCT, /** * Set transpose. - * + * * Parameters: * - 1: Term of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ TRANSPOSE, /** * Set transitive closure. - * + * * Parameters: * - 1: Term of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ TCLOSURE, /** * Set join image. - * + * * Parameters: * - 1..2: Terms of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2327,10 +2327,10 @@ enum CVC4_EXPORT Kind : int32_t JOIN_IMAGE, /** * Set identity. - * + * * Parameters: * - 1: Term of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2346,12 +2346,12 @@ enum CVC4_EXPORT Kind : int32_t * where y ranges over the element type of the (set) type of the * comprehension. If @f$ t[x_1..x_n] @f$ is not provided, it is equivalent to y in the * above formula. - * + * * Parameters: * - 1: Term BOUND_VAR_LIST * - 2: Term denoting the predicate of the comprehension * - 3: (optional) a Term denoting the generator for the comprehension - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -2364,20 +2364,20 @@ enum CVC4_EXPORT Kind : int32_t * If the set is empty, then (choose A) is an arbitrary value. * If the set has cardinality > 1, then (choose A) will deterministically * return an element in A. - * + * * Parameters: * - 1: Term of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ CHOOSE, /** * Set is_singleton predicate. - * + * * Parameters: * - 1: Term of set sort, is [1] a singleton set? - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2385,10 +2385,10 @@ enum CVC4_EXPORT Kind : int32_t /* Bags ------------------------------------------------------------------ */ /** * Empty bag constant. - * + * * Parameters: * - 1: Sort of the bag elements - * + * * Create with: * mkEmptyBag(const Sort& sort) */ @@ -2397,7 +2397,7 @@ enum CVC4_EXPORT Kind : int32_t * Bag max union. * Parameters: * - 1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2405,10 +2405,10 @@ enum CVC4_EXPORT Kind : int32_t UNION_MAX, /** * Bag disjoint union (sum). - * + * * Parameters: * -1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2416,10 +2416,10 @@ enum CVC4_EXPORT Kind : int32_t UNION_DISJOINT, /** * Bag intersection (min). - * + * * Parameters: * - 1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2428,10 +2428,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Bag difference subtract (subtracts multiplicities of the second from the * first). - * + * * Parameters: * - 1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2439,10 +2439,10 @@ enum CVC4_EXPORT Kind : int32_t DIFFERENCE_SUBTRACT, /** * Bag difference 2 (removes shared elements in the two bags). - * + * * Parameters: * - 1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2451,10 +2451,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Inclusion predicate for bags * (multiplicities of the first bag <= multiplicities of the second bag). - * + * * Parameters: * - 1..2: Terms of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2462,10 +2462,10 @@ enum CVC4_EXPORT Kind : int32_t SUBBAG, /** * Element multiplicity in a bag - * + * * Parameters: * - 1..2: Terms of bag sort (Bag E), [1] an element of sort E - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2474,10 +2474,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Eliminate duplicates in a given bag. The returned bag contains exactly the * same elements in the given bag, but with multiplicity one. - * + * * Parameters: * - 1: a term of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2485,20 +2485,20 @@ enum CVC4_EXPORT Kind : int32_t DUPLICATE_REMOVAL, /** * The bag of the single element given as a parameter. - * + * * Parameters: * - 1: Single element - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ MK_BAG, /** * Bag cardinality. - * + * * Parameters: * - 1: Bag to determine the cardinality of - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2510,10 +2510,10 @@ enum CVC4_EXPORT Kind : int32_t * If the bag is empty, then (choose A) is an arbitrary value. * If the bag contains distinct elements, then (choose A) will * deterministically return an element in A. - * + * * Parameters: * - 1: Term of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2522,27 +2522,27 @@ enum CVC4_EXPORT Kind : int32_t * Bag is_singleton predicate (single element with multiplicity exactly one). * Parameters: * - 1: Term of bag sort, is [1] a singleton bag? - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ BAG_IS_SINGLETON, /** * Bag.from_set converts a set to a bag. - * + * * Parameters: * - 1: Term of set sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ BAG_FROM_SET, /** * Bag.to_set converts a bag to a set. - * + * * Parameters: * - 1: Term of bag sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2552,10 +2552,10 @@ enum CVC4_EXPORT Kind : int32_t /** * String concat. - * + * * Parameters: n > 1 * - 1..n: Terms of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -2564,11 +2564,11 @@ enum CVC4_EXPORT Kind : int32_t STRING_CONCAT, /** * String membership. - * + * * Parameters: * - 1: Term of String sort * - 2: Term of RegExp sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2576,10 +2576,10 @@ enum CVC4_EXPORT Kind : int32_t STRING_IN_REGEXP, /** * String length. - * + * * Parameters: * - 1: Term of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2590,12 +2590,12 @@ enum CVC4_EXPORT Kind : int32_t * s. If the start index is negative, the start index is greater than the * length of the string, or the length is negative, the result is the empty * string. - * + * * Parameters: * - 1: Term of sort String * - 2: Term of sort Integer (index i) * - 3: Term of sort Integer (length l) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2607,12 +2607,12 @@ enum CVC4_EXPORT Kind : int32_t * If the start index is negative, the start index is greater than the * length of the string, the result is s. Otherwise, the length of the * original string is preserved. - * + * * Parameters: * - 1: Term of sort String * - 2: Term of sort Integer (index i) * - 3: Term of sort String (replacement string t) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2623,11 +2623,11 @@ enum CVC4_EXPORT Kind : int32_t * Returns the character at index i from a string s. If the index is negative * or the index is greater than the length of the string, the result is the * empty string. Otherwise the result is a string of length 1. - * + * * Parameters: * - 1: Term of sort String (string s) * - 2: Term of sort Integer (index i) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2637,11 +2637,11 @@ enum CVC4_EXPORT Kind : int32_t * String contains. * Checks whether a string s1 contains another string s2. If s2 is empty, the * result is always true. - * + * * Parameters: * - 1: Term of sort String (the string s1) * - 2: Term of sort String (the string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2652,12 +2652,12 @@ enum CVC4_EXPORT Kind : int32_t * Returns the index of a substring s2 in a string s1 starting at index i. If * the index is negative or greater than the length of string s1 or the * substring s2 does not appear in string s1 after index i, the result is -1. - * + * * Parameters: * - 1: Term of sort String (substring s1) * - 2: Term of sort String (substring s2) * - 3: Term of sort Integer (index i) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2667,12 +2667,12 @@ enum CVC4_EXPORT Kind : int32_t * String replace. * Replaces a string s2 in a string s1 with string s3. If s2 does not appear * in s1, s1 is returned unmodified. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort String (string s2) * - 3: Term of sort String (string s3) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2682,12 +2682,12 @@ enum CVC4_EXPORT Kind : int32_t * String replace all. * Replaces all occurrences of a string s2 in a string s1 with string s3. * If s2 does not appear in s1, s1 is returned unmodified. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort String (string s2) * - 3: Term of sort String (string s3) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2698,12 +2698,12 @@ enum CVC4_EXPORT Kind : int32_t * Replaces the first match of a regular expression r in string s1 with * string s2. If r does not match a substring of s1, s1 is returned * unmodified. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort Regexp (regexp r) * - 3: Term of sort String (string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2713,12 +2713,12 @@ enum CVC4_EXPORT Kind : int32_t * String replace all regular expression matches. * Replaces all matches of a regular expression r in string s1 with string * s2. If r does not match a substring of s1, s1 is returned unmodified. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort Regexp (regexp r) * - 3: Term of sort String (string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2726,30 +2726,30 @@ enum CVC4_EXPORT Kind : int32_t STRING_REPLACE_RE_ALL, /** * String to lower case. - * + * * Parameters: * - 1: Term of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ STRING_TOLOWER, /** * String to upper case. - * + * * Parameters: * - 1: Term of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ STRING_TOUPPER, /** * String reverse. - * + * * Parameters: * - 1: Term of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2758,10 +2758,10 @@ enum CVC4_EXPORT Kind : int32_t * String to code. * Returns the code point of a string if it has length one, or returns -1 * otherwise. - * + * * Parameters: * - 1: Term of String sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2771,10 +2771,10 @@ enum CVC4_EXPORT Kind : int32_t * Returns a string containing a single character whose code point matches * the argument to this function, or the empty string if the argument is * out-of-bounds. - * + * * Parameters: * - 1: Term of Integer sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2783,11 +2783,11 @@ enum CVC4_EXPORT Kind : int32_t * String less than. * Returns true if string s1 is (strictly) less than s2 based on a * lexiographic ordering over code points. - * + * * Parameters: * - 1: Term of sort String (the string s1) * - 2: Term of sort String (the string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2797,11 +2797,11 @@ enum CVC4_EXPORT Kind : int32_t * String less than or equal. * Returns true if string s1 is less than or equal to s2 based on a * lexiographic ordering over code points. - * + * * Parameters: * - 1: Term of sort String (the string s1) * - 2: Term of sort String (the string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2811,11 +2811,11 @@ enum CVC4_EXPORT Kind : int32_t * String prefix-of. * Checks whether a string s1 is a prefix of string s2. If string s1 is * empty, this operator returns true. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort String (string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2825,11 +2825,11 @@ enum CVC4_EXPORT Kind : int32_t * String suffix-of. * Checks whether a string s1 is a suffix of string 2. If string s1 is empty, * this operator returns true. - * + * * Parameters: * - 1: Term of sort String (string s1) * - 2: Term of sort String (string s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2838,10 +2838,10 @@ enum CVC4_EXPORT Kind : int32_t /** * String is-digit. * Returns true if string s is digit (it is one of "0", ..., "9"). - * + * * Parameters: * - 1: Term of sort String - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2850,10 +2850,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Integer to string. * If the integer is negative this operator returns the empty string. - * + * * Parameters: * - 1: Term of sort Integer - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -2862,20 +2862,20 @@ enum CVC4_EXPORT Kind : int32_t * String to integer (total function). * If the string does not contain an integer or the integer is negative, the * operator returns -1. - * + * * Parameters: * - 1: Term of sort String - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ STRING_TO_INT, /** * Constant string. - * + * * Parameters: * - See @ref cvc5::api::Solver::mkString() "mkString()". - * + * * Create with: * - `Solver::mkString(const std::string& s, bool useEscSequences) const` * - `Solver::mkString(const unsigned char c) const` @@ -2884,20 +2884,20 @@ enum CVC4_EXPORT Kind : int32_t CONST_STRING, /** * Conversion from string to regexp. - * + * * Parameters: * - 1: Term of sort String - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ STRING_TO_REGEXP, /** * Regexp Concatenation. - * + * * Parameters: * - 1..2: Terms of Regexp sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2905,10 +2905,10 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_CONCAT, /** * Regexp union. - * + * * Parameters: * - 1..2: Terms of Regexp sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2916,10 +2916,10 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_UNION, /** * Regexp intersection. - * + * * Parameters: * - 1..2: Terms of Regexp sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2927,10 +2927,10 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_INTER, /** * Regexp difference. - * + * * Parameters: * - 1..2: Terms of Regexp sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2938,41 +2938,41 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_DIFF, /** * Regexp *. - * + * * Parameters: * - 1: Term of sort Regexp - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ REGEXP_STAR, /** * Regexp +. - * + * * Parameters: * - 1: Term of sort Regexp - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ REGEXP_PLUS, /** * Regexp ?. - * + * * Parameters: * - 1: Term of sort Regexp - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ REGEXP_OPT, /** * Regexp range. - * + * * Parameters: * - 1: Lower bound character for the range * - 2: Upper bound character for the range - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -2980,19 +2980,19 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_RANGE, /** * Operator for regular expression repeat. - * + * * Parameters: * - 1: The number of repetitions - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param) const` * * Apply regular expression loop. - * + * * Parameters: * - 1: Op of kind REGEXP_REPEAT * - 2: Term of regular expression sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -3001,20 +3001,20 @@ enum CVC4_EXPORT Kind : int32_t /** * Operator for regular expression loop, from lower bound to upper bound * number of repetitions. - * + * * Parameters: * - 1: The lower bound * - 2: The upper bound - * + * * Create with: * - `Solver::mkOp(Kind kind, uint32_t param, uint32_t param) const` * * Apply regular expression loop. - * + * * Parameters: * - 1: Op of kind REGEXP_LOOP * - 2: Term of regular expression sort - * + * * Create with: * - `Solver::mkTerm(const Op& op, const Term& child) const` * - `Solver::mkTerm(const Op& op, const std::vector& children) const` @@ -3022,9 +3022,9 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_LOOP, /** * Regexp empty. - * + * * Parameters: none - * + * * Create with: * - `Solver::mkRegexpEmpty() const` * - `Solver::mkTerm(Kind kind) const` @@ -3032,9 +3032,9 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_EMPTY, /** * Regexp all characters. - * + * * Parameters: none - * + * * Create with: * - `Solver::mkRegexpSigma() const` * - `Solver::mkTerm(Kind kind) const` @@ -3042,10 +3042,10 @@ enum CVC4_EXPORT Kind : int32_t REGEXP_SIGMA, /** * Regexp complement. - * + * * Parameters: * - 1: Term of sort RegExp - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1) const` */ @@ -3053,10 +3053,10 @@ enum CVC4_EXPORT Kind : int32_t /** * Sequence concat. - * + * * Parameters: n > 1 * - 1..n: Terms of Sequence sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3065,10 +3065,10 @@ enum CVC4_EXPORT Kind : int32_t SEQ_CONCAT, /** * Sequence length. - * + * * Parameters: * - 1: Term of Sequence sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -3079,12 +3079,12 @@ enum CVC4_EXPORT Kind : int32_t * sequence s. If the start index is negative, the start index is greater * than the length of the sequence, or the length is negative, the result is * the empty sequence. - * + * * Parameters: * - 1: Term of sort Sequence * - 2: Term of sort Integer (index i) * - 3: Term of sort Integer (length l) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3096,12 +3096,12 @@ enum CVC4_EXPORT Kind : int32_t * If the start index is negative, the start index is greater than the * length of the sequence, the result is s. Otherwise, the length of the * original sequence is preserved. - * + * * Parameters: * - 1: Term of sort Sequence * - 2: Term of sort Integer (index i) * - 3: Term of sort Sequence (replacement sequence t) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3112,11 +3112,11 @@ enum CVC4_EXPORT Kind : int32_t * Returns the element at index i from a sequence s. If the index is negative * or the index is greater or equal to the length of the sequence, the result * is the empty sequence. Otherwise the result is a sequence of length 1. - * + * * Parameters: * - 1: Term of sequence sort (string s) * - 2: Term of sort Integer (index i) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3126,11 +3126,11 @@ enum CVC4_EXPORT Kind : int32_t * Sequence contains. * Checks whether a sequence s1 contains another sequence s2. If s2 is empty, * the result is always true. - * + * * Parameters: * - 1: Term of sort Sequence (the sequence s1) * - 2: Term of sort Sequence (the sequence s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3142,12 +3142,12 @@ enum CVC4_EXPORT Kind : int32_t * If the index is negative or greater than the length of sequence s1 or the * subsequence s2 does not appear in sequence s1 after index i, the result is * -1. - * + * * Parameters: * - 1: Term of sort Sequence (subsequence s1) * - 2: Term of sort Sequence (subsequence s2) * - 3: Term of sort Integer (index i) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3157,12 +3157,12 @@ enum CVC4_EXPORT Kind : int32_t * Sequence replace. * Replaces the first occurrence of a sequence s2 in a sequence s1 with * sequence s3. If s2 does not appear in s1, s1 is returned unmodified. - * + * * Parameters: * - 1: Term of sort Sequence (sequence s1) * - 2: Term of sort Sequence (sequence s2) * - 3: Term of sort Sequence (sequence s3) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3172,12 +3172,12 @@ enum CVC4_EXPORT Kind : int32_t * Sequence replace all. * Replaces all occurrences of a sequence s2 in a sequence s1 with sequence * s3. If s2 does not appear in s1, s1 is returned unmodified. - * + * * Parameters: * - 1: Term of sort Sequence (sequence s1) * - 2: Term of sort Sequence (sequence s2) * - 3: Term of sort Sequence (sequence s3) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3185,10 +3185,10 @@ enum CVC4_EXPORT Kind : int32_t SEQ_REPLACE_ALL, /** * Sequence reverse. - * + * * Parameters: * - 1: Term of Sequence sort - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ @@ -3197,11 +3197,11 @@ enum CVC4_EXPORT Kind : int32_t * Sequence prefix-of. * Checks whether a sequence s1 is a prefix of sequence s2. If sequence s1 is * empty, this operator returns true. - * + * * Parameters: * - 1: Term of sort Sequence (sequence s1) * - 2: Term of sort Sequence (sequence s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3211,11 +3211,11 @@ enum CVC4_EXPORT Kind : int32_t * Sequence suffix-of. * Checks whether a sequence s1 is a suffix of sequence s2. If sequence s1 is * empty, this operator returns true. - * + * * Parameters: * - 1: Term of sort Sequence (sequence s1) * - 2: Term of sort Sequence (sequence s2) - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const std::vector& children) const` @@ -3223,17 +3223,17 @@ enum CVC4_EXPORT Kind : int32_t SEQ_SUFFIX, /** * Constant sequence. - * + * * Parameters: * - See @ref cvc5::api::Solver::mkEmptySequence() "mkEmptySequence()". - * + * * Create with: * - `Solver::mkEmptySequence(const Sort& sort) const` - * + * * Note that a constant sequence is a term that is equivalent to: - * + * * (seq.++ (seq.unit c1) ... (seq.unit cn)) - * + * * where n>=0 and c1, ..., cn are constants of some sort. The elements * can be extracted by `Term::getConstSequenceElements()`. */ @@ -3241,21 +3241,21 @@ enum CVC4_EXPORT Kind : int32_t /** * Sequence unit, corresponding to a sequence of length one with the given * term. - * + * * Parameters: * - 1: Element term. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1) const` */ SEQ_UNIT, /** * Sequence nth, corresponding to the nth element of a sequence. - * + * * Parameters: * - 1: Sequence term. * - 2: Integer term. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` */ @@ -3265,12 +3265,12 @@ enum CVC4_EXPORT Kind : int32_t /** * Universally quantified formula. - * + * * Parameters: * - 1: BOUND_VAR_LIST Term * - 2: Quantifier body * - 3: (optional) INST_PATTERN_LIST Term - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3279,12 +3279,12 @@ enum CVC4_EXPORT Kind : int32_t FORALL, /** * Existentially quantified formula. - * + * * Parameters: * - 1: BOUND_VAR_LIST Term * - 2: Quantifier body * - 3: (optional) INST_PATTERN_LIST Term - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3293,10 +3293,10 @@ enum CVC4_EXPORT Kind : int32_t EXISTS, /** * A list of bound variables (used to bind variables under a quantifier) - * + * * Parameters: n > 1 * - 1..n: Terms with kind BOUND_VARIABLE - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3307,10 +3307,10 @@ enum CVC4_EXPORT Kind : int32_t * An instantiation pattern. * Specifies a (list of) terms to be used as a pattern for quantifier * instantiation. - * + * * Parameters: n > 1 * - 1..n: Terms with kind BOUND_VARIABLE - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3321,10 +3321,10 @@ enum CVC4_EXPORT Kind : int32_t * An instantiation no-pattern. * Specifies a (list of) terms that should not be used as a pattern for * quantifier instantiation. - * + * * Parameters: n > 1 * - 1..n: Terms with kind BOUND_VARIABLE - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` @@ -3338,18 +3338,18 @@ enum CVC4_EXPORT Kind : int32_t * * Parameters: * - 1: Term with a user attribute. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child) const` */ INST_ATTRIBUTE, /** * A list of instantiation patterns and/or attributes. - * + * * Parameters: n > 1 * - 1..n: Terms with kind INST_PATTERN, INST_NO_PATTERN, or * INST_ATTRIBUTE. - * + * * Create with: * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const` * - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2, const Term& child3) const` diff --git a/src/api/java/genkinds.py.in b/src/api/java/genkinds.py.in index 51112cc7f..4252354e4 100644 --- a/src/api/java/genkinds.py.in +++ b/src/api/java/genkinds.py.in @@ -13,15 +13,15 @@ ## """ -This script reads CVC4/src/api/cpp/cvc5_kind.h and generates -cvc/Kind.java file which declare all the CVC4 kinds. +This script reads cvc5/src/api/cpp/cvc5_kind.h and generates +cvc/Kind.java file which declare all the cvc5 kinds. """ import argparse import os import sys -# get access to CVC4/src/api/parsekinds.py +# get access to cvc5/src/api/parsekinds.py sys.path.insert(0, os.path.abspath('${CMAKE_SOURCE_DIR}/src/api')) from parsekinds import * diff --git a/src/api/parsekinds.py b/src/api/parsekinds.py index 208fdd712..cb1586995 100644 --- a/src/api/parsekinds.py +++ b/src/api/parsekinds.py @@ -14,7 +14,7 @@ """ This script implements KindsParser which -parses the header file CVC4/src/api/cpp/cvc5_kind.h +parses the header file cvc5/src/api/cpp/cvc5_kind.h The script is aware of the '#if 0' pattern and will ignore kinds declared between '#if 0' and '#endif'. It can also diff --git a/src/api/python/cvc4.pxd b/src/api/python/cvc4.pxd index 8072dbfa7..213372892 100644 --- a/src/api/python/cvc4.pxd +++ b/src/api/python/cvc4.pxd @@ -14,7 +14,7 @@ cdef extern from "" namespace "std": ostream cout -cdef extern from "api/cpp/cvc5.h" namespace "CVC4": +cdef extern from "api/cpp/cvc5.h" namespace "cvc5": cdef cppclass Options: pass diff --git a/src/api/python/genkinds.py.in b/src/api/python/genkinds.py.in index f65ccdc5a..a78372e71 100644 --- a/src/api/python/genkinds.py.in +++ b/src/api/python/genkinds.py.in @@ -13,8 +13,8 @@ ## """ -This script reads CVC4/src/api/cpp/cvc5_kind.h and generates -.pxd and .pxi files which declare all the CVC4 kinds and +This script reads cvc5/src/api/cpp/cvc5_kind.h and generates +.pxd and .pxi files which declare all the cvc5 kinds and implement a Python wrapper for kinds, respectively. The default names are kinds.pxd / kinds.pxi, but the name is configurable from the command line with --kinds-file-prefix. @@ -28,7 +28,7 @@ import argparse import os import sys -# get access to CVC4/src/api/parsekinds.py +# get access to cvc5/src/api/parsekinds.py sys.path.insert(0, os.path.abspath('${CMAKE_SOURCE_DIR}/src/api')) from parsekinds import * diff --git a/src/api/python/setup.py.in b/src/api/python/setup.py.in index c5d21eb88..8919dd3f1 100644 --- a/src/api/python/setup.py.in +++ b/src/api/python/setup.py.in @@ -11,7 +11,7 @@ # directory for licensing information. # ############################################################################# # -# This script is automatically configured with cmake when CVC4 +# This script is automatically configured with cmake when cvc5 # is built with --python-bindings. It is called during make # install to automatically install the python bindings using # distutils. @@ -24,7 +24,7 @@ from distutils.core import setup from distutils.command.clean import clean from distutils.command.install import install -class PyCVC4Install(install): +class PyCVC5Install(install): # Calls the default run command, then deletes the build area # (equivalent to "setup clean --all"). @@ -36,8 +36,8 @@ class PyCVC4Install(install): c.run() setup(name='pycvc4', - version='${CVC5_MAJOR}.${CVC5_MINOR}.${CVC4_RELEASE}', + version='${CVC5_MAJOR}.${CVC5_MINOR}.${CVC5_RELEASE}', packages=['pycvc4'], package_dir={'pycvc4': '${CMAKE_CURRENT_BINARY_DIR}/pycvc4'}, package_data={'pycvc4': ['pycvc4.so']}, - cmdclass={'install': PyCVC4Install}) + cmdclass={'install': PyCVC5Install}) diff --git a/src/base/configuration.cpp b/src/base/configuration.cpp index dc0cc2ffb..c78edbb9b 100644 --- a/src/base/configuration.cpp +++ b/src/base/configuration.cpp @@ -11,7 +11,7 @@ * **************************************************************************** * * Implementation of Configuration class, which provides compile-time - * configuration information about the CVC4 library. + * configuration information about the cvc5 library. */ #include "base/configuration.h" @@ -103,20 +103,20 @@ std::string Configuration::copyright() { << "affiliations listed at http://cvc4.cs.stanford.edu/authors\n\n"; if (Configuration::licenseIsGpl()) { - ss << "This build of CVC4 uses GPLed libraries, and is thus covered by\n" - << "the GNU General Public License (GPL) version 3. Versions of CVC4\n" + ss << "This build of cvc5 uses GPLed libraries, and is thus covered by\n" + << "the GNU General Public License (GPL) version 3. Versions of cvc5\n" << "are available that are covered by the (modified) BSD license. If\n" - << "you want to license CVC4 under this license, please configure CVC4\n" + << "you want to license cvc5 under this license, please configure cvc5\n" << "with the \"--no-gpl\" option before building from sources.\n\n"; } else { - ss << "CVC4 is open-source and is covered by the BSD license (modified)." + ss << "cvc5 is open-source and is covered by the BSD license (modified)." << "\n\n"; } ss << "THIS SOFTWARE IS PROVIDED AS-IS, WITHOUT ANY WARRANTIES.\n" << "USE AT YOUR OWN RISK.\n\n"; - ss << "CVC4 incorporates code from ANTLR3 (http://www.antlr.org).\n" + ss << "cvc5 incorporates code from ANTLR3 (http://www.antlr.org).\n" << "See licenses/antlr3-LICENSE for copyright and licensing information." << "\n\n"; @@ -126,7 +126,7 @@ std::string Configuration::copyright() { || Configuration::isBuiltWithSymFPU() || Configuration::isBuiltWithEditline()) { - ss << "This version of CVC4 is linked against the following non-(L)GPL'ed\n" + ss << "This version of cvc5 is linked against the following non-(L)GPL'ed\n" << "third party libraries.\n\n"; if (Configuration::isBuiltWithAbc()) { ss << " ABC - A System for Sequential Synthesis and Verification\n" @@ -154,7 +154,7 @@ std::string Configuration::copyright() { if (Configuration::isBuiltWithSymFPU()) { ss << " SymFPU - The Symbolic Floating Point Unit\n" - << " See https://github.com/martin-cs/symfpu/tree/CVC4 for copyright " + << " See https://github.com/martin-cs/symfpu/tree/cvc5 for copyright " << "information.\n\n"; } if (Configuration::isBuiltWithEditline()) @@ -167,7 +167,7 @@ std::string Configuration::copyright() { if (Configuration::isBuiltWithGmp() || Configuration::isBuiltWithPoly()) { - ss << "This version of CVC4 is linked against the following third party\n" + ss << "This version of cvc5 is linked against the following third party\n" << "libraries covered by the LGPLv3 license.\n" << "See licenses/lgpl-3.0.txt for more information.\n\n"; if (Configuration::isBuiltWithGmp()) { @@ -182,8 +182,8 @@ std::string Configuration::copyright() { } if (Configuration::isStaticBuild()) { - ss << "CVC4 is statically linked against these libraries. To recompile\n" - "this version of CVC4 with different versions of these libraries\n" + ss << "cvc5 is statically linked against these libraries. To recompile\n" + "this version of cvc5 with different versions of these libraries\n" "follow the instructions on " "https://github.com/CVC4/CVC4/blob/master/INSTALL.md\n\n"; } @@ -191,7 +191,7 @@ std::string Configuration::copyright() { if (Configuration::isBuiltWithCln() || Configuration::isBuiltWithGlpk ()) { - ss << "This version of CVC4 is linked against the following third party\n" + ss << "This version of cvc5 is linked against the following third party\n" << "libraries covered by the GPLv3 license.\n" << "See licenses/gpl-3.0.txt for more information.\n\n"; if (Configuration::isBuiltWithCln()) { @@ -207,14 +207,14 @@ std::string Configuration::copyright() { } ss << "See the file COPYING (distributed with the source code, and with\n" - << "all binaries) for the full CVC4 copyright, licensing, and (lack of)\n" + << "all binaries) for the full cvc5 copyright, licensing, and (lack of)\n" << "warranty information.\n"; return ss.str(); } std::string Configuration::about() { std::stringstream ss; - ss << "This is CVC4 version " << CVC5_RELEASE_STRING; + ss << "This is cvc5 version " << CVC5_RELEASE_STRING; if (Configuration::isGitBuild()) { ss << " [" << Configuration::getGitId() << "]"; } diff --git a/src/base/configuration.h b/src/base/configuration.h index 7b99bd605..5a5109ab2 100644 --- a/src/base/configuration.h +++ b/src/base/configuration.h @@ -11,7 +11,7 @@ * **************************************************************************** * * Interface to a public class that provides compile-time information - * about the CVC4 library. + * about the cvc5 library. */ #include "cvc5_public.h" @@ -26,7 +26,7 @@ namespace cvc5 { /** - * Represents the (static) configuration of CVC4. + * Represents the (static) configuration of cvc5. */ class CVC4_EXPORT Configuration { diff --git a/src/base/modal_exception.h b/src/base/modal_exception.h index 12e8cdb30..d79d420f1 100644 --- a/src/base/modal_exception.h +++ b/src/base/modal_exception.h @@ -11,7 +11,7 @@ * **************************************************************************** * * An exception that is thrown when an interactive-only feature while - * CVC4 is being used in a non-interactive setting (for example, the + * cvc5 is being used in a non-interactive setting (for example, the * "(get-assertions)" command in an SMT-LIBv2 script). */ diff --git a/src/base/output.cpp b/src/base/output.cpp index 9e0e452f2..d894add40 100644 --- a/src/base/output.cpp +++ b/src/base/output.cpp @@ -28,8 +28,8 @@ ostream null_os(&null_sb); NullC nullCvc4Stream; -const std::string CVC4ostream::s_tab = " "; -const int CVC4ostream::s_indentIosIndex = ios_base::xalloc(); +const std::string CVC5ostream::s_tab = " "; +const int CVC5ostream::s_indentIosIndex = ios_base::xalloc(); DebugC DebugChannel(&cout); WarningC WarningChannel(&cerr); diff --git a/src/base/output.h b/src/base/output.h index 9a7fc3f36..9d4b4389f 100644 --- a/src/base/output.h +++ b/src/base/output.h @@ -60,7 +60,7 @@ extern null_streambuf null_sb; /** A null output stream singleton */ extern std::ostream null_os CVC4_EXPORT; -class CVC4_EXPORT CVC4ostream +class CVC4_EXPORT CVC5ostream { static const std::string s_tab; static const int s_indentIosIndex; @@ -74,18 +74,13 @@ class CVC4_EXPORT CVC4ostream std::ostream& (*const d_endl)(std::ostream&); // do not allow use - CVC4ostream& operator=(const CVC4ostream&); + CVC5ostream& operator=(const CVC5ostream&); -public: - CVC4ostream() : - d_os(NULL), - d_firstColumn(false), - d_endl(&std::endl) { - } - explicit CVC4ostream(std::ostream* os) : - d_os(os), - d_firstColumn(true), - d_endl(&std::endl) { + public: + CVC5ostream() : d_os(NULL), d_firstColumn(false), d_endl(&std::endl) {} + explicit CVC5ostream(std::ostream* os) + : d_os(os), d_firstColumn(true), d_endl(&std::endl) + { } void pushIndent() { @@ -102,7 +97,8 @@ public: } } - CVC4ostream& flush() { + CVC5ostream& flush() + { if(d_os != NULL) { d_os->flush(); } @@ -115,10 +111,11 @@ public: std::ostream* getStreamPointer() const { return d_os; } template - CVC4ostream& operator<<(T const& t) CVC4_EXPORT; + CVC5ostream& operator<<(T const& t) CVC4_EXPORT; // support manipulators, endl, etc.. - CVC4ostream& operator<<(std::ostream& (*pf)(std::ostream&)) { + CVC5ostream& operator<<(std::ostream& (*pf)(std::ostream&)) + { if(d_os != NULL) { d_os = &(*d_os << pf); @@ -128,35 +125,41 @@ public: } return *this; } - CVC4ostream& operator<<(std::ios& (*pf)(std::ios&)) { + CVC5ostream& operator<<(std::ios& (*pf)(std::ios&)) + { if(d_os != NULL) { d_os = &(*d_os << pf); } return *this; } - CVC4ostream& operator<<(std::ios_base& (*pf)(std::ios_base&)) { + CVC5ostream& operator<<(std::ios_base& (*pf)(std::ios_base&)) + { if(d_os != NULL) { d_os = &(*d_os << pf); } return *this; } - CVC4ostream& operator<<(CVC4ostream& (*pf)(CVC4ostream&)) { + CVC5ostream& operator<<(CVC5ostream& (*pf)(CVC5ostream&)) + { return pf(*this); } -}; /* class CVC4ostream */ +}; /* class CVC5ostream */ -inline CVC4ostream& push(CVC4ostream& stream) { +inline CVC5ostream& push(CVC5ostream& stream) +{ stream.pushIndent(); return stream; } -inline CVC4ostream& pop(CVC4ostream& stream) { +inline CVC5ostream& pop(CVC5ostream& stream) +{ stream.popIndent(); return stream; } template -CVC4ostream& CVC4ostream::operator<<(T const& t) { +CVC5ostream& CVC5ostream::operator<<(T const& t) +{ if(d_os != NULL) { if(d_firstColumn) { d_firstColumn = false; @@ -179,7 +182,7 @@ class NullC { public: operator bool() const { return false; } - operator CVC4ostream() const { return CVC4ostream(); } + operator CVC5ostream() const { return CVC5ostream(); } operator std::ostream&() const { return null_os; } }; /* class NullC */ @@ -194,12 +197,12 @@ class DebugC public: explicit DebugC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()(const std::string& tag) const + CVC5ostream operator()(const std::string& tag) const { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { - return CVC4ostream(d_os); + return CVC5ostream(d_os); } else { - return CVC4ostream(); + return CVC5ostream(); } } @@ -234,7 +237,7 @@ class WarningC public: explicit WarningC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()() const { return CVC4ostream(d_os); } + CVC5ostream operator()() const { return CVC5ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() const { return *d_os; } @@ -244,7 +247,7 @@ public: // This function supports the WarningOnce() macro, which allows you // to easily indicate that a warning should be emitted, but only - // once for a given run of CVC4. + // once for a given run of cvc5. bool warnOnce(const std::string& file, size_t line) { std::pair pr = std::make_pair(file, line); @@ -268,7 +271,7 @@ class MessageC public: explicit MessageC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()() const { return CVC4ostream(d_os); } + CVC5ostream operator()() const { return CVC5ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() const { return *d_os; } @@ -285,7 +288,7 @@ class NoticeC public: explicit NoticeC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()() const { return CVC4ostream(d_os); } + CVC5ostream operator()() const { return CVC5ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() const { return *d_os; } @@ -302,7 +305,7 @@ class ChatC public: explicit ChatC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()() const { return CVC4ostream(d_os); } + CVC5ostream operator()() const { return CVC5ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() const { return *d_os; } @@ -320,12 +323,12 @@ class TraceC public: explicit TraceC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()(std::string tag) const + CVC5ostream operator()(std::string tag) const { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { - return CVC4ostream(d_os); + return CVC5ostream(d_os); } else { - return CVC4ostream(); + return CVC5ostream(); } } @@ -367,11 +370,12 @@ public: explicit DumpOutC(std::ostream* os) : d_os(os) {} - CVC4ostream operator()(std::string tag) { + CVC5ostream operator()(std::string tag) + { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { - return CVC4ostream(d_os); + return CVC5ostream(d_os); } else { - return CVC4ostream(); + return CVC5ostream(); } } @@ -417,7 +421,7 @@ extern DumpOutC DumpOutChannel CVC4_EXPORT; ::cvc5::__cvc4_true() ? ::cvc5::nullCvc4Stream : ::cvc5::WarningChannel #define WarningOnce \ ::cvc5::__cvc4_true() ? ::cvc5::nullCvc4Stream : ::cvc5::WarningChannel -#define CVC4Message \ +#define CVC5Message \ ::cvc5::__cvc4_true() ? ::cvc5::nullCvc4Stream : ::cvc5::MessageChannel #define Notice \ ::cvc5::__cvc4_true() ? ::cvc5::nullCvc4Stream : ::cvc5::NoticeChannel @@ -444,7 +448,7 @@ extern DumpOutC DumpOutChannel CVC4_EXPORT; || !::cvc5::WarningChannel.warnOnce(__FILE__, __LINE__)) \ ? ::cvc5::nullCvc4Stream \ : ::cvc5::WarningChannel -#define CVC4Message \ +#define CVC5Message \ (!::cvc5::MessageChannel.isOn()) ? ::cvc5::nullCvc4Stream \ : ::cvc5::MessageChannel #define Notice \ @@ -565,17 +569,21 @@ class ScopedTrace */ class IndentedScope { - CVC4ostream d_out; -public: - inline IndentedScope(CVC4ostream out); + CVC5ostream d_out; + + public: + inline IndentedScope(CVC5ostream out); inline ~IndentedScope(); }; /* class IndentedScope */ #if defined(CVC5_DEBUG) && defined(CVC5_TRACING) -inline IndentedScope::IndentedScope(CVC4ostream out) : d_out(out) { d_out << push; } +inline IndentedScope::IndentedScope(CVC5ostream out) : d_out(out) +{ + d_out << push; +} inline IndentedScope::~IndentedScope() { d_out << pop; } #else /* CVC5_DEBUG && CVC5_TRACING */ -inline IndentedScope::IndentedScope(CVC4ostream out) {} +inline IndentedScope::IndentedScope(CVC5ostream out) {} inline IndentedScope::~IndentedScope() {} #endif /* CVC5_DEBUG && CVC5_TRACING */ diff --git a/src/expr/attribute.cpp b/src/expr/attribute.cpp index 1cb8adad6..ce617079e 100644 --- a/src/expr/attribute.cpp +++ b/src/expr/attribute.cpp @@ -36,7 +36,7 @@ bool AttributeManager::inGarbageCollection() const { void AttributeManager::debugHook(int debugFlag) { /* DO NOT CHECK IN ANY CODE INTO THE DEBUG HOOKS! * debugHook() is an empty function for the purpose of debugging - * the AttributeManager without recompiling all of CVC4. + * the AttributeManager without recompiling all of cvc5. * Formally this is a nop. */ } diff --git a/src/expr/attribute.h b/src/expr/attribute.h index e42338bbb..b58cd45a9 100644 --- a/src/expr/attribute.h +++ b/src/expr/attribute.h @@ -211,7 +211,7 @@ public: /** * debugHook() is an empty function for the purpose of debugging - * the AttributeManager without recompiling all of CVC4. + * the AttributeManager without recompiling all of cvc5. * Formally this is a nop. */ void debugHook(int debugFlag); diff --git a/src/expr/dtype.cpp b/src/expr/dtype.cpp index 66331f5c7..07b8aa5f1 100644 --- a/src/expr/dtype.cpp +++ b/src/expr/dtype.cpp @@ -895,8 +895,8 @@ const std::vector >& DType::getConstructors() std::ostream& operator<<(std::ostream& os, const DType& dt) { - // can only output datatypes in the CVC4 native language - language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); + // can only output datatypes in the cvc5 native language + language::SetLanguage::Scope ls(os, language::output::LANG_CVC); dt.toStream(os); return os; } diff --git a/src/expr/dtype.h b/src/expr/dtype.h index da16729cc..6fd334e02 100644 --- a/src/expr/dtype.h +++ b/src/expr/dtype.h @@ -90,7 +90,7 @@ class DTypeConstructor; * allow the datatype to construct the necessary testers and selectors. * * An additional point to make is that we want to ease the burden on - * both the parser AND the users of the CVC4 API, so this class takes + * both the parser AND the users of the cvc5 API, so this class takes * on the task of generating its own selectors and testers, for * instance. That means that, after reifying the DType with the * NodeManager, the parser needs to go through the (now-resolved) diff --git a/src/expr/dtype_cons.cpp b/src/expr/dtype_cons.cpp index 8d6194b06..99e5ad8ac 100644 --- a/src/expr/dtype_cons.cpp +++ b/src/expr/dtype_cons.cpp @@ -678,8 +678,8 @@ void DTypeConstructor::toStream(std::ostream& out) const std::ostream& operator<<(std::ostream& os, const DTypeConstructor& ctor) { - // can only output datatypes in the CVC4 native language - language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); + // can only output datatypes in the cvc5 native language + language::SetLanguage::Scope ls(os, language::output::LANG_CVC); ctor.toStream(os); return os; } diff --git a/src/expr/dtype_selector.cpp b/src/expr/dtype_selector.cpp index d6a3923df..98a07b2c9 100644 --- a/src/expr/dtype_selector.cpp +++ b/src/expr/dtype_selector.cpp @@ -78,8 +78,8 @@ void DTypeSelector::toStream(std::ostream& out) const std::ostream& operator<<(std::ostream& os, const DTypeSelector& arg) { - // can only output datatypes in the CVC4 native language - language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); + // can only output datatypes in the cvc5 native language + language::SetLanguage::Scope ls(os, language::output::LANG_CVC); arg.toStream(os); return os; } diff --git a/src/expr/kind_template.h b/src/expr/kind_template.h index 5fa1d99ff..6e2362e84 100644 --- a/src/expr/kind_template.h +++ b/src/expr/kind_template.h @@ -36,7 +36,7 @@ enum Kind_t } // namespace kind -// import Kind into the "CVC4" namespace but keep the individual kind +// import Kind into the "cvc5" namespace but keep the individual kind // constants under kind:: typedef ::cvc5::kind::Kind_t Kind; diff --git a/src/expr/metakind_template.h b/src/expr/metakind_template.h index 0747b97fa..1271c2e64 100644 --- a/src/expr/metakind_template.h +++ b/src/expr/metakind_template.h @@ -33,7 +33,7 @@ namespace kind { namespace metakind { /** - * Static, compile-time information about types T representing CVC4 + * Static, compile-time information about types T representing cvc5 * constants: * * typename ConstantMap::OwningTheory @@ -51,7 +51,7 @@ struct ConstantMap; /** * Static, compile-time information about kinds k and what type their - * corresponding CVC4 constants are: + * corresponding cvc5 constants are: * * typename ConstantMapReverse::T * diff --git a/src/expr/mkexpr b/src/expr/mkexpr index 0be51c71c..64a99d406 100755 --- a/src/expr/mkexpr +++ b/src/expr/mkexpr @@ -1,8 +1,8 @@ #!/usr/bin/env bash # # mkexpr -# Morgan Deters for CVC4 -# Copyright (c) 2010-2013 The CVC4 Project +# Morgan Deters for cvc5 +# Copyright (c) 2010-2013 The cvc5 Project # # The purpose of this script is to create {expr,expr_manager}.{h,cpp} # from template files and a list of theory kinds. Basically it just diff --git a/src/expr/mkkind b/src/expr/mkkind index 53e63af6e..117b3bb9e 100755 --- a/src/expr/mkkind +++ b/src/expr/mkkind @@ -1,8 +1,8 @@ #!/usr/bin/env bash # # mkkind -# Morgan Deters for CVC4 -# Copyright (c) 2010-2013 The CVC4 Project +# Morgan Deters for cvc5 +# Copyright (c) 2010-2013 The cvc5 Project # # The purpose of this script is to create kind.h (and also # type_properties.h) from a template and a list of theory kinds. diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind index 52fe070e6..a5801b9fe 100755 --- a/src/expr/mkmetakind +++ b/src/expr/mkmetakind @@ -1,8 +1,8 @@ #!/usr/bin/env bash # # mkmetakind -# Morgan Deters for CVC4 -# Copyright (c) 2010-2013 The CVC4 Project +# Morgan Deters for cvc5 +# Copyright (c) 2010-2013 The cvc5 Project # # The purpose of this script is to create metakind.h from a template # and a list of theory kinds. diff --git a/src/expr/node.h b/src/expr/node.h index 181fc2e52..9014016b9 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -124,7 +124,7 @@ typedef NodeTemplate Node; * creation. If this is returned as a TNode rather than a Node, the * count drops to zero, marking the expression as eligible for reclamation.) * - * More guidelines on when to use TNodes is available in the CVC4 + * More guidelines on when to use TNodes is available in the cvc5 * Developer's Guide: * http://cvc4.cs.stanford.edu/wiki/Developer%27s_Guide#Dealing_with_expressions_.28Nodes_and_TNodes.29 */ @@ -395,7 +395,7 @@ public: * these functions, as they may only be needed in CNF conversion, * where it's pointless to do a lazy isAtomic determination by * searching through the DAG, and storing it, since the result will - * only be used once. For more details see the 4/27/2010 CVC4 + * only be used once. For more details see the 4/27/2010 cvc5 * developer's meeting notes at: * * http://cvc4.cs.stanford.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29 diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index 5ca6823d9..528cdcfc7 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -344,7 +344,7 @@ class NodeManager * these functions, as they may only be needed in CNF conversion, * where it's pointless to do a lazy isAtomic determination by * searching through the DAG, and storing it, since the result will - * only be used once. For more details see the 4/27/2010 CVC4 + * only be used once. For more details see the 4/27/2010 cvc5 * developer's meeting notes at: * * http://cvc4.cs.stanford.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29 @@ -364,7 +364,7 @@ class NodeManager * lookup is done on the name. If you mkVar("a", type) and then * mkVar("a", type) again, you have two variables. The NodeManager * version of this is private to avoid internal uses of mkVar() from - * within CVC4. Such uses should employ SkolemManager::mkSkolem() instead. + * within cvc5. Such uses should employ SkolemManager::mkSkolem() instead. */ Node mkVar(const std::string& name, const TypeNode& type); Node* mkVarPtr(const std::string& name, const TypeNode& type); @@ -390,7 +390,7 @@ class NodeManager explicit NodeManager(); ~NodeManager(); - /** The node manager in the current public-facing CVC4 library context */ + /** The node manager in the current public-facing cvc5 library context */ static NodeManager* currentNM() { return s_current; } /** Get this node manager's skolem manager */ SkolemManager* getSkolemManager() { return d_skManager.get(); } @@ -1093,7 +1093,7 @@ class NodeManager * previous thread-global NodeManager when it is * destroyed, effectively maintaining a set of nested * NodeManager scopes. This is especially useful on - * public-interface calls into the CVC4 library, where CVC4's notion + * public-interface calls into the cvc5 library, where cvc5's notion * of the "current" NodeManager should be set to match * the calling context. See, for example, the implementations of * public calls in the SmtEngine class. diff --git a/src/expr/node_value.h b/src/expr/node_value.h index 3aa927bdb..c45fadb5c 100644 --- a/src/expr/node_value.h +++ b/src/expr/node_value.h @@ -426,7 +426,7 @@ inline void NodeValue::inc() { ++d_rc; Assert(NodeManager::currentNM() != NULL) << "No current NodeManager on incrementing of NodeValue: " - "maybe a public CVC4 interface function is missing a " + "maybe a public cvc5 interface function is missing a " "NodeManagerScope ?"; NodeManager::currentNM()->markRefCountMaxedOut(this); } @@ -439,7 +439,7 @@ inline void NodeValue::dec() { if(__builtin_expect( ( d_rc == 0 ), false )) { Assert(NodeManager::currentNM() != NULL) << "No current NodeManager on destruction of NodeValue: " - "maybe a public CVC4 interface function is missing a " + "maybe a public cvc5 interface function is missing a " "NodeManagerScope ?"; NodeManager::currentNM()->markForDeletion(this); } diff --git a/src/expr/proof_node.h b/src/expr/proof_node.h index 08d2a0245..f8d71f703 100644 --- a/src/expr/proof_node.h +++ b/src/expr/proof_node.h @@ -80,8 +80,8 @@ struct ProofNodeHashFunction * An external proof checker is expected to formalize the ProofNode only in * terms of *witness* forms. * - * However, the rest of CVC4 sees only the *Skolem* form of arguments and - * conclusions in ProofNode, since this is what is used throughout CVC4. + * However, the rest of cvc5 sees only the *Skolem* form of arguments and + * conclusions in ProofNode, since this is what is used throughout cvc5. */ class ProofNode { diff --git a/src/expr/sequence.h b/src/expr/sequence.h index 40cadb858..8bf7abeea 100644 --- a/src/expr/sequence.h +++ b/src/expr/sequence.h @@ -28,7 +28,7 @@ class NodeTemplate; typedef NodeTemplate Node; class TypeNode; -/** The CVC4 sequence class +/** The cvc5 sequence class * * This data structure is the domain of values for the sequence type. */ diff --git a/src/expr/type_node.h b/src/expr/type_node.h index d1b5edf22..318d59613 100644 --- a/src/expr/type_node.h +++ b/src/expr/type_node.h @@ -420,7 +420,7 @@ public: /** is closed enumerable type * * This returns true if this type has an enumerator that produces constants - * that are fully handled by CVC4's quantifier-free theory solvers. Examples + * that are fully handled by cvc5's quantifier-free theory solvers. Examples * of types that are not closed enumerable are: * (1) uninterpreted sorts, * (2) arrays, diff --git a/src/include/cvc5_private.h b/src/include/cvc5_private.h index 1c328ef60..6377997ef 100644 --- a/src/include/cvc5_private.h +++ b/src/include/cvc5_private.h @@ -18,8 +18,8 @@ #define CVC5_PRIVATE_H #if !(defined(__BUILDING_CVC4LIB) || defined(__BUILDING_CVC4LIB_UNIT_TEST)) -# error A private CVC4 header was included when not building the library or private unit test code. -#endif /* ! (__BUILDING_CVC4LIB || __BUILDING_CVC4LIB_UNIT_TEST) */ +# error A private cvc5 header was included when not building the library or private unit test code. +#endif #include "cvc4autoconfig.h" #include "cvc5_public.h" diff --git a/src/include/cvc5_private_library.h b/src/include/cvc5_private_library.h index 95c928fb5..36b2bbd04 100644 --- a/src/include/cvc5_private_library.h +++ b/src/include/cvc5_private_library.h @@ -21,10 +21,8 @@ || defined(__BUILDING_CVC4PARSERLIB) \ || defined(__BUILDING_CVC4PARSERLIB_UNIT_TEST) \ || defined(__BUILDING_CVC4DRIVER)) -# error A "private library" CVC4 header was included when not building the library, driver, or private unit test code. -#endif /* ! (__BUILDING_CVC4LIB || __BUILDING_CVC4LIB_UNIT_TEST || \ - __BUILDING_CVC4PARSERLIB || __BUILDING_CVC4PARSERLIB_UNIT_TEST || \ - __BUILDING_CVC4DRIVER) */ +# error A "private library" cvc5 header was included when not building the library, driver, or private unit test code. +#endif #include "cvc4autoconfig.h" #include "cvc5_public.h" diff --git a/src/include/cvc5parser_private.h b/src/include/cvc5parser_private.h index aec3a09a5..8f6142cbb 100644 --- a/src/include/cvc5parser_private.h +++ b/src/include/cvc5parser_private.h @@ -14,14 +14,13 @@ * when the file is included improperly. */ -#ifndef __CVC4PARSER_PRIVATE_H -#define __CVC4PARSER_PRIVATE_H +#ifndef CVC5PARSER_PRIVATE_H +#define CVC5PARSER_PRIVATE_H #if !(defined(__BUILDING_CVC4PARSERLIB) \ || defined(__BUILDING_CVC4PARSERLIB_UNIT_TEST)) -# error A private CVC4 parser header was included when not building the parser library or private unit test code. -#endif /* ! (__BUILDING_CVC4PARSERLIB || __BUILDING_CVC4PARSERLIB_UNIT_TEST) \ - */ +# error A private cvc5 parser header was included when not building the parser library or private unit test code. +#endif #include "cvc5parser_public.h" // It would be nice to #include "cvc4autoconfig.h" here, but there are conflicts @@ -29,4 +28,4 @@ // // #include "cvc4autoconfig.h" -#endif /* __CVC4PARSER_PRIVATE_H */ +#endif /* CVC5PARSER_PRIVATE_H */ diff --git a/src/include/cvc5parser_public.h b/src/include/cvc5parser_public.h index 099eb58c2..71bd4981a 100644 --- a/src/include/cvc5parser_public.h +++ b/src/include/cvc5parser_public.h @@ -14,9 +14,9 @@ * libraries and driver binary, and also exported to the user. */ -#ifndef __CVC4PARSER_PUBLIC_H -#define __CVC4PARSER_PUBLIC_H +#ifndef CVC5PARSER_PUBLIC_H +#define CVC5PARSER_PUBLIC_H #include "cvc5_public.h" -#endif /* __CVC4PARSER_PUBLIC_H */ +#endif /* CVC5PARSER_PUBLIC_H */ diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index c5d89300c..2481eda10 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Driver for CVC4 executable (cvc4). + * Driver for cvc5 executable (cvc4). */ #include @@ -78,11 +78,12 @@ TotalTimer::~TotalTimer() void printUsage(Options& opts, bool full) { stringstream ss; - ss << "usage: " << opts.getBinaryName() << " [options] [input-file]" - << endl << endl - << "Without an input file, or with `-', CVC4 reads from standard input." - << endl << endl - << "CVC4 options:" << endl; + ss << "usage: " << opts.getBinaryName() << " [options] [input-file]" << endl + << endl + << "Without an input file, or with `-', cvc5 reads from standard input." + << endl + << endl + << "cvc5 options:" << endl; if(full) { Options::printUsage( ss.str(), *(opts.getOut()) ); } else { @@ -151,7 +152,7 @@ int runCvc4(int argc, char* argv[], Options& opts) { if(opts.getInputLanguage() == language::input::LANG_AUTO) { if( inputFromStdin ) { // We can't do any fancy detection on stdin - opts.setInputLanguage(language::input::LANG_CVC4); + opts.setInputLanguage(language::input::LANG_CVC); } else { unsigned len = filenameStr.size(); if(len >= 5 && !strcmp(".smt2", filename + len - 5)) { @@ -161,7 +162,7 @@ int runCvc4(int argc, char* argv[], Options& opts) { opts.setInputLanguage(language::input::LANG_TPTP); } else if(( len >= 4 && !strcmp(".cvc", filename + len - 4) ) || ( len >= 5 && !strcmp(".cvc4", filename + len - 5) )) { - opts.setInputLanguage(language::input::LANG_CVC4); + opts.setInputLanguage(language::input::LANG_CVC); } else if((len >= 3 && !strcmp(".sy", filename + len - 3)) || (len >= 3 && !strcmp(".sl", filename + len - 3))) { // version 2 sygus is the default @@ -211,17 +212,17 @@ int runCvc4(int argc, char* argv[], Options& opts) { InteractiveShell shell(pExecutor->getSolver(), pExecutor->getSymbolManager()); if(opts.getInteractivePrompt()) { - CVC4Message() << Configuration::getPackageName() << " " + CVC5Message() << Configuration::getPackageName() << " " << Configuration::getVersionString(); if(Configuration::isGitBuild()) { - CVC4Message() << " [" << Configuration::getGitId() << "]"; + CVC5Message() << " [" << Configuration::getGitId() << "]"; } - CVC4Message() << (Configuration::isDebugBuild() ? " DEBUG" : "") + CVC5Message() << (Configuration::isDebugBuild() ? " DEBUG" : "") << " assertions:" << (Configuration::isAssertionBuild() ? "on" : "off") << endl << endl; - CVC4Message() << Configuration::copyright() << endl; + CVC5Message() << Configuration::copyright() << endl; } while(true) { diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index 904cba276..127b2c14d 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -101,7 +101,7 @@ InteractiveShell::InteractiveShell(api::Solver* solver, SymbolManager* sm) #if HAVE_LIBEDITLINE if(&d_in == &cin) { - ::rl_readline_name = const_cast("CVC4"); + ::rl_readline_name = const_cast("cvc5"); #if EDITLINE_COMPENTRY_FUNC_RETURNS_CHARP ::rl_completion_entry_function = commandGenerator; #else /* EDITLINE_COMPENTRY_FUNC_RETURNS_CHARP */ @@ -111,30 +111,32 @@ InteractiveShell::InteractiveShell(api::Solver* solver, SymbolManager* sm) OutputLanguage lang = toOutputLanguage(d_options.getInputLanguage()); switch(lang) { - case output::LANG_CVC4: - d_historyFilename = string(getenv("HOME")) + "/.cvc4_history"; - commandsBegin = cvc_commands; - commandsEnd = cvc_commands + sizeof(cvc_commands) / sizeof(*cvc_commands); - break; - case output::LANG_TPTP: - d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_tptp"; - commandsBegin = tptp_commands; - commandsEnd = tptp_commands + sizeof(tptp_commands) / sizeof(*tptp_commands); - break; - default: - if (language::isOutputLang_smt2(lang)) - { - d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_smtlib2"; - commandsBegin = smt2_commands; + case output::LANG_CVC: + d_historyFilename = string(getenv("HOME")) + "/.cvc4_history"; + commandsBegin = cvc_commands; commandsEnd = - smt2_commands + sizeof(smt2_commands) / sizeof(*smt2_commands); - } - else - { - std::stringstream ss; - ss << "internal error: unhandled language " << lang; - throw Exception(ss.str()); - } + cvc_commands + sizeof(cvc_commands) / sizeof(*cvc_commands); + break; + case output::LANG_TPTP: + d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_tptp"; + commandsBegin = tptp_commands; + commandsEnd = + tptp_commands + sizeof(tptp_commands) / sizeof(*tptp_commands); + break; + default: + if (language::isOutputLang_smt2(lang)) + { + d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_smtlib2"; + commandsBegin = smt2_commands; + commandsEnd = + smt2_commands + sizeof(smt2_commands) / sizeof(*smt2_commands); + } + else + { + std::stringstream ss; + ss << "internal error: unhandled language " << lang; + throw Exception(ss.str()); + } } d_usingEditline = true; int err = ::read_history(d_historyFilename.c_str()); @@ -194,7 +196,8 @@ restart: { #if HAVE_LIBEDITLINE lineBuf = ::readline(d_options.getInteractivePrompt() - ? (line == "" ? "CVC4> " : "... > ") : ""); + ? (line == "" ? "cvc5> " : "... > ") + : ""); if(lineBuf != NULL && lineBuf[0] != '\0') { ::add_history(lineBuf); } @@ -206,7 +209,7 @@ restart: { if(d_options.getInteractivePrompt()) { if(line == "") { - d_out << "CVC4> " << flush; + d_out << "cvc5> " << flush; } else { d_out << "... > " << flush; } @@ -367,7 +370,7 @@ restart: // because the parse error might be for the second command on the // line. The first ones haven't yet been executed by the SmtEngine, // but the parser state has already made the variables and the mappings - // in the symbol table. So unfortunately, either we exit CVC4 entirely, + // in the symbol table. So unfortunately, either we exit cvc5 entirely, // or we commit to the current line up to the command with the parse // error. // diff --git a/src/main/main.cpp b/src/main/main.cpp index 8532f9504..a4e70be89 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -38,7 +38,7 @@ using namespace cvc5::main; using namespace cvc5::language; /** - * CVC4's main() routine is just an exception-safe wrapper around CVC4. + * cvc5's main() routine is just an exception-safe wrapper around cvc5. * Please don't construct anything here. Even if the constructor is * inside the try { }, an exception during destruction can cause * problems. That's why main() wraps runCvc4() in the first place. diff --git a/src/main/signal_handlers.cpp b/src/main/signal_handlers.cpp index 1be6a7f35..9a6e34075 100644 --- a/src/main/signal_handlers.cpp +++ b/src/main/signal_handlers.cpp @@ -65,7 +65,7 @@ void print_statistics() void timeout_handler() { - safe_print(STDERR_FILENO, "CVC4 interrupted by timeout.\n"); + safe_print(STDERR_FILENO, "cvc5 interrupted by timeout.\n"); print_statistics(); abort(); } @@ -83,7 +83,7 @@ void timeout_handler(int sig, siginfo_t* info, void*) { timeout_handler(); } /** Handler for SIGTERM. */ void sigterm_handler(int sig, siginfo_t* info, void*) { - safe_print(STDERR_FILENO, "CVC4 interrupted by SIGTERM.\n"); + safe_print(STDERR_FILENO, "cvc5 interrupted by SIGTERM.\n"); print_statistics(); abort(); } @@ -91,7 +91,7 @@ void sigterm_handler(int sig, siginfo_t* info, void*) /** Handler for SIGINT, i.e., when the user hits control C. */ void sigint_handler(int sig, siginfo_t* info, void*) { - safe_print(STDERR_FILENO, "CVC4 interrupted by user.\n"); + safe_print(STDERR_FILENO, "cvc5 interrupted by user.\n"); print_statistics(); abort(); } @@ -103,7 +103,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) uintptr_t extent = reinterpret_cast(cvc4StackBase) - cvc4StackSize; uintptr_t addr = reinterpret_cast(info->si_addr); #ifdef CVC5_DEBUG - safe_print(STDERR_FILENO, "CVC4 suffered a segfault in DEBUG mode.\n"); + safe_print(STDERR_FILENO, "cvc5 suffered a segfault in DEBUG mode.\n"); safe_print(STDERR_FILENO, "Offending address is "); safe_print(STDERR_FILENO, info->si_addr); safe_print(STDERR_FILENO, "\n"); @@ -148,7 +148,7 @@ void segv_handler(int sig, siginfo_t* info, void* c) } } #else /* CVC5_DEBUG */ - safe_print(STDERR_FILENO, "CVC4 suffered a segfault.\n"); + safe_print(STDERR_FILENO, "cvc5 suffered a segfault.\n"); safe_print(STDERR_FILENO, "Offending address is "); safe_print(STDERR_FILENO, info->si_addr); safe_print(STDERR_FILENO, "\n"); @@ -175,7 +175,7 @@ void ill_handler(int sig, siginfo_t* info, void*) { #ifdef CVC5_DEBUG safe_print(STDERR_FILENO, - "CVC4 executed an illegal instruction in DEBUG mode.\n"); + "cvc5 executed an illegal instruction in DEBUG mode.\n"); if (!segvSpin) { print_statistics(); @@ -201,7 +201,7 @@ void ill_handler(int sig, siginfo_t* info, void*) } } #else /* CVC5_DEBUG */ - safe_print(STDERR_FILENO, "CVC4 executed an illegal instruction.\n"); + safe_print(STDERR_FILENO, "cvc5 executed an illegal instruction.\n"); print_statistics(); abort(); #endif /* CVC5_DEBUG */ @@ -221,14 +221,14 @@ void cvc4terminate() safe_print(STDERR_FILENO, "\n" - "CVC4 was terminated by the C++ runtime.\n" + "cvc5 was terminated by the C++ runtime.\n" "Perhaps an exception was thrown during stack unwinding. " "(Don't do that.)\n"); print_statistics(); default_terminator(); #else /* CVC5_DEBUG */ safe_print(STDERR_FILENO, - "CVC4 was terminated by the C++ runtime.\n" + "cvc5 was terminated by the C++ runtime.\n" "Perhaps an exception was thrown during stack unwinding.\n"); print_statistics(); default_terminator(); diff --git a/src/options/base_options.toml b/src/options/base_options.toml index 4ebb71b76..75e33e551 100644 --- a/src/options/base_options.toml +++ b/src/options/base_options.toml @@ -63,7 +63,7 @@ header = "options/base_options.h" type = "int" default = "0" predicates = ["setVerbosity"] - help = "the verbosity level of CVC4" + help = "the verbosity level of cvc5" [[option]] category = "common" diff --git a/src/options/didyoumean.cpp b/src/options/didyoumean.cpp index 49e3a2270..998317bd9 100644 --- a/src/options/didyoumean.cpp +++ b/src/options/didyoumean.cpp @@ -15,7 +15,7 @@ * ``What do you mean? I don't understand.'' An attempt to be more * helpful than that. Similar to one in git. * - * There are no dependencies on CVC4 (except namespace). + * There are no dependencies on cvc5 (except namespace). */ #include "options/didyoumean.h" diff --git a/src/options/didyoumean.h b/src/options/didyoumean.h index ad3c08d24..a2456ac77 100644 --- a/src/options/didyoumean.h +++ b/src/options/didyoumean.h @@ -15,7 +15,7 @@ * ``What do you mean? I don't understand.'' An attempt to be more * helpful than that. Similar to one in git. * - * There are no dependencies on CVC4 (except namespace). + * There are no dependencies on cvc5 (except namespace). */ #pragma once diff --git a/src/options/didyoumean_test.cpp b/src/options/didyoumean_test.cpp index 57d932b61..b9528b93c 100644 --- a/src/options/didyoumean_test.cpp +++ b/src/options/didyoumean_test.cpp @@ -16,7 +16,7 @@ * \todo document this file */ -// This is not built as a part of CVC4 and is not built by Makefile.am. +// This is not built as a part of cvc5 and is not built by Makefile.am. // Compile: g++ didyoumean_test.cpp didyoumean.cpp // For debug compile with -DDIDYOUMEAN_DEBUG or -DDIDYOUMEAN_DEBUG1 or both diff --git a/src/options/language.cpp b/src/options/language.cpp index 8261271fb..13384164a 100644 --- a/src/options/language.cpp +++ b/src/options/language.cpp @@ -73,7 +73,7 @@ InputLanguage toInputLanguage(OutputLanguage language) { switch(language) { case output::LANG_SMTLIB_V2_6: case output::LANG_TPTP: - case output::LANG_CVC4: + case output::LANG_CVC: case output::LANG_SYGUS_V2: // these entries directly correspond (by design) return InputLanguage(int(language)); @@ -91,7 +91,7 @@ OutputLanguage toOutputLanguage(InputLanguage language) { switch(language) { case input::LANG_SMTLIB_V2_6: case input::LANG_TPTP: - case input::LANG_CVC4: + case input::LANG_CVC: case input::LANG_SYGUS_V2: // these entries directly correspond (by design) return OutputLanguage(int(language)); @@ -104,7 +104,7 @@ OutputLanguage toOutputLanguage(InputLanguage language) { // it's better to output SOMETHING related to the original // exception rather than mask it with another exception. Also, // the input language isn't always defined---e.g. during the - // initial phase of the main CVC4 driver while it determines which + // initial phase of the main cvc5 driver while it determines which // language is appropriate, and during unit tests. Also, when // users are writing their own code against the library. return output::LANG_AST; @@ -112,11 +112,13 @@ OutputLanguage toOutputLanguage(InputLanguage language) { }/* toOutputLanguage() */ OutputLanguage toOutputLanguage(std::string language) { - if(language == "cvc4" || language == "pl" || - language == "presentation" || language == "native" || - language == "LANG_CVC4") { - return output::LANG_CVC4; - } else if(language == "cvc3" || language == "LANG_CVC3") { + if (language == "cvc4" || language == "pl" || language == "presentation" + || language == "native" || language == "LANG_CVC") + { + return output::LANG_CVC; + } + else if (language == "cvc3" || language == "LANG_CVC3") + { return output::LANG_CVC3; } else if (language == "smtlib" || language == "smt" || language == "smtlib2" @@ -146,19 +148,25 @@ OutputLanguage toOutputLanguage(std::string language) { }/* toOutputLanguage() */ InputLanguage toInputLanguage(std::string language) { - if(language == "cvc4" || language == "pl" || - language == "presentation" || language == "native" || - language == "LANG_CVC4") { - return input::LANG_CVC4; - } else if(language == "smtlib" || language == "smt" || - language == "smtlib2" || language == "smt2" || - language == "smtlib2.6" || language == "smt2.6" || - language == "LANG_SMTLIB_V2_6" || language == "LANG_SMTLIB_V2") { + if (language == "cvc4" || language == "pl" || language == "presentation" + || language == "native" || language == "LANG_CVC") + { + return input::LANG_CVC; + } + else if (language == "smtlib" || language == "smt" || language == "smtlib2" + || language == "smt2" || language == "smtlib2.6" + || language == "smt2.6" || language == "LANG_SMTLIB_V2_6" + || language == "LANG_SMTLIB_V2") + { return input::LANG_SMTLIB_V2_6; - } else if(language == "tptp" || language == "LANG_TPTP") { + } + else if (language == "tptp" || language == "LANG_TPTP") + { return input::LANG_TPTP; - } else if(language == "sygus" || language == "sygus2" || - language == "LANG_SYGUS" || language == "LANG_SYGUS_V2") { + } + else if (language == "sygus" || language == "sygus2" + || language == "LANG_SYGUS" || language == "LANG_SYGUS_V2") + { return input::LANG_SYGUS_V2; } else if (language == "auto" || language == "LANG_AUTO") diff --git a/src/options/language.h b/src/options/language.h index 2858f544a..413ef59ed 100644 --- a/src/options/language.h +++ b/src/options/language.h @@ -48,8 +48,8 @@ enum CVC4_EXPORT Language LANG_SMTLIB_V2 = LANG_SMTLIB_V2_6, /** The TPTP input language */ LANG_TPTP, - /** The CVC4 input language */ - LANG_CVC4, + /** The cvc5 input language */ + LANG_CVC, /** The SyGuS input language version 2.0 */ LANG_SYGUS_V2, @@ -72,9 +72,7 @@ inline std::ostream& operator<<(std::ostream& out, Language lang) { case LANG_TPTP: out << "LANG_TPTP"; break; - case LANG_CVC4: - out << "LANG_CVC4"; - break; + case LANG_CVC: out << "LANG_CVC"; break; case LANG_SYGUS_V2: out << "LANG_SYGUS_V2"; break; default: out << "undefined_input_language"; @@ -106,8 +104,8 @@ enum CVC4_EXPORT Language LANG_SMTLIB_V2 = input::LANG_SMTLIB_V2, /** The TPTP output language */ LANG_TPTP = input::LANG_TPTP, - /** The CVC4 output language */ - LANG_CVC4 = input::LANG_CVC4, + /** The cvc5 output language */ + LANG_CVC = input::LANG_CVC, /** The sygus output language version 2.0 */ LANG_SYGUS_V2 = input::LANG_SYGUS_V2, @@ -130,9 +128,7 @@ inline std::ostream& operator<<(std::ostream& out, Language lang) { case LANG_TPTP: out << "LANG_TPTP"; break; - case LANG_CVC4: - out << "LANG_CVC4"; - break; + case LANG_CVC: out << "LANG_CVC"; break; case LANG_SYGUS_V2: out << "LANG_SYGUS_V2"; break; case LANG_AST: out << "LANG_AST"; diff --git a/src/options/main_options.toml b/src/options/main_options.toml index ccbe1a956..f0d767276 100644 --- a/src/options/main_options.toml +++ b/src/options/main_options.toml @@ -10,7 +10,7 @@ header = "options/main_options.h" type = "bool" read_only = true alternate = false - help = "identify this CVC4 binary" + help = "identify this cvc5 binary" [[option]] name = "help" @@ -28,7 +28,7 @@ header = "options/main_options.h" type = "void" handler = "showConfiguration" read_only = true - help = "show CVC4 static configuration" + help = "show cvc5 static configuration" [[option]] category = "common" @@ -36,7 +36,7 @@ header = "options/main_options.h" type = "void" handler = "copyright" read_only = true - help = "show CVC4 copyright information" + help = "show cvc5 copyright information" [[option]] name = "seed" diff --git a/src/options/options_handler.cpp b/src/options/options_handler.cpp index 86ab9c0b3..35a9673e2 100644 --- a/src/options/options_handler.cpp +++ b/src/options/options_handler.cpp @@ -104,7 +104,9 @@ void OptionsHandler::abcEnabledBuild(std::string option, bool value) #ifndef CVC5_USE_ABC if(value) { std::stringstream ss; - ss << "option `" << option << "' requires an abc-enabled build of CVC4; this binary was not built with abc support"; + ss << "option `" << option + << "' requires an abc-enabled build of cvc5; this binary was not built " + "with abc support"; throw OptionException(ss.str()); } #endif /* CVC5_USE_ABC */ @@ -115,7 +117,9 @@ void OptionsHandler::abcEnabledBuild(std::string option, std::string value) #ifndef CVC5_USE_ABC if(!value.empty()) { std::stringstream ss; - ss << "option `" << option << "' requires an abc-enabled build of CVC4; this binary was not built with abc support"; + ss << "option `" << option + << "' requires an abc-enabled build of cvc5; this binary was not built " + "with abc support"; throw OptionException(ss.str()); } #endif /* CVC5_USE_ABC */ @@ -128,7 +132,7 @@ void OptionsHandler::checkBvSatSolver(std::string option, SatSolverMode m) { std::stringstream ss; ss << "option `" << option - << "' requires a CryptoMiniSat build of CVC4; this binary was not built " + << "' requires a CryptoMiniSat build of cvc5; this binary was not built " "with CryptoMiniSat support"; throw OptionException(ss.str()); } @@ -137,7 +141,7 @@ void OptionsHandler::checkBvSatSolver(std::string option, SatSolverMode m) { std::stringstream ss; ss << "option `" << option - << "' requires a CaDiCaL build of CVC4; this binary was not built with " + << "' requires a CaDiCaL build of cvc5; this binary was not built with " "CaDiCaL support"; throw OptionException(ss.str()); } @@ -146,7 +150,7 @@ void OptionsHandler::checkBvSatSolver(std::string option, SatSolverMode m) { std::stringstream ss; ss << "option `" << option - << "' requires a Kissat build of CVC4; this binary was not built with " + << "' requires a Kissat build of cvc5; this binary was not built with " "Kissat support"; throw OptionException(ss.str()); } @@ -265,7 +269,9 @@ void OptionsHandler::setStats(const std::string& option, bool value) if (value) { std::stringstream ss; - ss << "option `" << option << "' requires a statistics-enabled build of CVC4; this binary was not built with statistics support"; + ss << "option `" << option + << "' requires a statistics-enabled build of cvc5; this binary was not " + "built with statistics support"; throw OptionException(ss.str()); } #endif /* CVC5_STATISTICS_ON */ diff --git a/src/options/options_handler.h b/src/options/options_handler.h index 6fd9a398b..4b9b1c0ae 100644 --- a/src/options/options_handler.h +++ b/src/options/options_handler.h @@ -128,7 +128,7 @@ void OptionsHandler::checkSatSolverEnabled(std::string option, T m) && !defined(CVC5_USE_KISSAT) std::stringstream ss; ss << "option `" << option - << "' requires CVC4 to be built with CryptoMiniSat or CaDiCaL or Kissat"; + << "' requires cvc5 to be built with CryptoMiniSat or CaDiCaL or Kissat"; throw OptionException(ss.str()); #endif } diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index 47f07db9c..b9b80aa7e 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -264,13 +264,13 @@ options::OptionsHolder::OptionsHolder() : static const std::string mostCommonOptionsDescription = "\ -Most commonly-used CVC4 options:\n" +Most commonly-used cvc5 options:\n" ${help_common}$; static const std::string optionsDescription = mostCommonOptionsDescription + "\n\ \n\ -Additional CVC4 options:\n" +Additional cvc5 options:\n" ${help_others}$; @@ -283,7 +283,7 @@ static const std::string languageDescription = "\ Languages currently supported as arguments to the -L / --lang option:\n\ auto attempt to automatically determine language\n\ - cvc4 | presentation | pl CVC4 presentation language\n\ + cvc4 | presentation | pl cvc5 presentation language\n\ smt | smtlib | smt2 |\n\ smt2.6 | smtlib2.6 SMT-LIB format 2.6 with support for the strings standard\n\ tptp TPTP format (cnf, fof and tff)\n\ @@ -291,7 +291,7 @@ Languages currently supported as arguments to the -L / --lang option:\n\ \n\ Languages currently supported as arguments to the --output-lang option:\n\ auto match output language to input language\n\ - cvc4 | presentation | pl CVC4 presentation language\n\ + cvc4 | presentation | pl cvc5 presentation language\n\ cvc3 CVC3 presentation language\n\ smt | smtlib | smt2 |\n\ smt2.6 | smtlib2.6 SMT-LIB format 2.6 with support for the strings standard\n\ diff --git a/src/options/parser_options.toml b/src/options/parser_options.toml index afec2ce48..1a4b75429 100644 --- a/src/options/parser_options.toml +++ b/src/options/parser_options.toml @@ -45,7 +45,7 @@ header = "options/parser_options.h" # is still permitted to read the input file given on the command-line if any. # creation/use of temp files are still permitted (but the paths aren't given by # the user). Also note this is only safe for the version invoked through the -# main driver, there are ways via the API to get the CVC4 library to open a file +# main driver, there are ways via the API to get the cvc5 library to open a file # for reading or writing and thus leak information from an existing file, or # overwrite an existing file with malicious content. [[option]] diff --git a/src/options/quantifiers_options.toml b/src/options/quantifiers_options.toml index bbdf030a1..076d26553 100644 --- a/src/options/quantifiers_options.toml +++ b/src/options/quantifiers_options.toml @@ -994,7 +994,7 @@ header = "options/quantifiers_options.h" # Solution reconstruction modes for single invocation conjectures # -# These modes indicate the policy when CVC4 solves a synthesis conjecture using +# These modes indicate the policy when cvc5 solves a synthesis conjecture using # single invocation techniques for a sygus problem with a user-specified # grammar. # @@ -1008,7 +1008,7 @@ header = "options/quantifiers_options.h" help_mode = "Modes for reconstruction solutions while using single invocation techniques." [[option.mode.NONE]] name = "none" - help = "Do not try to reconstruct solutions in the original (user-provided) grammar when using single invocation techniques. In this mode, solutions produced by CVC4 may violate grammar restrictions." + help = "Do not try to reconstruct solutions in the original (user-provided) grammar when using single invocation techniques. In this mode, solutions produced by cvc5 may violate grammar restrictions." [[option.mode.TRY]] name = "try" help = "Try to reconstruct solutions in the original grammar when using single invocation techniques in an incomplete (fail-fast) manner." @@ -1538,7 +1538,7 @@ header = "options/quantifiers_options.h" long = "sygus-query-gen-check" type = "bool" default = "true" - help = "use interesting satisfiability queries to check soundness of CVC4" + help = "use interesting satisfiability queries to check soundness of cvc5" [[option]] name = "sygusQueryGenDumpFiles" diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index 7690d8962..de90ee14b 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -239,10 +239,11 @@ AntlrInput* AntlrInput::newInput(InputLanguage lang, AntlrInputStream& inputStre AntlrInput* input; switch(lang) { - case LANG_CVC4: { - input = new CvcInput(inputStream); - break; - } + case LANG_CVC: + { + input = new CvcInput(inputStream); + break; + } case LANG_SYGUS_V2: input = new SygusInput(inputStream); break; diff --git a/src/parser/antlr_input_imports.cpp b/src/parser/antlr_input_imports.cpp index 738f4c6e2..c04349491 100644 --- a/src/parser/antlr_input_imports.cpp +++ b/src/parser/antlr_input_imports.cpp @@ -18,7 +18,7 @@ /* * The functions in this file are based on implementations in libantlr3c, - * with only minor CVC4-specific changes. + * with only minor cvc5-specific changes. */ // [The "BSD licence"] @@ -79,7 +79,7 @@ namespace parser { /// /// If you override, make sure to update errorCount if you care about that. /// -/* *** CVC4 NOTE *** +/* *** cvc5 NOTE *** * This function is has been modified in not-completely-trivial ways from its * libantlr3c implementation to support more informative error messages and to * invoke the error reporting mechanism of the Input class instead of the @@ -90,7 +90,7 @@ void AntlrInput::reportError(pANTLR3_BASE_RECOGNIZER recognizer) { pANTLR3_UINT8 * tokenNames = recognizer->state->tokenNames; stringstream ss; - // Dig the CVC4 objects out of the ANTLR3 mess + // Dig the cvc5 objects out of the ANTLR3 mess pANTLR3_PARSER antlr3Parser = (pANTLR3_PARSER)(recognizer->super); Assert(antlr3Parser != NULL); Parser *parser = (Parser*)(antlr3Parser->super); @@ -285,7 +285,7 @@ void AntlrInput::reportError(pANTLR3_BASE_RECOGNIZER recognizer) { /// /// \see nextToken /// -/* *** CVC4 NOTE *** +/* *** cvc5 NOTE *** * This is copied, largely unmodified, from antlr3lexer.c * */ @@ -346,7 +346,7 @@ AntlrInput::nextTokenStr (pANTLR3_TOKEN_SOURCE toksource) // Recognition exception, report it and try to recover. // lexer->rec->state->failed = ANTLR3_TRUE; - // *** CVC4 EDIT: Just call the AntlrInput error routine + // *** cvc5 EDIT: Just call the AntlrInput error routine lexerError(lexer->rec); lexer->recover(lexer); } @@ -356,7 +356,7 @@ AntlrInput::nextTokenStr (pANTLR3_TOKEN_SOURCE toksource) { // Emit the real token, which adds it in to the token stream basically // - // *** CVC4 Edit: call emit on the lexer object + // *** cvc5 Edit: call emit on the lexer object lexer->emit(lexer); } else if (lexer->rec->state->token == &(toksource->skipToken)) @@ -375,7 +375,7 @@ AntlrInput::nextTokenStr (pANTLR3_TOKEN_SOURCE toksource) } } -/* *** CVC4 NOTE *** +/* *** cvc5 NOTE *** * This is copied, totaly unmodified, from antlr3lexer.c * in order to use nextTokenStr previously defined. * diff --git a/src/parser/antlr_line_buffered_input.h b/src/parser/antlr_line_buffered_input.h index 3203e815b..c92f2d496 100644 --- a/src/parser/antlr_line_buffered_input.h +++ b/src/parser/antlr_line_buffered_input.h @@ -14,7 +14,7 @@ * * By default, ANTLR expects the whole input to be in a single, consecutive * buffer. When doing incremental solving and the input is coming from the - * standard input, this is problematic because CVC4 might receive new input + * standard input, this is problematic because cvc5 might receive new input * based on the result of solving the existing input. * * This file overwrites the _LA and the consume functions of the input streamto diff --git a/src/parser/antlr_tracing.h b/src/parser/antlr_tracing.h index cd1066383..595a2d784 100644 --- a/src/parser/antlr_tracing.h +++ b/src/parser/antlr_tracing.h @@ -54,7 +54,7 @@ static struct __Cvc4System { struct JavaPrinter { template JavaPrinter operator+(const T& t) const { - CVC4Message() << t; + CVC5Message() << t; return JavaPrinter(); } };/* struct JavaPrinter */ @@ -67,7 +67,7 @@ static struct __Cvc4System { * to the call-by-value semantics of C. All that's left to * do is print the newline. */ - void println(JavaPrinter) { CVC4Message() << std::endl; } + void println(JavaPrinter) { CVC5Message() << std::endl; } } out; } System; diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g index f78426eda..2ad56d6e4 100644 --- a/src/parser/cvc/Cvc.g +++ b/src/parser/cvc/Cvc.g @@ -23,7 +23,7 @@ options { // defaultErrorHandler = false; // Only lookahead of <= k requested (disable for LL* parsing) - // Note that CVC4's BoundedTokenBuffer requires a fixed k ! + // Note that cvc5's BoundedTokenBuffer requires a fixed k ! // If you change this k, change it also in cvc_input.cpp ! k = 3; }/* options */ @@ -555,7 +555,7 @@ api::Term addNots(api::Solver* s, size_t n, api::Term e) { namespace cvc5 { class Expr; -}/* CVC4 namespace */ +}/* cvc5 namespace */ }/* @parser::includes */ @@ -633,16 +633,16 @@ parseCommand returns [cvc5::Command* cmd_return = NULL] { std::string s = AntlrInput::tokenText($IDENTIFIER); if(s == "benchmark") { PARSER_STATE->parseError( - "In CVC4 presentation language mode, but SMT-LIBv1 format " + "In cvc5 presentation language mode, but SMT-LIBv1 format " "detected, which is not supported anymore."); } else if(s == "set" || s == "get" || s == "declare" || s == "define" || s == "assert") { PARSER_STATE->parseError( - "In CVC4 presentation language mode, but SMT-LIB format detected. " + "In cvc5 presentation language mode, but SMT-LIB format detected. " "Use --lang smt for SMT-LIB support."); } else { PARSER_STATE->parseError( - "A CVC4 presentation language command cannot begin with a " + "A cvc5 presentation language command cannot begin with a " "parenthesis; expected command name."); } } @@ -798,24 +798,24 @@ mainCommand[std::unique_ptr* cmd] | DBG_TOK ( ( str[s] | IDENTIFIER { s = AntlrInput::tokenText($IDENTIFIER); } ) { Debug.on(s); Trace.on(s); } - | { CVC4Message() << "Please specify what to debug." << std::endl; } + | { CVC5Message() << "Please specify what to debug." << std::endl; } ) | TRACE_TOK ( ( str[s] | IDENTIFIER { s = AntlrInput::tokenText($IDENTIFIER); } ) { Trace.on(s); } - | { CVC4Message() << "Please specify something to trace." << std::endl; } + | { CVC5Message() << "Please specify something to trace." << std::endl; } ) | UNTRACE_TOK ( ( str[s] | IDENTIFIER { s = AntlrInput::tokenText($IDENTIFIER); } ) { Trace.off(s); } - | { CVC4Message() << "Please specify something to untrace." << std::endl; } + | { CVC5Message() << "Please specify something to untrace." << std::endl; } ) | HELP_TOK ( ( str[s] | IDENTIFIER { s = AntlrInput::tokenText($IDENTIFIER); } ) - { CVC4Message() << "No help available for `" << s << "'." << std::endl; } - | { CVC4Message() << "Please use --help at the command line for help." + { CVC5Message() << "No help available for `" << s << "'." << std::endl; } + | { CVC5Message() << "Please use --help at the command line for help." << std::endl; } ) @@ -1104,7 +1104,7 @@ declareVariables[std::unique_ptr* cmd, cvc5::api::Sort& t, << "with type " << oldType << std::endl; if(oldType != t) { std::stringstream ss; - ss << language::SetLanguage(language::output::LANG_CVC4) + ss << language::SetLanguage(language::output::LANG_CVC) << "incompatible type for `" << *i << "':" << std::endl << " old type: " << oldType << std::endl << " new type: " << t << std::endl; @@ -1394,7 +1394,7 @@ typeLetDecl[cvc5::parser::DeclarationCheck check] ; /** - * Matches a CVC4 expression. Formulas and terms are not really + * Matches a cvc5 expression. Formulas and terms are not really * distinguished during parsing; please ignore the naming of the * grammar rules. * @@ -1526,7 +1526,7 @@ letDecl } : identifier[name,CHECK_NONE,SYM_VARIABLE] EQUAL_TOK formula[e] { - Debug("parser") << language::SetLanguage(language::output::LANG_CVC4) + Debug("parser") << language::SetLanguage(language::output::LANG_CVC) << e.getSort() << std::endl; PARSER_STATE->defineVar(name, e); Debug("parser") << "LET[" << PARSER_STATE->scopeLevel() << "]: " diff --git a/src/parser/cvc/README b/src/parser/cvc/README index 513a8e85a..df6c82de9 100644 --- a/src/parser/cvc/README +++ b/src/parser/cvc/README @@ -1,4 +1,4 @@ -Notes on CVC4's CVC language parser. +Notes on cvc5's CVC language parser. This language parser attempts to maintain some backward compatibility with previous versions of the language. However, as the language @@ -9,21 +9,21 @@ need to be removed. In order to support our users, we have tried to parse what CVC3 could and (at least) offer an error when a feature is unavailable or unimplemented. But this is not always possible. Please report a -bug if a particular discrepancy between CVC3 and CVC4 handling of +bug if a particular discrepancy between CVC3 and cvc5 handling of the CVC language is a concern to you; we may be able to add a compatibility mode, or at least offer better warnings or errors. -Below is a list of the known differences between CVC3's and CVC4's +Below is a list of the known differences between CVC3's and cvc5's version of the CVC language. This is the list of differences in -language design and parsing ONLY. The featureset of CVC4 is +language design and parsing ONLY. The featureset of cvc5 is rapidly expanding, but does not match CVC3's breadth yet. However, -CVC4 should tell you of an unimplemented feature if you try to use +cvc5 should tell you of an unimplemented feature if you try to use it (rather than giving a cryptic parse or assertion error). -* CVC4 does not add the current assumptions to the scope after +* cvc5 does not add the current assumptions to the scope after SAT/INVALID responses like CVC3 did. -* CVC4 no longer supports the "old" function syntax: +* cvc5 no longer supports the "old" function syntax: f : [INT -> INT]; @@ -37,21 +37,21 @@ it (rather than giving a cryptic parse or assertion error). * QUERY and CHECKSAT do not add their argument to the current list of assertions like CVC3 did. -* CVC4 allows datatypes to hold complex types that contain self- +* cvc5 allows datatypes to hold complex types that contain self- or mutual references. For example, DATATYPE tree = node(children:ARRAY INT OF tree) | leaf(data:INT) END; - is permissible in CVC4 but not in CVC3. + is permissible in cvc5 but not in CVC3. -* CVC4 supports parameterized types in datatype definitions, e.g. +* cvc5 supports parameterized types in datatype definitions, e.g. DATATYPE list[T] = cons(car:T) | nil END; You can then declare "x : list[INT];" or "x : list[list[INT]];", for example. -* CVC4 supports type ascriptions, e.g. +* cvc5 supports type ascriptions, e.g. U : TYPE; f : INT -> U; @@ -70,16 +70,16 @@ it (rather than giving a cryptic parse or assertion error). DATATYPE Item = Carrots | Butter | Milk | Bread END; groceries : list[Item] = cons(Butter, cons(Bread, nil:list[INT])); -* CVC4 supports stronger distinction between type and variable names. - This means that CVC4 may allow you to declare things that CVC3 does +* cvc5 supports stronger distinction between type and variable names. + This means that cvc5 may allow you to declare things that CVC3 does not: a : TYPE; a : INT; % CVC3 complains - a : a; % CVC4 complains, `a' cannot both be INT and `a' + a : a; % cvc5 complains, `a' cannot both be INT and `a' b : a; % No problem, `a' is both the type of `b', and an INT -* CVC4 supports a command-level LET syntax, e.g.: +* cvc5 supports a command-level LET syntax, e.g.: LET double = LAMBDA(x:INT) : 2*x IN QUERY double(5) = 10; diff --git a/src/parser/parser.h b/src/parser/parser.h index 3382d25eb..da35606c1 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -391,7 +391,7 @@ public: */ void checkFunctionLike(api::Term fun); - /** Create a new CVC4 variable expression of the given type. + /** Create a new cvc5 variable expression of the given type. * * It is inserted at context level zero in the symbol table if levelZero is * true, or if we are using global declarations. @@ -407,7 +407,7 @@ public: bool doOverload = false); /** - * Create a set of new CVC4 variable expressions of the given type. + * Create a set of new cvc5 variable expressions of the given type. * * It is inserted at context level zero in the symbol table if levelZero is * true, or if we are using global declarations. @@ -423,12 +423,12 @@ public: bool doOverload = false); /** - * Create a new CVC4 bound variable expression of the given type. This binds + * Create a new cvc5 bound variable expression of the given type. This binds * the symbol name to that variable in the current scope. */ api::Term bindBoundVar(const std::string& name, const api::Sort& type); /** - * Create a new CVC4 bound variable expressions of the given names and types. + * Create a new cvc5 bound variable expressions of the given names and types. * Like the method above, this binds these names to those variables in the * current scope. */ @@ -436,11 +436,12 @@ public: std::vector >& sortedVarNames); /** - * Create a set of new CVC4 bound variable expressions of the given type. + * Create a set of new cvc5 bound variable expressions of the given type. * * For each name, if a symbol with name already exists, * then if doOverload is true, we create overloaded operators. - * else if doOverload is false, the existing expression is shadowed by the new expression. + * else if doOverload is false, the existing expression is shadowed by the + * new expression. */ std::vector bindBoundVars(const std::vector names, const api::Sort& type); diff --git a/src/parser/parser_builder.h b/src/parser/parser_builder.h index 87fef8e93..b0f9e35e6 100644 --- a/src/parser/parser_builder.h +++ b/src/parser/parser_builder.h @@ -152,7 +152,7 @@ class CVC4_EXPORT ParserBuilder * parse would otherwise be an incorrect parse tree and the error * would go undetected. This is specifically for circumstances * where the parser is ahead of the functionality present elsewhere - * in CVC4 (such as quantifiers, subtypes, records, etc. in the CVC + * in cvc5 (such as quantifiers, subtypes, records, etc. in the CVC * language parser). */ ParserBuilder& withParseOnly(bool flag = true); diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 16eba8fb3..34fabed0d 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -23,7 +23,7 @@ options { // defaultErrorHandler = false; // Only lookahead of <= k requested (disable for LL* parsing) - // Note that CVC4's BoundedTokenBuffer requires a fixed k ! + // Note that cvc5's BoundedTokenBuffer requires a fixed k ! // If you change this k, change it also in smt2_input.cpp ! k = 2; }/* options */ @@ -91,7 +91,7 @@ namespace cvc5 { class Sort; } -}/* CVC4 namespace */ +}/* cvc5 namespace */ }/* @parser::includes */ @@ -483,7 +483,7 @@ command [std::unique_ptr* cmd] /* New SMT-LIB 2.5 command set */ | smt25Command[cmd] - /* CVC4-extended SMT-LIB commands */ + /* cvc5-extended SMT-LIB commands */ | extendedCommand[cmd] { if(PARSER_STATE->strictModeEnabled()) { PARSER_STATE->parseError( @@ -632,7 +632,7 @@ sygusGrammar[cvc5::api::Grammar*& ret, << "2.0 format requires a predeclaration of the non-terminal " << "symbols of the grammar to be given prior to the definition " << "of the grammar. See https://sygus.org/language/ for details " - << "and examples. CVC4 versions past 1.8 do not support SyGuS " + << "and examples. cvc5 versions past 1.8 do not support SyGuS " << "version 1.0."; } else diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp index 19b343a66..10396d1dc 100644 --- a/src/parser/smt2/smt2.cpp +++ b/src/parser/smt2/smt2.cpp @@ -732,7 +732,7 @@ void Smt2::checkThatLogicIsSet() else { warning("No set-logic command was given before this point."); - warning("CVC4 will make all theories available."); + warning("cvc5 will make all theories available."); warning( "Consider setting a stricter logic for (likely) better " "performance."); diff --git a/src/parser/tptp/Tptp.g b/src/parser/tptp/Tptp.g index 3932b8f7d..6877306a2 100644 --- a/src/parser/tptp/Tptp.g +++ b/src/parser/tptp/Tptp.g @@ -25,7 +25,7 @@ options { // defaultErrorHandler = false; // Only lookahead of <= k requested (disable for LL* parsing) - // Note that CVC4's BoundedTokenBuffer requires a fixed k ! + // Note that cvc5's BoundedTokenBuffer requires a fixed k ! // If you change this k, change it also in tptp_input.cpp ! k = 2; }/* options */ diff --git a/src/preprocessing/passes/unconstrained_simplifier.cpp b/src/preprocessing/passes/unconstrained_simplifier.cpp index 93e30ecd2..0d4804310 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.cpp +++ b/src/preprocessing/passes/unconstrained_simplifier.cpp @@ -855,7 +855,7 @@ PreprocessingPassResult UnconstrainedSimplifier::applyInternal( if (!d_unconstrained.empty()) { processUnconstrained(); - // d_substitutions.print(CVC4Message.getStream()); + // d_substitutions.print(CVC5Message.getStream()); for (size_t i = 0, asize = assertions.size(); i < asize; ++i) { Node a = assertions[i]; diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index 3605aa697..e6e227879 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -932,7 +932,7 @@ void CvcPrinter::toStreamNode(std::ostream& out, } toStreamNode(out, n[i], -1, false, lbind); out << ":"; - n[i].getType().toStream(out, language::output::LANG_CVC4); + n[i].getType().toStream(out, language::output::LANG_CVC); } out << ')'; return; diff --git a/src/printer/printer.cpp b/src/printer/printer.cpp index 7d17a27a1..6237c8744 100644 --- a/src/printer/printer.cpp +++ b/src/printer/printer.cpp @@ -45,8 +45,7 @@ unique_ptr Printer::makePrinter(OutputLanguage lang) case LANG_TPTP: return unique_ptr(new printer::tptp::TptpPrinter()); - case LANG_CVC4: - return unique_ptr(new printer::cvc::CvcPrinter()); + case LANG_CVC: return unique_ptr(new printer::cvc::CvcPrinter()); case LANG_SYGUS_V2: // sygus version 2.0 does not have discrepancies with smt2, hence we use diff --git a/src/prop/README.minisat b/src/prop/README.minisat index b3e101a88..14cb54a03 100644 --- a/src/prop/README.minisat +++ b/src/prop/README.minisat @@ -6,6 +6,6 @@ on 11 July 2010. The code has been modified to put everything in the cvc5::MiniSat namespace. The build process has been modified. Other parts have -been modified to serve CVC4's purposes. +been modified to serve cvc5's purposes. -- Morgan Deters Sun, 07 Nov 2010 22:27:09 -0500 diff --git a/src/prop/bvminisat/utils/System.cc b/src/prop/bvminisat/utils/System.cc index 606fc5cbe..d86678097 100644 --- a/src/prop/bvminisat/utils/System.cc +++ b/src/prop/bvminisat/utils/System.cc @@ -96,4 +96,4 @@ double BVMinisat::memUsed() { #endif } /* cvc5::BVMinisat namespace */ -} /* CVC4 namespace */ +} /* cvc5 namespace */ diff --git a/src/prop/cadical.cpp b/src/prop/cadical.cpp index 3cce2a7f5..ec8919b0b 100644 --- a/src/prop/cadical.cpp +++ b/src/prop/cadical.cpp @@ -12,7 +12,7 @@ * * Wrapper for CaDiCaL SAT Solver. * - * Implementation of the CaDiCaL SAT solver for CVC4 (bit-vectors). + * Implementation of the CaDiCaL SAT solver for cvc5 (bit-vectors). */ #include "prop/cadical.h" diff --git a/src/prop/cadical.h b/src/prop/cadical.h index 70474ce74..b5e26df9f 100644 --- a/src/prop/cadical.h +++ b/src/prop/cadical.h @@ -12,7 +12,7 @@ * * Wrapper for CaDiCaL SAT Solver. * - * Implementation of the CaDiCaL SAT solver for CVC4 (bit-vectors). + * Implementation of the CaDiCaL SAT solver for cvc5 (bit-vectors). */ #include "cvc5_private.h" diff --git a/src/prop/minisat/CVC4-README b/src/prop/minisat/CVC4-README index cd3b638d6..2fcf2ed49 100644 --- a/src/prop/minisat/CVC4-README +++ b/src/prop/minisat/CVC4-README @@ -1,6 +1,6 @@ ================ CHANGES TO THE ORIGINAL CODE ================================== -The only CVC4 connections passed to minisat are the proxy (defined in sat.h) and +The only cvc5 connections passed to minisat are the proxy (defined in sat.h) and the context. The context is obtained from the SmtEngine, and the proxy is an intermediary class that has all-access to the SatSolver so as to simplify the interface to (possible) other sat solvers. These two are passed to minisat at @@ -35,7 +35,7 @@ Backtracking in minisat is performed through the cancelUntil() method, which is now modified to pop the context the appropriate number of times. Minisat pushes the scope in the newDecisionLevel() method where we appropriately -also push the CVC4 context. +also push the cvc5 context. * Phase caching diff --git a/src/prop/minisat/core/Solver.cc b/src/prop/minisat/core/Solver.cc index 8f59ec13b..981e51e31 100644 --- a/src/prop/minisat/core/Solver.cc +++ b/src/prop/minisat/core/Solver.cc @@ -2123,7 +2123,7 @@ void Solver::push() trail_ok.push(ok); assigns_lim.push(assigns.size()); - d_context->push(); // SAT context for CVC4 + d_context->push(); // SAT context for cvc5 Debug("minisat") << "MINISAT PUSH assertionLevel is " << assertionLevel << ", trail.size is " << trail.size() << std::endl; } @@ -2162,7 +2162,7 @@ void Solver::pop() removeClausesAboveLevel(clauses_removable, assertionLevel); Debug("minisat") << cvc5::pop; // Pop the SAT context to notify everyone - d_context->pop(); // SAT context for CVC4 + d_context->pop(); // SAT context for cvc5 Debug("minisat") << "MINISAT POP assertionLevel is " << assertionLevel << ", trail.size is " << trail.size() << "\n"; diff --git a/src/prop/minisat/core/Solver.h b/src/prop/minisat/core/Solver.h index fd682639b..f85dc0d24 100644 --- a/src/prop/minisat/core/Solver.h +++ b/src/prop/minisat/core/Solver.h @@ -54,8 +54,7 @@ namespace Minisat { // Solver -- the main class: class Solver { - - /** The only two CVC4 entry points to the private solver data */ + /** The only two cvc5 entry points to the private solver data */ friend class cvc5::prop::PropEngine; friend class cvc5::prop::TheoryProxy; friend class cvc5::prop::SatProofManager; @@ -198,117 +197,164 @@ public: } }; - // CVC4 context push/pop - void push (); - void pop (); - - /* - * Reset the decisions in the DPLL(T) SAT solver at the current assertion - * level. - */ - void resetTrail(); - // addClause returns the ClauseId corresponding to the clause added in the - // reference parameter id. - bool addClause (const vec& ps, bool removable, ClauseId& id); // Add a clause to the solver. - bool addEmptyClause(bool removable); // Add the empty clause, making the solver contradictory. - bool addClause (Lit p, bool removable, ClauseId& id); // Add a unit clause to the solver. - bool addClause (Lit p, Lit q, bool removable, ClauseId& id); // Add a binary clause to the solver. - bool addClause (Lit p, Lit q, Lit r, bool removable, ClauseId& id); // Add a ternary clause to the solver. - bool addClause_( vec& ps, bool removable, ClauseId& id); // Add a clause to the solver without making superflous internal copy. Will - // change the passed vector 'ps'. - - // Solving: - // - bool simplify (); // Removes already satisfied clauses. - lbool solve (const vec& assumps); // Search for a model that respects a given set of assumptions. - lbool solveLimited (const vec& assumps); // Search for a model that respects a given set of assumptions (With resource constraints). - lbool solve (); // Search without assumptions. - lbool solve (Lit p); // Search for a model that respects a single assumption. - lbool solve (Lit p, Lit q); // Search for a model that respects two assumptions. - lbool solve (Lit p, Lit q, Lit r); // Search for a model that respects three assumptions. - bool okay () const; // FALSE means solver is in a conflicting state - - void toDimacs(); - void toDimacs (FILE* f, const vec& assumps); // Write CNF to file in DIMACS-format. - void toDimacs (const char *file, const vec& assumps); - void toDimacs (FILE* f, Clause& c, vec& map, Var& max); - - // Convenience versions of 'toDimacs()': - void toDimacs (const char* file); - void toDimacs (const char* file, Lit p); - void toDimacs (const char* file, Lit p, Lit q); - void toDimacs (const char* file, Lit p, Lit q, Lit r); - - // Variable mode: - // - void setPolarity (Var v, bool b); // Declare which polarity the decision heuristic should use for a variable. Requires mode 'polarity_user'. - void freezePolarity (Var v, bool b); // Declare which polarity the decision heuristic MUST ALWAYS use for a variable. Requires mode 'polarity_user'. - void setDecisionVar (Var v, bool b); // Declare if a variable should be eligible for selection in the decision heuristic. - - // Read state: - // - lbool value (Var x) const; // The current value of a variable. - lbool value (Lit p) const; // The current value of a literal. - lbool modelValue (Var x) const; // The value of a variable in the last model. The last call to solve must have been satisfiable. - lbool modelValue (Lit p) const; // The value of a literal in the last model. The last call to solve must have been satisfiable. - int nAssigns () const; // The current number of assigned literals. - int nClauses () const; // The current number of original clauses. - int nLearnts () const; // The current number of learnt clauses. - int nVars () const; // The current number of variables. - int nFreeVars () const; - bool isDecision (Var x) const; // is the given var a decision? - - // Debugging SMT explanations - // - bool properExplanation(Lit l, Lit expl) const; // returns true if expl can be used to explain l---i.e., both assigned and trail_index(expl) < trail_index(l) - - // Resource contraints: - // - void setConfBudget(int64_t x); - void setPropBudget(int64_t x); - void budgetOff(); - void interrupt(); // Trigger a (potentially asynchronous) interruption of the solver. - void clearInterrupt(); // Clear interrupt indicator flag. + // cvc5 context push/pop + void push(); + void pop(); + + /* + * Reset the decisions in the DPLL(T) SAT solver at the current assertion + * level. + */ + void resetTrail(); + // addClause returns the ClauseId corresponding to the clause added in the + // reference parameter id. + bool addClause(const vec& ps, + bool removable, + ClauseId& id); // Add a clause to the solver. + bool addEmptyClause( + bool removable); // Add the empty clause, making the solver contradictory. + bool addClause(Lit p, + bool removable, + ClauseId& id); // Add a unit clause to the solver. + bool addClause(Lit p, + Lit q, + bool removable, + ClauseId& id); // Add a binary clause to the solver. + bool addClause(Lit p, + Lit q, + Lit r, + bool removable, + ClauseId& id); // Add a ternary clause to the solver. + bool addClause_( + vec& ps, + bool removable, + ClauseId& id); // Add a clause to the solver without making superflous + // internal copy. Will change the passed vector 'ps'. + + // Solving: + // + bool simplify(); // Removes already satisfied clauses. + lbool solve(const vec& assumps); // Search for a model that respects a + // given set of assumptions. + lbool solveLimited( + const vec& assumps); // Search for a model that respects a given set + // of assumptions (With resource constraints). + lbool solve(); // Search without assumptions. + lbool solve(Lit p); // Search for a model that respects a single assumption. + lbool solve(Lit p, + Lit q); // Search for a model that respects two assumptions. + lbool solve(Lit p, + Lit q, + Lit r); // Search for a model that respects three assumptions. + bool okay() const; // FALSE means solver is in a conflicting state + + void toDimacs(); + void toDimacs(FILE* f, + const vec& assumps); // Write CNF to file in DIMACS-format. + void toDimacs(const char* file, const vec& assumps); + void toDimacs(FILE* f, Clause& c, vec& map, Var& max); + + // Convenience versions of 'toDimacs()': + void toDimacs(const char* file); + void toDimacs(const char* file, Lit p); + void toDimacs(const char* file, Lit p, Lit q); + void toDimacs(const char* file, Lit p, Lit q, Lit r); + + // Variable mode: + // + void setPolarity( + Var v, bool b); // Declare which polarity the decision heuristic should + // use for a variable. Requires mode 'polarity_user'. + void freezePolarity( + Var v, + bool b); // Declare which polarity the decision heuristic MUST ALWAYS use + // for a variable. Requires mode 'polarity_user'. + void setDecisionVar(Var v, + bool b); // Declare if a variable should be eligible for + // selection in the decision heuristic. + + // Read state: + // + lbool value(Var x) const; // The current value of a variable. + lbool value(Lit p) const; // The current value of a literal. + lbool modelValue( + Var x) const; // The value of a variable in the last model. The last call + // to solve must have been satisfiable. + lbool modelValue( + Lit p) const; // The value of a literal in the last model. The last call + // to solve must have been satisfiable. + int nAssigns() const; // The current number of assigned literals. + int nClauses() const; // The current number of original clauses. + int nLearnts() const; // The current number of learnt clauses. + int nVars() const; // The current number of variables. + int nFreeVars() const; + bool isDecision(Var x) const; // is the given var a decision? + + // Debugging SMT explanations + // + bool properExplanation(Lit l, Lit expl) + const; // returns true if expl can be used to explain l---i.e., both + // assigned and trail_index(expl) < trail_index(l) - // Memory managment: - // - virtual void garbageCollect(); - void checkGarbage(double gf); - void checkGarbage(); + // Resource contraints: + // + void setConfBudget(int64_t x); + void setPropBudget(int64_t x); + void budgetOff(); + void interrupt(); // Trigger a (potentially asynchronous) interruption of the + // solver. + void clearInterrupt(); // Clear interrupt indicator flag. + + // Memory managment: + // + virtual void garbageCollect(); + void checkGarbage(double gf); + void checkGarbage(); - // Extra results: (read-only member variable) - // - vec model; // If problem is satisfiable, this vector contains the model (if any). - vec d_conflict; // If problem is unsatisfiable (possibly under - // assumptions), this vector represent the final - // conflict clause expressed in the assumptions. + // Extra results: (read-only member variable) + // + vec model; // If problem is satisfiable, this vector contains the model + // (if any). + vec d_conflict; // If problem is unsatisfiable (possibly under + // assumptions), this vector represent the final + // conflict clause expressed in the assumptions. - // Mode of operation: - // - int verbosity; - double var_decay; - double clause_decay; - double random_var_freq; - double random_seed; - bool luby_restart; - int ccmin_mode; // Controls conflict clause minimization (0=none, 1=basic, 2=deep). - int phase_saving; // Controls the level of phase saving (0=none, 1=limited, 2=full). - bool rnd_pol; // Use random polarities for branching heuristics. - bool rnd_init_act; // Initialize variable activities with a small random value. - double garbage_frac; // The fraction of wasted memory allowed before a garbage collection is triggered. - - int restart_first; // The initial restart limit. (default 100) - double restart_inc; // The factor with which the restart limit is multiplied in each restart. (default 1.5) - double learntsize_factor; // The intitial limit for learnt clauses is a factor of the original clauses. (default 1 / 3) - double learntsize_inc; // The limit for learnt clauses is multiplied with this factor each restart. (default 1.1) - - int learntsize_adjust_start_confl; - double learntsize_adjust_inc; - - // Statistics: (read-only member variable) - // - uint64_t solves, starts, decisions, rnd_decisions, propagations, conflicts, resources_consumed; - uint64_t dec_vars, clauses_literals, learnts_literals, max_literals, tot_literals; + // Mode of operation: + // + int verbosity; + double var_decay; + double clause_decay; + double random_var_freq; + double random_seed; + bool luby_restart; + int ccmin_mode; // Controls conflict clause minimization (0=none, 1=basic, + // 2=deep). + int phase_saving; // Controls the level of phase saving (0=none, 1=limited, + // 2=full). + bool rnd_pol; // Use random polarities for branching heuristics. + bool + rnd_init_act; // Initialize variable activities with a small random value. + double garbage_frac; // The fraction of wasted memory allowed before a garbage + // collection is triggered. + + int restart_first; // The initial restart limit. (default 100) + double restart_inc; // The factor with which the restart limit is multiplied + // in each restart. (default 1.5) + double + learntsize_factor; // The intitial limit for learnt clauses is a factor of + // the original clauses. (default 1 / 3) + double learntsize_inc; // The limit for learnt clauses is multiplied with this + // factor each restart. (default 1.1) + + int learntsize_adjust_start_confl; + double learntsize_adjust_inc; + + // Statistics: (read-only member variable) + // + uint64_t solves, starts, decisions, rnd_decisions, propagations, conflicts, + resources_consumed; + uint64_t dec_vars, clauses_literals, learnts_literals, max_literals, + tot_literals; protected: @@ -389,7 +435,7 @@ protected: ClauseAllocator ca; - // CVC4 Stuff + // cvc5 Stuff /** * A vector determining whether each variable represents a theory atom. * More generally, this value is true for any literal that the theory proxy diff --git a/src/prop/minisat/minisat.cpp b/src/prop/minisat/minisat.cpp index 55209b248..813292a21 100644 --- a/src/prop/minisat/minisat.cpp +++ b/src/prop/minisat/minisat.cpp @@ -129,7 +129,7 @@ void MinisatSatSolver::initialize(context::Context* context, // Like initialize() above, but called just before each search when in // incremental mode void MinisatSatSolver::setupOptions() { - // Copy options from CVC4 options structure into minisat, as appropriate + // Copy options from cvc5 options structure into minisat, as appropriate // Set up the verbosity d_minisat->verbosity = (options::verbosity() > 0) ? 1 : -1; diff --git a/src/prop/sat_solver_factory.cpp b/src/prop/sat_solver_factory.cpp index a1b89b836..446f72451 100644 --- a/src/prop/sat_solver_factory.cpp +++ b/src/prop/sat_solver_factory.cpp @@ -46,7 +46,7 @@ SatSolver* SatSolverFactory::createCryptoMinisat(StatisticsRegistry& registry, res->init(); return res; #else - Unreachable() << "CVC4 was not compiled with Cryptominisat support."; + Unreachable() << "cvc5 was not compiled with Cryptominisat support."; #endif } @@ -58,7 +58,7 @@ SatSolver* SatSolverFactory::createCadical(StatisticsRegistry& registry, res->init(); return res; #else - Unreachable() << "CVC4 was not compiled with CaDiCaL support."; + Unreachable() << "cvc5 was not compiled with CaDiCaL support."; #endif } @@ -70,7 +70,7 @@ SatSolver* SatSolverFactory::createKissat(StatisticsRegistry& registry, res->init(); return res; #else - Unreachable() << "CVC4 was not compiled with Kissat support."; + Unreachable() << "cvc5 was not compiled with Kissat support."; #endif } diff --git a/src/smt/command.cpp b/src/smt/command.cpp index 5585ab48f..f27ed6e1f 100644 --- a/src/smt/command.cpp +++ b/src/smt/command.cpp @@ -1602,7 +1602,7 @@ void GetValueCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = solver->mkTerm(api::SEXPR, result); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1680,7 +1680,7 @@ void GetAssignmentCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = solver->mkTerm(api::SEXPR, sexprs); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1813,7 +1813,7 @@ void BlockModelCommand::invoke(api::Solver* solver, SymbolManager* sm) solver->blockModel(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1867,7 +1867,7 @@ void BlockModelValuesCommand::invoke(api::Solver* solver, SymbolManager* sm) solver->blockModelValues(d_terms); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -1913,7 +1913,7 @@ void GetProofCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = solver->getSmtEngine()->getProof(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2318,7 +2318,7 @@ void GetUnsatAssumptionsCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = solver->getUnsatAssumptions(); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2380,7 +2380,7 @@ void GetUnsatCoreCommand::invoke(api::Solver* solver, SymbolManager* sm) d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2615,7 +2615,7 @@ void SetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm) solver->setInfo(d_flag, d_value); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException&) + catch (api::CVC5ApiRecoverableException&) { // As per SMT-LIB spec, silently accept unknown set-info keys d_commandStatus = CommandSuccess::instance(); @@ -2657,7 +2657,7 @@ void GetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = sexprToString(solver->mkTerm(api::SEXPR, v)); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException& e) + catch (api::CVC5ApiRecoverableException& e) { d_commandStatus = new CommandRecoverableFailure(e.what()); } @@ -2716,7 +2716,7 @@ void SetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm) solver->setOption(d_flag, d_value); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException&) + catch (api::CVC5ApiRecoverableException&) { d_commandStatus = new CommandUnsupported(); } @@ -2754,7 +2754,7 @@ void GetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm) d_result = solver->getOption(d_flag); d_commandStatus = CommandSuccess::instance(); } - catch (api::CVC4ApiRecoverableException&) + catch (api::CVC5ApiRecoverableException&) { d_commandStatus = new CommandUnsupported(); } diff --git a/src/smt/dump.cpp b/src/smt/dump.cpp index f5ebd3c5b..9dbbba7d3 100644 --- a/src/smt/dump.cpp +++ b/src/smt/dump.cpp @@ -27,7 +27,7 @@ namespace cvc5 { #if defined(CVC5_DUMPING) && !defined(CVC5_MUZZLE) -CVC4dumpstream& CVC4dumpstream::operator<<(const Command& c) +CVC5dumpstream& CVC5dumpstream::operator<<(const Command& c) { if (d_os != nullptr) { @@ -36,7 +36,7 @@ CVC4dumpstream& CVC4dumpstream::operator<<(const Command& c) return *this; } -CVC4dumpstream& CVC4dumpstream::operator<<(const NodeCommand& nc) +CVC5dumpstream& CVC5dumpstream::operator<<(const NodeCommand& nc) { if (d_os != nullptr) { @@ -47,8 +47,8 @@ CVC4dumpstream& CVC4dumpstream::operator<<(const NodeCommand& nc) #else -CVC4dumpstream& CVC4dumpstream::operator<<(const Command& c) { return *this; } -CVC4dumpstream& CVC4dumpstream::operator<<(const NodeCommand& nc) +CVC5dumpstream& CVC5dumpstream::operator<<(const Command& c) { return *this; } +CVC5dumpstream& CVC5dumpstream::operator<<(const NodeCommand& nc) { return *this; } @@ -175,7 +175,7 @@ void DumpC::setDumpFromString(const std::string& optarg) { else { throw OptionException( - "The dumping feature was disabled in this build of CVC4."); + "The dumping feature was disabled in this build of cvc5."); } } @@ -238,7 +238,7 @@ other modes for checking correctness and completeness of decision procedure\n\ implementations.\n\ \n\ The --output-language option controls the language used for dumping, and\n\ -this allows you to connect CVC4 to another solver implementation via a UNIX\n\ +this allows you to connect cvc5 to another solver implementation via a UNIX\n\ pipe to perform on-line checking. The --dump-to option can be used to dump\n\ to a file.\n\ "; diff --git a/src/smt/dump.h b/src/smt/dump.h index 7a2b0146b..3038d8996 100644 --- a/src/smt/dump.h +++ b/src/smt/dump.h @@ -27,24 +27,24 @@ class NodeCommand; #if defined(CVC5_DUMPING) && !defined(CVC5_MUZZLE) -class CVC4dumpstream +class CVC5dumpstream { public: - CVC4dumpstream() : d_os(nullptr) {} - CVC4dumpstream(std::ostream& os) : d_os(&os) {} + CVC5dumpstream() : d_os(nullptr) {} + CVC5dumpstream(std::ostream& os) : d_os(&os) {} - CVC4dumpstream& operator<<(const Command& c); + CVC5dumpstream& operator<<(const Command& c); /** A convenience function for dumping internal commands. * * Since Commands are now part of the public API, internal code should use * NodeCommands and this function (instead of the one above) to dump them. */ - CVC4dumpstream& operator<<(const NodeCommand& nc); + CVC5dumpstream& operator<<(const NodeCommand& nc); private: std::ostream* d_os; -}; /* class CVC4dumpstream */ +}; /* class CVC5dumpstream */ #else @@ -52,14 +52,14 @@ class CVC4dumpstream * Dummy implementation of the dump stream when dumping is disabled or the * build is muzzled. */ -class CVC4dumpstream +class CVC5dumpstream { public: - CVC4dumpstream() {} - CVC4dumpstream(std::ostream& os) {} - CVC4dumpstream& operator<<(const Command& c); - CVC4dumpstream& operator<<(const NodeCommand& nc); -}; /* class CVC4dumpstream */ + CVC5dumpstream() {} + CVC5dumpstream(std::ostream& os) {} + CVC5dumpstream& operator<<(const Command& c); + CVC5dumpstream& operator<<(const NodeCommand& nc); +}; /* class CVC5dumpstream */ #endif /* CVC5_DUMPING && !CVC5_MUZZLE */ @@ -67,19 +67,21 @@ class CVC4dumpstream class DumpC { public: - CVC4dumpstream operator()(const char* tag) { + CVC5dumpstream operator()(const char* tag) + { if(!d_tags.empty() && d_tags.find(std::string(tag)) != d_tags.end()) { - return CVC4dumpstream(getStream()); + return CVC5dumpstream(getStream()); } else { - return CVC4dumpstream(); + return CVC5dumpstream(); } } - CVC4dumpstream operator()(std::string tag) { + CVC5dumpstream operator()(std::string tag) + { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { - return CVC4dumpstream(getStream()); + return CVC5dumpstream(getStream()); } else { - return CVC4dumpstream(); + return CVC5dumpstream(); } } diff --git a/src/smt/logic_exception.h b/src/smt/logic_exception.h index 96963eb31..6e2f3f606 100644 --- a/src/smt/logic_exception.h +++ b/src/smt/logic_exception.h @@ -11,7 +11,7 @@ * **************************************************************************** * * An exception that is thrown when a feature is used outside - * the logic that CVC4 is currently using (for example, a quantifier + * the logic that cvc5 is currently using (for example, a quantifier * is used while running in a quantifier-free logic). */ diff --git a/src/smt/managed_ostreams.cpp b/src/smt/managed_ostreams.cpp index b0f9aef21..31bcc5f2f 100644 --- a/src/smt/managed_ostreams.cpp +++ b/src/smt/managed_ostreams.cpp @@ -77,7 +77,7 @@ void ManagedDumpOStream::initialize(std::ostream* outStream) { dumpGetStream.apply(outStream); #else /* CVC5_DUMPING */ throw OptionException( - "The dumping feature was disabled in this build of CVC4."); + "The dumping feature was disabled in this build of cvc5."); #endif /* CVC5_DUMPING */ } @@ -123,9 +123,9 @@ ManagedDiagnosticOutputChannel::~ManagedDiagnosticOutputChannel() { if(Warning.getStreamPointer() == getManagedOstream()){ Warning.setStream(&null_os); } - if (CVC4Message.getStreamPointer() == getManagedOstream()) + if (CVC5Message.getStreamPointer() == getManagedOstream()) { - CVC4Message.setStream(&null_os); + CVC5Message.setStream(&null_os); } if(Notice.getStreamPointer() == getManagedOstream()){ Notice.setStream(&null_os); diff --git a/src/smt/model.h b/src/smt/model.h index dd5d94d23..342a9f3b0 100644 --- a/src/smt/model.h +++ b/src/smt/model.h @@ -58,7 +58,7 @@ class Model { std::string getInputName() const { return d_inputName; } /** * Returns true if this model is guaranteed to be a model of the input - * formula. Notice that when CVC4 answers "unknown", it may have a model + * formula. Notice that when cvc5 answers "unknown", it may have a model * available for which this method returns false. In this case, this model is * only a candidate solution. */ diff --git a/src/smt/options_manager.cpp b/src/smt/options_manager.cpp index 2c732fa9d..68ee629dc 100644 --- a/src/smt/options_manager.cpp +++ b/src/smt/options_manager.cpp @@ -77,7 +77,7 @@ void OptionsManager::notifySetOption(const std::string& key) Trace.getStream() << expr::ExprSetDepth(depth); Notice.getStream() << expr::ExprSetDepth(depth); Chat.getStream() << expr::ExprSetDepth(depth); - CVC4Message.getStream() << expr::ExprSetDepth(depth); + CVC5Message.getStream() << expr::ExprSetDepth(depth); Warning.getStream() << expr::ExprSetDepth(depth); // intentionally exclude Dump stream from this list } @@ -88,7 +88,7 @@ void OptionsManager::notifySetOption(const std::string& key) Trace.getStream() << expr::ExprDag(dag); Notice.getStream() << expr::ExprDag(dag); Chat.getStream() << expr::ExprDag(dag); - CVC4Message.getStream() << expr::ExprDag(dag); + CVC5Message.getStream() << expr::ExprDag(dag); Warning.getStream() << expr::ExprDag(dag); Dump.getStream() << expr::ExprDag(dag); } @@ -104,7 +104,7 @@ void OptionsManager::notifySetOption(const std::string& key) Trace.getStream() << Command::printsuccess(value); Notice.getStream() << Command::printsuccess(value); Chat.getStream() << Command::printsuccess(value); - CVC4Message.getStream() << Command::printsuccess(value); + CVC5Message.getStream() << Command::printsuccess(value); Warning.getStream() << Command::printsuccess(value); *options::out() << Command::printsuccess(value); } diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index d3347b019..c877b7ce3 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -268,7 +268,7 @@ void SmtEngine::finishInit() everything.lock(); getPrinter().toStreamCmdComment( getOutputManager().getDumpOut(), - "CVC4 always dumps the most general, all-supported logic (below), as " + "cvc5 always dumps the most general, all-supported logic (below), as " "some internals might require the use of a logic more general than " "the input."); getPrinter().toStreamCmdSetBenchmarkLogic(getOutputManager().getDumpOut(), @@ -357,8 +357,7 @@ SmtEngine::~SmtEngine() // destroy the environment d_env.reset(nullptr); } catch(Exception& e) { - Warning() << "CVC4 threw an exception during cleanup." << endl - << e << endl; + Warning() << "cvc5 threw an exception during cleanup." << endl << e << endl; } } diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h index 5947367f2..151b6106b 100644 --- a/src/smt/smt_engine.h +++ b/src/smt/smt_engine.h @@ -269,7 +269,7 @@ class CVC4_EXPORT SmtEngine * block-models option is set to a mode other than "none". * * This adds an assertion to the assertion stack that blocks the current - * model based on the current options configured by CVC4. + * model based on the current options configured by cvc5. * * The return value has the same meaning as that of assertFormula. */ @@ -704,14 +704,14 @@ class CVC4_EXPORT SmtEngine /** * Get an unsatisfiable core (only if immediately preceded by an UNSAT or - * ENTAILED query). Only permitted if CVC4 was built with unsat-core support + * ENTAILED query). Only permitted if cvc5 was built with unsat-core support * and produce-unsat-cores is on. */ UnsatCore getUnsatCore(); /** * Get a refutation proof (only if immediately preceded by an UNSAT or - * ENTAILED query). Only permitted if CVC4 was built with proof support and + * ENTAILED query). Only permitted if cvc5 was built with proof support and * the proof option is on. */ std::string getProof(); @@ -750,9 +750,9 @@ class CVC4_EXPORT SmtEngine * limit, but it's deterministic so that reproducible results can be * obtained. Currently, it's based on the number of conflicts. * However, please note that the definition may change between different - * versions of CVC4 (as may the number of conflicts required, anyway), + * versions of cvc5 (as may the number of conflicts required, anyway), * and it might even be different between instances of the same version - * of CVC4 on different platforms. + * of cvc5 on different platforms. * * A cumulative and non-cumulative (per-call) resource limit can be * set at the same time. A call to setResourceLimit() with @@ -927,7 +927,7 @@ class CVC4_EXPORT SmtEngine /** * Internal method to get an unsatisfiable core (only if immediately preceded - * by an UNSAT or ENTAILED query). Only permitted if CVC4 was built with + * by an UNSAT or ENTAILED query). Only permitted if cvc5 was built with * unsat-core support and produce-unsat-cores is on. Does not dump the * command. */ @@ -983,7 +983,7 @@ class CVC4_EXPORT SmtEngine * return nullptr. * * This ensures that the underlying theory model of the SmtSolver maintained - * by this class is currently available, which means that CVC4 is producing + * by this class is currently available, which means that cvc5 is producing * models, and is in "SAT mode", otherwise a recoverable exception is thrown. * * @param c used for giving an error message to indicate the context diff --git a/src/smt/update_ostream.h b/src/smt/update_ostream.h index be2489a87..d81a507f8 100644 --- a/src/smt/update_ostream.h +++ b/src/smt/update_ostream.h @@ -95,8 +95,8 @@ class WarningOstreamUpdate : public OstreamUpdate { class MessageOstreamUpdate : public OstreamUpdate { public: - std::ostream& get() override { return CVC4Message.getStream(); } - void set(std::ostream* setTo) override { CVC4Message.setStream(setTo); } + std::ostream& get() override { return CVC5Message.getStream(); } + void set(std::ostream* setTo) override { CVC5Message.setStream(setTo); } }; /* class MessageOstreamUpdate */ class NoticeOstreamUpdate : public OstreamUpdate { diff --git a/src/theory/arith/approx_simplex.cpp b/src/theory/arith/approx_simplex.cpp index f299459f8..536a38739 100644 --- a/src/theory/arith/approx_simplex.cpp +++ b/src/theory/arith/approx_simplex.cpp @@ -629,8 +629,8 @@ ApproxGLPK::ApproxGLPK(const ArithVariables& var, if (s_verbosity >= 2) { - // CVC4Message() << v << " "; - // d_vars.printModel(v, CVC4Message()); + // CVC5Message() << v << " "; + // d_vars.printModel(v, CVC5Message()); } int type; @@ -764,8 +764,8 @@ ArithRatPairVec ApproxGLPK::heuristicOptCoeffs() const{ if (s_verbosity >= 2) { - CVC4Message() << v << " "; - d_vars.printModel(v, CVC4Message()); + CVC5Message() << v << " "; + d_vars.printModel(v, CVC5Message()); } int type; @@ -868,9 +868,9 @@ ArithRatPairVec ApproxGLPK::heuristicOptCoeffs() const{ if(len >= rowLengthReq){ if (s_verbosity >= 1) { - CVC4Message() << "high row " << r << " " << len << " " << avgRowLength + CVC5Message() << "high row " << r << " " << len << " " << avgRowLength << " " << dir << endl; - d_vars.printModel(r, CVC4Message()); + d_vars.printModel(r, CVC5Message()); } ret.push_back(ArithRatPair(r, Rational(dir))); } @@ -891,9 +891,9 @@ ArithRatPairVec ApproxGLPK::heuristicOptCoeffs() const{ if(ubScore >= .9 || lbScore >= .9){ if (s_verbosity >= 1) { - CVC4Message() << "high col " << c << " " << bc << " " << ubScore + CVC5Message() << "high col " << c << " " << bc << " " << ubScore << " " << lbScore << " " << dir << endl; - d_vars.printModel(c, CVC4Message()); + d_vars.printModel(c, CVC5Message()); } ret.push_back(ArithRatPair(c, Rational(c))); } @@ -1016,14 +1016,14 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const : glp_get_col_stat(prob, glpk_index); if (s_verbosity >= 2) { - CVC4Message() << "assignment " << vi << endl; + CVC5Message() << "assignment " << vi << endl; } bool useDefaultAssignment = false; switch(status){ case GLP_BS: - // CVC4Message() << "basic" << endl; + // CVC5Message() << "basic" << endl; newBasis.add(vi); useDefaultAssignment = true; break; @@ -1032,7 +1032,7 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const if(!mip){ if (s_verbosity >= 2) { - CVC4Message() << "non-basic lb" << endl; + CVC5Message() << "non-basic lb" << endl; } newValues.set(vi, d_vars.getLowerBound(vi)); }else{// intentionally fall through otherwise @@ -1043,7 +1043,7 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const if(!mip){ if (s_verbosity >= 2) { - CVC4Message() << "non-basic ub" << endl; + CVC5Message() << "non-basic ub" << endl; } newValues.set(vi, d_vars.getUpperBound(vi)); }else {// intentionally fall through otherwise @@ -1060,7 +1060,7 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const if(useDefaultAssignment){ if (s_verbosity >= 2) { - CVC4Message() << "non-basic other" << endl; + CVC5Message() << "non-basic other" << endl; } double newAssign; @@ -1077,7 +1077,7 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const && roughlyEqual(newAssign, d_vars.getLowerBound(vi).approx(SMALL_FIXED_DELTA))) { - // CVC4Message() << " to lb" << endl; + // CVC5Message() << " to lb" << endl; newValues.set(vi, d_vars.getLowerBound(vi)); } @@ -1087,20 +1087,20 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const d_vars.getUpperBound(vi).approx(SMALL_FIXED_DELTA))) { newValues.set(vi, d_vars.getUpperBound(vi)); - // CVC4Message() << " to ub" << endl; + // CVC5Message() << " to ub" << endl; } else { double rounded = round(newAssign); if (roughlyEqual(newAssign, rounded)) { - // CVC4Message() << "roughly equal " << rounded << " " << newAssign << + // CVC5Message() << "roughly equal " << rounded << " " << newAssign << // " " << oldAssign << endl; newAssign = rounded; } else { - // CVC4Message() << "not roughly equal " << rounded << " " << + // CVC5Message() << "not roughly equal " << rounded << " " << // newAssign << " " << oldAssign << endl; } @@ -1117,26 +1117,26 @@ ApproximateSimplex::Solution ApproxGLPK::extractSolution(bool mip) const if (roughlyEqual(newAssign, oldAssign.approx(SMALL_FIXED_DELTA))) { - // CVC4Message() << " to prev value" << newAssign << " " << oldAssign + // CVC5Message() << " to prev value" << newAssign << " " << oldAssign // << endl; proposal = d_vars.getAssignment(vi); } if (d_vars.strictlyLessThanLowerBound(vi, proposal)) { - // CVC4Message() << " round to lb " << d_vars.getLowerBound(vi) << + // CVC5Message() << " round to lb " << d_vars.getLowerBound(vi) << // endl; proposal = d_vars.getLowerBound(vi); } else if (d_vars.strictlyGreaterThanUpperBound(vi, proposal)) { - // CVC4Message() << " round to ub " << d_vars.getUpperBound(vi) << + // CVC5Message() << " round to ub " << d_vars.getUpperBound(vi) << // endl; proposal = d_vars.getUpperBound(vi); } else { - // CVC4Message() << " use proposal" << proposal << " " << oldAssign + // CVC5Message() << " use proposal" << proposal << " " << oldAssign // << endl; } newValues.set(vi, proposal); diff --git a/src/theory/arith/attempt_solution_simplex.cpp b/src/theory/arith/attempt_solution_simplex.cpp index d74385d3b..33b0e2e26 100644 --- a/src/theory/arith/attempt_solution_simplex.cpp +++ b/src/theory/arith/attempt_solution_simplex.cpp @@ -120,12 +120,12 @@ Result::Sat AttemptSolutionSDP::attempt(const ApproximateSimplex::Solution& sol) Assert(toAdd != ARITHVAR_SENTINEL); Trace("arith::forceNewBasis") << toRemove << " " << toAdd << endl; - // CVC4Message() << toRemove << " " << toAdd << endl; + // CVC5Message() << toRemove << " " << toAdd << endl; d_linEq.pivotAndUpdate(toRemove, toAdd, newValues[toRemove]); Trace("arith::forceNewBasis") << needsToBeAdded.size() << "to go" << endl; - // CVC4Message() << needsToBeAdded.size() << "to go" << endl; + // CVC5Message() << needsToBeAdded.size() << "to go" << endl; needsToBeAdded.remove(toAdd); bool conflict = processSignals(); diff --git a/src/theory/arith/constraint.cpp b/src/theory/arith/constraint.cpp index dcd699d88..fc2506f84 100644 --- a/src/theory/arith/constraint.cpp +++ b/src/theory/arith/constraint.cpp @@ -185,7 +185,7 @@ std::ostream& operator<<(std::ostream& o, const ConstraintCPVec& v){ return o; } -void Constraint::debugPrint() const { CVC4Message() << *this << endl; } +void Constraint::debugPrint() const { CVC5Message() << *this << endl; } ValueCollection::ValueCollection() : d_lowerBound(NullConstraint), diff --git a/src/theory/arith/dio_solver.cpp b/src/theory/arith/dio_solver.cpp index 1ad23f8ca..1cd092abc 100644 --- a/src/theory/arith/dio_solver.cpp +++ b/src/theory/arith/dio_solver.cpp @@ -776,8 +776,8 @@ void DioSolver::debugPrintTrail(DioSolver::TrailIndex i) const{ const SumPair& eq = d_trail[i].d_eq; const Polynomial& proof = d_trail[i].d_proof; - CVC4Message() << "d_trail[" << i << "].d_eq = " << eq.getNode() << endl; - CVC4Message() << "d_trail[" << i << "].d_proof = " << proof.getNode() << endl; + CVC5Message() << "d_trail[" << i << "].d_eq = " << eq.getNode() << endl; + CVC5Message() << "d_trail[" << i << "].d_proof = " << proof.getNode() << endl; } void DioSolver::subAndReduceCurrentFByIndex(DioSolver::SubIndex subIndex){ diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp index 13cc29a58..543cb9587 100644 --- a/src/theory/arith/dual_simplex.cpp +++ b/src/theory/arith/dual_simplex.cpp @@ -104,15 +104,15 @@ Result::Sat DualSimplexDecisionProcedure::dualFindModel(bool exactResult){ { if (result == Result::UNSAT) { - CVC4Message() << "diff order found unsat" << endl; + CVC5Message() << "diff order found unsat" << endl; } else if (d_errorSet.errorEmpty()) { - CVC4Message() << "diff order found model" << endl; + CVC5Message() << "diff order found model" << endl; } else { - CVC4Message() << "diff order missed" << endl; + CVC5Message() << "diff order missed" << endl; } } } @@ -136,15 +136,15 @@ Result::Sat DualSimplexDecisionProcedure::dualFindModel(bool exactResult){ { if (result == Result::UNSAT) { - CVC4Message() << "restricted var order found unsat" << endl; + CVC5Message() << "restricted var order found unsat" << endl; } else if (d_errorSet.errorEmpty()) { - CVC4Message() << "restricted var order found model" << endl; + CVC5Message() << "restricted var order found model" << endl; } else { - CVC4Message() << "restricted var order missed" << endl; + CVC5Message() << "restricted var order missed" << endl; } } } diff --git a/src/theory/arith/fc_simplex.cpp b/src/theory/arith/fc_simplex.cpp index de13f4eb9..49c17172f 100644 --- a/src/theory/arith/fc_simplex.cpp +++ b/src/theory/arith/fc_simplex.cpp @@ -78,9 +78,9 @@ Result::Sat FCSimplexDecisionProcedure::findModel(bool exactResult){ if(d_errorSet.errorEmpty() && !d_errorSet.moreSignals()){ Debug("arith::findModel") << "fcFindModel("<< instance <<") trivial" << endl; Assert(d_conflictVariables.empty()); - //if (verbose) + // if (verbose) //{ - // CVC4Message() << "fcFindModel(" << instance << ") trivial" << endl; + // CVC5Message() << "fcFindModel(" << instance << ") trivial" << endl; //} return Result::SAT; } @@ -95,15 +95,15 @@ Result::Sat FCSimplexDecisionProcedure::findModel(bool exactResult){ d_conflictVariables.purge(); if (verbose) { - CVC4Message() << "fcFindModel(" << instance << ") early conflict" << endl; + CVC5Message() << "fcFindModel(" << instance << ") early conflict" << endl; } Debug("arith::findModel") << "fcFindModel("<< instance <<") early conflict" << endl; Assert(d_conflictVariables.empty()); return Result::UNSAT; }else if(d_errorSet.errorEmpty()){ - //if (verbose) + // if (verbose) //{ - // CVC4Message() << "fcFindModel(" << instance << ") fixed itself" << endl; + // CVC5Message() << "fcFindModel(" << instance << ") fixed itself" << endl; //} Debug("arith::findModel") << "fcFindModel("<< instance <<") fixed itself" << endl; if (verbose) Assert(!d_errorSet.moreSignals()); @@ -133,25 +133,25 @@ Result::Sat FCSimplexDecisionProcedure::findModel(bool exactResult){ ++(d_statistics.d_fcFoundUnsat); if (verbose) { - CVC4Message() << "fc found unsat"; + CVC5Message() << "fc found unsat"; } }else if(d_errorSet.errorEmpty()){ ++(d_statistics.d_fcFoundSat); if (verbose) { - CVC4Message() << "fc found model"; + CVC5Message() << "fc found model"; } }else{ ++(d_statistics.d_fcMissed); if (verbose) { - CVC4Message() << "fc missed"; + CVC5Message() << "fc missed"; } } } if (verbose) { - CVC4Message() << "(" << instance << ") pivots " << d_pivots << endl; + CVC5Message() << "(" << instance << ") pivots " << d_pivots << endl; } Assert(!d_errorSet.moreSignals()); @@ -523,7 +523,7 @@ void FCSimplexDecisionProcedure::updateAndSignal(const UpdateInfo& selected, Wit } if(degenerate(w) && selected.describesPivot()){ ArithVar leaving = selected.leaving(); - CVC4Message() << "degenerate " << leaving << ", atBounds " + CVC5Message() << "degenerate " << leaving << ", atBounds " << d_linEq.basicsAtBounds(selected) << ", len " << d_tableau.basicRowLength(leaving) << ", bc " << d_linEq.debugBasicAtBoundCount(leaving) << endl; @@ -574,8 +574,8 @@ void FCSimplexDecisionProcedure::updateAndSignal(const UpdateInfo& selected, Wit if (verbose) { - CVC4Message() << "conflict variable " << selected << endl; - CVC4Message() << ss.str(); + CVC5Message() << "conflict variable " << selected << endl; + CVC5Message() << ss.str(); } if(Debug.isOn("error")){ d_errorSet.debugPrint(Debug("error")); } @@ -791,7 +791,7 @@ Result::Sat FCSimplexDecisionProcedure::dualLike(){ if (verbose) { - debugDualLike(w, CVC4Message(), instance, prevFocusSize, prevErrorSize); + debugDualLike(w, CVC5Message(), instance, prevFocusSize, prevErrorSize); } Assert(debugDualLike( w, Debug("dualLike"), instance, prevFocusSize, prevErrorSize)); diff --git a/src/theory/arith/kinds b/src/theory/arith/kinds index f9f88cddf..e1eda5d85 100644 --- a/src/theory/arith/kinds +++ b/src/theory/arith/kinds @@ -90,7 +90,7 @@ parameterized INDEXED_ROOT_PREDICATE INDEXED_ROOT_PREDICATE_OP 2 "indexed root p operator IS_INTEGER 1 "term-is-integer predicate (parameter is a real-sorted term)" operator TO_INTEGER 1 "convert term to integer by the floor function (parameter is a real-sorted term)" -operator TO_REAL 1 "cast term to real (parameter is an integer-sorted term; this is a no-op in CVC4, as integer is a subtype of real)" +operator TO_REAL 1 "cast term to real (parameter is an integer-sorted term; this is a no-op in cvc5, as integer is a subtype of real)" # CAST_TO_REAL is added to distinguish between integers casted to reals internally, and # integers casted to reals or using the API \ diff --git a/src/theory/arith/linear_equality.cpp b/src/theory/arith/linear_equality.cpp index 57dbdfc82..82cc02815 100644 --- a/src/theory/arith/linear_equality.cpp +++ b/src/theory/arith/linear_equality.cpp @@ -167,12 +167,12 @@ void LinearEqualityModule::forceNewBasis(const DenseSet& newBasis){ Assert(toAdd != ARITHVAR_SENTINEL); Trace("arith::forceNewBasis") << toRemove << " " << toAdd << endl; - CVC4Message() << toRemove << " " << toAdd << endl; + CVC5Message() << toRemove << " " << toAdd << endl; d_tableau.pivot(toRemove, toAdd, d_trackCallback); d_basicVariableUpdates(toAdd); Trace("arith::forceNewBasis") << needsToBeAdded.size() << "to go" << endl; - CVC4Message() << needsToBeAdded.size() << "to go" << endl; + CVC5Message() << needsToBeAdded.size() << "to go" << endl; needsToBeAdded.remove(toAdd); } } diff --git a/src/theory/arith/nl/cad/constraints.h b/src/theory/arith/nl/cad/constraints.h index f8a12065f..4321800f2 100644 --- a/src/theory/arith/nl/cad/constraints.h +++ b/src/theory/arith/nl/cad/constraints.h @@ -75,7 +75,7 @@ class Constraints ConstraintVector d_constraints; /** - * A mapping from CVC4 variables to poly variables. + * A mapping from cvc5 variables to poly variables. */ VariableMapper d_varMapper; diff --git a/src/theory/arith/nl/cad/proof_generator.cpp b/src/theory/arith/nl/cad/proof_generator.cpp index 5c4391d68..b0d785b2a 100644 --- a/src/theory/arith/nl/cad/proof_generator.cpp +++ b/src/theory/arith/nl/cad/proof_generator.cpp @@ -69,7 +69,7 @@ std::pair getRootIDs( * @param zero A node representing Rational(0) * @param k The index of the root (starting with 1) * @param poly The polynomial whose root shall be considered - * @param vm A variable mapper from CVC4 to libpoly variables + * @param vm A variable mapper from cvc5 to libpoly variables */ Node mkIRP(const Node& var, Kind rel, diff --git a/src/theory/arith/nl/cad/proof_generator.h b/src/theory/arith/nl/cad/proof_generator.h index 27a711f75..b493455a6 100644 --- a/src/theory/arith/nl/cad/proof_generator.h +++ b/src/theory/arith/nl/cad/proof_generator.h @@ -89,7 +89,7 @@ class CADProofGenerator * and the origin of this is constraint. * * @param var The variable for which the interval is excluded - * @param vm A variable mapper between CVC4 and libpoly variables + * @param vm A variable mapper between cvc5 and libpoly variables * @param p The polynomial of the constraint * @param a The current partial assignment * @param sc The sign condition of the constraint @@ -113,7 +113,7 @@ class CADProofGenerator * @param i The concrete interval that is excluded * @param a The current partial assignment * @param s The sample point that is refuted for var - * @param vm A variable mapper between CVC4 and libpoly variables + * @param vm A variable mapper between cvc5 and libpoly variables */ std::vector constructCell(Node var, const CACInterval& i, diff --git a/src/theory/arith/nl/icp/icp_solver.cpp b/src/theory/arith/nl/icp/icp_solver.cpp index ed50b85cf..6e96cfe7b 100644 --- a/src/theory/arith/nl/icp/icp_solver.cpp +++ b/src/theory/arith/nl/icp/icp_solver.cpp @@ -371,12 +371,12 @@ void ICPSolver::check() void ICPSolver::reset(const std::vector& assertions) { - Unimplemented() << "ICPSolver requires CVC4 to be configured with LibPoly"; + Unimplemented() << "ICPSolver requires cvc5 to be configured with LibPoly"; } void ICPSolver::check() { - Unimplemented() << "ICPSolver requires CVC4 to be configured with LibPoly"; + Unimplemented() << "ICPSolver requires cvc5 to be configured with LibPoly"; } #endif /* CVC5_POLY_IMP */ diff --git a/src/theory/arith/nl/poly_conversion.cpp b/src/theory/arith/nl/poly_conversion.cpp index d80dacd78..e5fa31aad 100644 --- a/src/theory/arith/nl/poly_conversion.cpp +++ b/src/theory/arith/nl/poly_conversion.cpp @@ -218,7 +218,7 @@ struct CollectMonomialData { CollectMonomialData(VariableMapper& v) : d_vm(v) {} - /** Mapper from poly variables to CVC4 variables */ + /** Mapper from poly variables to cvc5 variables */ VariableMapper& d_vm; /** Collections of the monomial terms */ std::vector d_terms; diff --git a/src/theory/arith/nl/poly_conversion.h b/src/theory/arith/nl/poly_conversion.h index 3213df0ce..db64320d5 100644 --- a/src/theory/arith/nl/poly_conversion.h +++ b/src/theory/arith/nl/poly_conversion.h @@ -37,17 +37,17 @@ class BoundInference; namespace nl { -/** Bijective mapping between CVC4 variables and poly variables. */ +/** Bijective mapping between cvc5 variables and poly variables. */ struct VariableMapper { - /** A mapping from CVC4 variables to poly variables. */ + /** A mapping from cvc5 variables to poly variables. */ std::map mVarCVCpoly; - /** A mapping from poly variables to CVC4 variables. */ + /** A mapping from poly variables to cvc5 variables. */ std::map mVarpolyCVC; /** Retrieves the according poly variable. */ poly::Variable operator()(const cvc5::Node& n); - /** Retrieves the according CVC4 variable. */ + /** Retrieves the according cvc5 variable. */ cvc5::Node operator()(const poly::Variable& n); }; diff --git a/src/theory/arith/soi_simplex.cpp b/src/theory/arith/soi_simplex.cpp index 1b22bc81c..fc2ed8fa9 100644 --- a/src/theory/arith/soi_simplex.cpp +++ b/src/theory/arith/soi_simplex.cpp @@ -97,7 +97,7 @@ Result::Sat SumOfInfeasibilitiesSPD::findModel(bool exactResult){ d_conflictVariables.purge(); if (verbose) { - CVC4Message() << "fcFindModel(" << instance << ") early conflict" << endl; + CVC5Message() << "fcFindModel(" << instance << ") early conflict" << endl; } Debug("soi::findModel") << "fcFindModel("<< instance <<") early conflict" << endl; Assert(d_conflictVariables.empty()); @@ -131,25 +131,25 @@ Result::Sat SumOfInfeasibilitiesSPD::findModel(bool exactResult){ ++(d_statistics.d_soiFoundUnsat); if (verbose) { - CVC4Message() << "fc found unsat"; + CVC5Message() << "fc found unsat"; } }else if(d_errorSet.errorEmpty()){ ++(d_statistics.d_soiFoundSat); if (verbose) { - CVC4Message() << "fc found model"; + CVC5Message() << "fc found model"; } }else{ ++(d_statistics.d_soiMissed); if (verbose) { - CVC4Message() << "fc missed"; + CVC5Message() << "fc missed"; } } } if (verbose) { - CVC4Message() << "(" << instance << ") pivots " << d_pivots << endl; + CVC5Message() << "(" << instance << ") pivots " << d_pivots << endl; } Assert(!d_errorSet.moreSignals()); @@ -360,7 +360,7 @@ void SumOfInfeasibilitiesSPD::updateAndSignal(const UpdateInfo& selected, Witnes } if(degenerate(w) && selected.describesPivot()){ ArithVar leaving = selected.leaving(); - CVC4Message() << "degenerate " << leaving << ", atBounds " + CVC5Message() << "degenerate " << leaving << ", atBounds " << d_linEq.basicsAtBounds(selected) << ", len " << d_tableau.basicRowLength(leaving) << ", bc " << d_linEq.debugBasicAtBoundCount(leaving) << endl; @@ -411,8 +411,8 @@ void SumOfInfeasibilitiesSPD::updateAndSignal(const UpdateInfo& selected, Witnes if (verbose) { - CVC4Message() << "conflict variable " << selected << endl; - CVC4Message() << ss.str(); + CVC5Message() << "conflict variable " << selected << endl; + CVC5Message() << ss.str(); } if(Debug.isOn("error")){ d_errorSet.debugPrint(Debug("error")); } @@ -971,7 +971,7 @@ Result::Sat SumOfInfeasibilitiesSPD::sumOfInfeasibilities(){ if (verbose) { - debugSOI(w, CVC4Message(), instance); + debugSOI(w, CVC5Message(), instance); } Assert(debugSOI(w, Debug("dualLike"), instance)); } diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp index e7ff27413..4687922a0 100644 --- a/src/theory/arith/theory_arith_private.cpp +++ b/src/theory/arith/theory_arith_private.cpp @@ -3103,7 +3103,7 @@ bool TheoryArithPrivate::solveRealRelaxation(Theory::Effort effortLevel){ // mipRes = approxSolver->solveMIP(true); // } // d_errorSet.reduceToSignals(); -// //CVC4Message() << "here" << endl; +// //CVC5Message() << "here" << endl; // if(mipRes == ApproximateSimplex::ApproxSat){ // mipSolution = approxSolver->extractMIP(); // d_qflraStatus = d_attemptSolSimplex.attempt(mipSolution); @@ -3121,7 +3121,7 @@ bool TheoryArithPrivate::solveRealRelaxation(Theory::Effort effortLevel){ // options::arithStandardCheckVarOrderPivots.set(pass2Limit); // if(d_qflraStatus != Result::UNSAT){ d_qflraStatus = // simplex.findModel(false); } -// //CVC4Message() << "done" << endl; +// //CVC5Message() << "done" << endl; // } // break; // case ApproximateSimplex::ApproxUnsat: @@ -3147,13 +3147,13 @@ bool TheoryArithPrivate::solveRealRelaxation(Theory::Effort effortLevel){ // }else{ // if(d_qflraStatus == Result::SAT_UNKNOWN){ -// //CVC4Message() << "got sat unknown" << endl; +// //CVC5Message() << "got sat unknown" << endl; // vector toCut = cutAllBounded(); // if(toCut.size() > 0){ // //branchVector(toCut); // emmittedConflictOrSplit = true; // }else{ -// //CVC4Message() << "splitting" << endl; +// //CVC5Message() << "splitting" << endl; // d_qflraStatus = simplex.findModel(noPivotLimit); // } diff --git a/src/theory/builtin/kinds b/src/theory/builtin/kinds index e2f69f19d..dffe0baf3 100644 --- a/src/theory/builtin/kinds +++ b/src/theory/builtin/kinds @@ -1,7 +1,7 @@ # kinds [for builtin theory] -*- sh -*- # # This "kinds" file is written in a domain-specific language for -# declaring CVC4 kinds. Comments are marked with #, as this line is. +# declaring cvc5 kinds. Comments are marked with #, as this line is. # # The first non-blank, non-comment line in this file must be a theory # declaration: diff --git a/src/theory/datatypes/datatypes_rewriter.h b/src/theory/datatypes/datatypes_rewriter.h index b7a62be5e..3b9b14fb7 100644 --- a/src/theory/datatypes/datatypes_rewriter.h +++ b/src/theory/datatypes/datatypes_rewriter.h @@ -74,7 +74,7 @@ class DatatypesRewriter : public TheoryRewriter * Stream := cons( head : Int, tail : Stream ) * The stream 1,0,1,0,1,0... when written in mu-notation is the term: * mu x. cons( 1, mu y. cons( 0, x ) ) - * This is represented in CVC4 by the Node: + * This is represented in cvc5 by the Node: * cons( 1, cons( 0, c[1] ) ) * where c[1] is a uninterpreted constant datatype with Debruijn index 1, * indicating that c[1] is nested underneath 1 level on the path to the diff --git a/src/theory/fp/fp_converter.cpp b/src/theory/fp/fp_converter.cpp index a62fd4894..a2306cc6a 100644 --- a/src/theory/fp/fp_converter.cpp +++ b/src/theory/fp/fp_converter.cpp @@ -633,7 +633,7 @@ symbolicProposition symbolicBitVector::operator>( } /*** Type conversion ***/ -// CVC4 nodes make no distinction between signed and unsigned, thus ... +// cvc5 nodes make no distinction between signed and unsigned, thus ... template symbolicBitVector symbolicBitVector::toSigned(void) const { diff --git a/src/theory/fp/fp_converter.h b/src/theory/fp/fp_converter.h index 4225be84a..1db635cda 100644 --- a/src/theory/fp/fp_converter.h +++ b/src/theory/fp/fp_converter.h @@ -38,7 +38,7 @@ #endif #ifdef CVC5_SYM_SYMBOLIC_EVAL -// This allows debugging of the CVC4 symbolic back-end. +// This allows debugging of the cvc5 symbolic back-end. // By enabling this and disabling constant folding in the rewriter, // SMT files that have operations on constants will be evaluated // during the encoding step, which means that the expressions @@ -54,7 +54,7 @@ namespace fp { * This is a symfpu symbolic "back-end". It allows the library to be used to * construct bit-vector expressions that compute floating-point operations. * This is effectively the glue between symfpu's notion of "signed bit-vector" - * and CVC4's node. + * and cvc5's node. */ namespace symfpuSymbolic { @@ -103,7 +103,7 @@ typedef traits::bwt bwt; class nodeWrapper : public Node { protected: -/* CVC5_SYM_SYMBOLIC_EVAL is for debugging CVC4 symbolic back-end issues. +/* CVC5_SYM_SYMBOLIC_EVAL is for debugging cvc5 symbolic back-end issues. * Enable this and disabling constant folding will mean that operations * that are input with constant args are 'folded' using the symbolic encoding * allowing them to be traced via GDB. @@ -255,7 +255,7 @@ class symbolicBitVector : public nodeWrapper symbolicProposition operator>(const symbolicBitVector &op) const; /*** Type conversion ***/ - // CVC4 nodes make no distinction between signed and unsigned, thus these are + // cvc5 nodes make no distinction between signed and unsigned, thus these are // trivial symbolicBitVector toSigned(void) const; symbolicBitVector toUnsigned(void) const; diff --git a/src/theory/incomplete_id.h b/src/theory/incomplete_id.h index 1e917c942..c166d0c0a 100644 --- a/src/theory/incomplete_id.h +++ b/src/theory/incomplete_id.h @@ -24,7 +24,7 @@ namespace cvc5 { namespace theory { /** - * Reasons for incompleteness in CVC4. + * Reasons for incompleteness in cvc5. */ enum class IncompleteId { diff --git a/src/theory/interrupted.h b/src/theory/interrupted.h index e85917e00..bb099114d 100644 --- a/src/theory/interrupted.h +++ b/src/theory/interrupted.h @@ -22,7 +22,7 @@ * Theory, the Theory should rethrow the same exception (via "throw;" * in the exception block) rather than return, as the Interrupted * instance might contain additional information needed for the - * proper management of CVC4 components. + * proper management of cvc5 components. */ #include "cvc5_private.h" diff --git a/src/theory/logic_info.h b/src/theory/logic_info.h index fa06e93a4..9d18d5145 100644 --- a/src/theory/logic_info.h +++ b/src/theory/logic_info.h @@ -30,12 +30,12 @@ namespace cvc5 { /** * A LogicInfo instance describes a collection of theory modules and some * basic configuration about them. Conceptually, it provides a background - * context for all operations in CVC4. Typically, when CVC4's SmtEngine + * context for all operations in cvc5. Typically, when cvc5's SmtEngine * is created, it is issued a setLogic() command indicating features of the * assertions and queries to follow---for example, whether quantifiers are * used, whether integers or reals (or both) will be used, etc. * - * Most places in CVC4 will only ever need to access a const reference to an + * Most places in cvc5 will only ever need to access a const reference to an * instance of this class. Such an instance is generally set by the SmtEngine * when setLogic() is called. However, mutating member functions are also * provided by this class so that it can be used as a more general mechanism diff --git a/src/theory/mkrewriter b/src/theory/mkrewriter index c27ff0fb1..baef55679 100755 --- a/src/theory/mkrewriter +++ b/src/theory/mkrewriter @@ -1,8 +1,8 @@ #!/usr/bin/env bash # # mkrewriter -# Morgan Deters for CVC4 -# Copyright (c) 2010-2013 The CVC4 Project +# Morgan Deters for cvc5 +# Copyright (c) 2010-2013 The cvc5 Project # # The purpose of this script is to create rewriter_tables.h from a template # and a list of theory kinds. diff --git a/src/theory/mktheorytraits b/src/theory/mktheorytraits index b07b1b46a..4312da406 100755 --- a/src/theory/mktheorytraits +++ b/src/theory/mktheorytraits @@ -1,8 +1,8 @@ #!/usr/bin/env bash # # mktheorytraits -# Morgan Deters for CVC4 -# Copyright (c) 2010-2013 The CVC4 Project +# Morgan Deters for cvc5 +# Copyright (c) 2010-2013 The cvc5 Project # # The purpose of this script is to create theory_traits.h from a template # and a list of theory kinds. diff --git a/src/theory/quantifiers/ematching/inst_match_generator.h b/src/theory/quantifiers/ematching/inst_match_generator.h index 8634890b4..684751292 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator.h +++ b/src/theory/quantifiers/ematching/inst_match_generator.h @@ -31,77 +31,78 @@ namespace inst { class CandidateGenerator; /** InstMatchGenerator class -* -* This is the default generator class for non-simple single triggers, that is, -* triggers composed of a single term with nested term applications. -* For example, { f( y, f( x, a ) ) } and { f( g( x ), a ) } are non-simple -* triggers. -* -* Handling non-simple triggers is done by constructing a linked list of -* InstMatchGenerator classes (see mkInstMatchGenerator), where each -* InstMatchGenerator has a "d_next" pointer. If d_next is NULL, -* then this is the end of the InstMatchGenerator and the last -* InstMatchGenerator is responsible for finalizing the instantiation. -* -* For (EX1), for the trigger f( y, f( x, a ) ), we construct the linked list: -* -* [ f( y, f( x, a ) ) ] -> [ f( x, a ) ] -> NULL -* -* In a call to getNextMatch, -* if we match against a ground term f( b, c ), then the first InstMatchGenerator -* in this list binds y to b, and tells the InstMatchGenerator [ f( x, a ) ] to -* match f-applications in the equivalence class of c. -* -* CVC4 employs techniques that ensure that the number of instantiations -* is worst-case polynomial wrt the number of ground terms. -* Consider the axiom/pattern/context (EX2) : -* -* axiom : forall x1 x2 x3 x4. F[ x1...x4 ] -* -* trigger : P( f( x1 ), f( x2 ), f( x3 ), f( x4 ) ) -* -* ground context : ~P( a, a, a, a ), a = f( c_1 ) = ... = f( c_100 ) -* -* If E-matching were applied exhaustively, then x1, x2, x3, x4 would be -* instantiated with all combinations of c_1, ... c_100, giving 100^4 -* instantiations. -* -* Instead, we enforce that at most 1 instantiation is produced for a -* ( pattern, ground term ) pair per round. Meaning, only one instantiation is -* generated when matching P( a, a, a, a ) against the generator -* [P( f( x1 ), f( x2 ), f( x3 ), f( x4 ) )]. For details, see Section 3 of -* Reynolds, Vampire 2016. -* -* To enforce these policies, we use a flag "d_active_add" which dictates the -* behavior of the last element in the linked list. If d_active_add is -* true -> a call to getNextMatch(...) returns 1 only if adding the -* instantiation via a call to IMGenerator::sendInstantiation(...) -* successfully enqueues a lemma via a call to -* Instantiate::addInstantiation(...). This call may fail e.g. if we -* have already added the instantiation, or the instantiation is -* entailed. -* false -> a call to getNextMatch(...) returns 1 whenever an m is -* constructed, where typically the caller would use m. -* This is important since a return value >0 signals that the current matched -* terms should be flushed. Consider the above example (EX1), where -* [ f(y,f(x,a)) ] is being matched against f(b,c), -* [ f(x,a) ] is being matched against f(d,a) where c=f(d,a) -* A successfully added instantiation { x->d, y->b } here signals we should -* not produce further instantiations that match f(y,f(x,a)) with f(b,c). -* -* A number of special cases of triggers are covered by this generator (see -* implementation of initialize), including : -* Literal triggers, e.g. x >= a, ~x = y -* Selector triggers, e.g. head( x ) -* Triggers with invertible subterms, e.g. f( x+1 ) -* Variable triggers, e.g. x -* -* All triggers above can be in the context of an equality, e.g. -* { f( y, f( x, a ) ) = b } is a trigger that matches f( y, f( x, a ) ) to -* ground terms in the equivalence class of b. -* { ~f( y, f( x, a ) ) = b } is a trigger that matches f( y, f( x, a ) ) to any -* ground terms not in the equivalence class of b. -*/ + * + * This is the default generator class for non-simple single triggers, that is, + * triggers composed of a single term with nested term applications. + * For example, { f( y, f( x, a ) ) } and { f( g( x ), a ) } are non-simple + * triggers. + * + * Handling non-simple triggers is done by constructing a linked list of + * InstMatchGenerator classes (see mkInstMatchGenerator), where each + * InstMatchGenerator has a "d_next" pointer. If d_next is NULL, + * then this is the end of the InstMatchGenerator and the last + * InstMatchGenerator is responsible for finalizing the instantiation. + * + * For (EX1), for the trigger f( y, f( x, a ) ), we construct the linked list: + * + * [ f( y, f( x, a ) ) ] -> [ f( x, a ) ] -> NULL + * + * In a call to getNextMatch, + * if we match against a ground term f( b, c ), then the first + * InstMatchGenerator in this list binds y to b, and tells the + * InstMatchGenerator [ f( x, a ) ] to match f-applications in the equivalence + * class of c. + * + * cvc5 employs techniques that ensure that the number of instantiations + * is worst-case polynomial wrt the number of ground terms. + * Consider the axiom/pattern/context (EX2) : + * + * axiom : forall x1 x2 x3 x4. F[ x1...x4 ] + * + * trigger : P( f( x1 ), f( x2 ), f( x3 ), f( x4 ) ) + * + * ground context : ~P( a, a, a, a ), a = f( c_1 ) = ... = f( c_100 ) + * + * If E-matching were applied exhaustively, then x1, x2, x3, x4 would be + * instantiated with all combinations of c_1, ... c_100, giving 100^4 + * instantiations. + * + * Instead, we enforce that at most 1 instantiation is produced for a + * ( pattern, ground term ) pair per round. Meaning, only one instantiation is + * generated when matching P( a, a, a, a ) against the generator + * [P( f( x1 ), f( x2 ), f( x3 ), f( x4 ) )]. For details, see Section 3 of + * Reynolds, Vampire 2016. + * + * To enforce these policies, we use a flag "d_active_add" which dictates the + * behavior of the last element in the linked list. If d_active_add is + * true -> a call to getNextMatch(...) returns 1 only if adding the + * instantiation via a call to IMGenerator::sendInstantiation(...) + * successfully enqueues a lemma via a call to + * Instantiate::addInstantiation(...). This call may fail e.g. if we + * have already added the instantiation, or the instantiation is + * entailed. + * false -> a call to getNextMatch(...) returns 1 whenever an m is + * constructed, where typically the caller would use m. + * This is important since a return value >0 signals that the current matched + * terms should be flushed. Consider the above example (EX1), where + * [ f(y,f(x,a)) ] is being matched against f(b,c), + * [ f(x,a) ] is being matched against f(d,a) where c=f(d,a) + * A successfully added instantiation { x->d, y->b } here signals we should + * not produce further instantiations that match f(y,f(x,a)) with f(b,c). + * + * A number of special cases of triggers are covered by this generator (see + * implementation of initialize), including : + * Literal triggers, e.g. x >= a, ~x = y + * Selector triggers, e.g. head( x ) + * Triggers with invertible subterms, e.g. f( x+1 ) + * Variable triggers, e.g. x + * + * All triggers above can be in the context of an equality, e.g. + * { f( y, f( x, a ) ) = b } is a trigger that matches f( y, f( x, a ) ) to + * ground terms in the equivalence class of b. + * { ~f( y, f( x, a ) ) = b } is a trigger that matches f( y, f( x, a ) ) to any + * ground terms not in the equivalence class of b. + */ class InstMatchGenerator : public IMGenerator { public: /** destructor */ diff --git a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h index e15d476a3..afe43a604 100644 --- a/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h +++ b/src/theory/quantifiers/ematching/inst_match_generator_multi_linear.h @@ -37,7 +37,7 @@ namespace inst { * InstMatchGeneratorMultiLinear at the head and a list of trailing * InstMatchGenerators. * - * CVC4 employs techniques that ensure that the number of instantiations + * cvc5 employs techniques that ensure that the number of instantiations * is worst-case polynomial wrt the number of ground terms, where this class * lifts this policy to multi-triggers. In particular consider * diff --git a/src/theory/quantifiers/ematching/trigger.h b/src/theory/quantifiers/ematching/trigger.h index dbfae5382..172e93c12 100644 --- a/src/theory/quantifiers/ematching/trigger.h +++ b/src/theory/quantifiers/ematching/trigger.h @@ -39,66 +39,62 @@ namespace inst { class IMGenerator; class InstMatchGenerator; /** A collection of nodes representing a trigger. -* -* This class encapsulates all implementations of E-matching in CVC4. -* Its primary use is as a utility of the quantifiers module InstantiationEngine -* (see theory/quantifiers/ematching/instantiation_engine.h) which uses Trigger to make -* appropriate calls to Instantiate::addInstantiation(...) -* (see theory/instantiate.h) for the instantiate utility of the quantifiers -* engine (d_quantEngine) associated with this trigger. These calls -* queue instantiation lemmas to the output channel of TheoryQuantifiers during -* a full effort check. -* -* Concretely, a Trigger* t is used in the following way during a full effort -* check. Assume that t is associated with quantified formula q (see field d_f). -* We call : -* -* // setup initial information -* t->resetInstantiationRound(); -* // will produce instantiations based on matching with all terms -* t->reset( Node::null() ); -* // add all instantiations based on E-matching with this trigger and the -* // current context -* t->addInstantiations(); -* -* This will result in (a set of) calls to -* Instantiate::addInstantiation(q, m1)...Instantiate::addInstantiation(q, mn), -* where m1...mn are InstMatch objects. These calls add the corresponding -* instantiation lemma for (q,mi) on the output channel associated with -* d_quantEngine. -* -* The Trigger class is wrapper around an underlying IMGenerator class, which -* implements various forms of E-matching for its set of nodes (d_nodes), which -* is refered to in the literature as a "trigger". A trigger is a set of terms -* whose free variables are the bound variables of a quantified formula q, -* and that is used to guide instantiations for q (for example, see "Efficient -* E-Matching for SMT Solvers" by de Moura et al). -* -* For example of an instantiation lemma produced by E-matching : -* -* quantified formula : forall x. P( x ) -* trigger : P( x ) -* ground context : ~P( a ) -* -* Then E-matching matches P( x ) and P( a ), resulting in the match { x -> a } -* which is used to generate the instantiation lemma : -* (forall x. P( x )) => P( a ) -* -* Terms that are provided as input to a Trigger class via mkTrigger -* should be in "instantiation constant form", see TermUtil::getInstConstantNode. -* Say we have quantified formula q whose AST is the Node -* (FORALL -* (BOUND_VAR_LIST x) -* (NOT (P x)) -* (INST_PATTERN_LIST (INST_PATTERN (P x)))) -* then TermUtil::getInstConstantNode( q, (P x) ) = (P IC) where -* IC = TermUtil::getInstantiationConstant( q, i ). -* Trigger expects as input (P IC) to represent the Trigger (P x). This form -* ensures that references to bound variables are unique to quantified formulas, -* which is required to ensure the correctness of instantiation lemmas we -* generate. -* -*/ + * + * This class encapsulates all implementations of E-matching in cvc5. + * Its primary use is as a utility of the quantifiers module InstantiationEngine + * (see theory/quantifiers/ematching/instantiation_engine.h) which uses Trigger + * to make appropriate calls to Instantiate::addInstantiation(...) (see + * theory/instantiate.h) for the instantiate utility of the quantifiers engine + * (d_quantEngine) associated with this trigger. These calls queue + * instantiation lemmas to the output channel of TheoryQuantifiers during a full + * effort check. + * + * Concretely, a Trigger* t is used in the following way during a full effort + * check. Assume that t is associated with quantified formula q (see field d_f). + * We call : + * + * // setup initial information + * t->resetInstantiationRound(); + * // will produce instantiations based on matching with all terms + * t->reset( Node::null() ); + * // add all instantiations based on E-matching with this trigger and the + * // current context + * t->addInstantiations(); + * + * This will result in (a set of) calls to + * Instantiate::addInstantiation(q, m1)...Instantiate::addInstantiation(q, mn), + * where m1...mn are InstMatch objects. These calls add the corresponding + * instantiation lemma for (q,mi) on the output channel associated with + * d_quantEngine. + * + * The Trigger class is wrapper around an underlying IMGenerator class, which + * implements various forms of E-matching for its set of nodes (d_nodes), which + * is refered to in the literature as a "trigger". A trigger is a set of terms + * whose free variables are the bound variables of a quantified formula q, + * and that is used to guide instantiations for q (for example, see "Efficient + * E-Matching for SMT Solvers" by de Moura et al). + * + * For example of an instantiation lemma produced by E-matching : + * + * quantified formula : forall x. P( x ) + * trigger : P( x ) + * ground context : ~P( a ) + * + * Then E-matching matches P( x ) and P( a ), resulting in the match { x -> a } + * which is used to generate the instantiation lemma : + * (forall x. P( x )) => P( a ) + * + * Terms that are provided as input to a Trigger class via mkTrigger + * should be in "instantiation constant form", see + * TermUtil::getInstConstantNode. Say we have quantified formula q whose AST is + * the Node (FORALL (BOUND_VAR_LIST x) (NOT (P x)) (INST_PATTERN_LIST + * (INST_PATTERN (P x)))) then TermUtil::getInstConstantNode( q, (P x) ) = (P + * IC) where IC = TermUtil::getInstantiationConstant( q, i ). Trigger expects as + * input (P IC) to represent the Trigger (P x). This form ensures that + * references to bound variables are unique to quantified formulas, which is + * required to ensure the correctness of instantiation lemmas we generate. + * + */ class Trigger { friend class IMGenerator; diff --git a/src/theory/quantifiers/fmf/full_model_check.cpp b/src/theory/quantifiers/fmf/full_model_check.cpp index 4545b2d39..841cd4ab9 100644 --- a/src/theory/quantifiers/fmf/full_model_check.cpp +++ b/src/theory/quantifiers/fmf/full_model_check.cpp @@ -675,7 +675,7 @@ int FullModelChecker::doExhaustiveInstantiation( FirstOrderModel * fm, Node f, i Node ev = d_quant_models[f].evaluate(fmfmc, inst); if (ev == d_true) { - CVC4Message() << "WARNING: instantiation was true! " << f << " " + CVC5Message() << "WARNING: instantiation was true! " << f << " " << mcond[i] << std::endl; AlwaysAssert(false); } diff --git a/src/theory/quantifiers/fmf/model_engine.cpp b/src/theory/quantifiers/fmf/model_engine.cpp index 585032dc4..5eba46657 100644 --- a/src/theory/quantifiers/fmf/model_engine.cpp +++ b/src/theory/quantifiers/fmf/model_engine.cpp @@ -104,7 +104,7 @@ void ModelEngine::check(Theory::Effort e, QEffort quant_e) if( addedLemmas==0 ){ Trace("model-engine-debug") << "No lemmas added, incomplete = " << ( d_incomplete_check || !d_incomplete_quants.empty() ) << std::endl; - //CVC4 will answer SAT or unknown + // cvc5 will answer SAT or unknown if( Trace.isOn("fmf-consistent") ){ Trace("fmf-consistent") << std::endl; debugPrint("fmf-consistent"); diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp index f89bdf1f2..1abbd1989 100644 --- a/src/theory/quantifiers/quantifiers_attributes.cpp +++ b/src/theory/quantifiers/quantifiers_attributes.cpp @@ -173,7 +173,7 @@ void QuantAttributes::computeAttributes( Node q ) { { Node f = qa.d_fundef_f; if( d_fun_defs.find( f )!=d_fun_defs.end() ){ - CVC4Message() << "Cannot define function " << f << " more than once." + CVC5Message() << "Cannot define function " << f << " more than once." << std::endl; AlwaysAssert(false); } diff --git a/src/theory/quantifiers/query_generator.cpp b/src/theory/quantifiers/query_generator.cpp index 7597054d9..3c3dd8d84 100644 --- a/src/theory/quantifiers/query_generator.cpp +++ b/src/theory/quantifiers/query_generator.cpp @@ -166,7 +166,7 @@ void QueryGenerator::checkQuery(Node qy, unsigned spIndex) if (r.asSatisfiabilityResult().isSat() == Result::UNSAT) { std::stringstream ss; - ss << "--sygus-rr-query-gen detected unsoundness in CVC4 on input " << qy + ss << "--sygus-rr-query-gen detected unsoundness in cvc5 on input " << qy << "!" << std::endl; ss << "This query has a model : " << std::endl; std::vector pt; @@ -176,7 +176,7 @@ void QueryGenerator::checkQuery(Node qy, unsigned spIndex) { ss << " " << d_vars[i] << " -> " << pt[i] << std::endl; } - ss << "but CVC4 answered unsat!" << std::endl; + ss << "but cvc5 answered unsat!" << std::endl; AlwaysAssert(false) << ss.str(); } if (options::sygusQueryGenDumpFiles() diff --git a/src/theory/quantifiers/term_tuple_enumerator.cpp b/src/theory/quantifiers/term_tuple_enumerator.cpp index 2f21a50e1..431156c03 100644 --- a/src/theory/quantifiers/term_tuple_enumerator.cpp +++ b/src/theory/quantifiers/term_tuple_enumerator.cpp @@ -36,7 +36,7 @@ namespace cvc5 { template -static CVC4ostream& operator<<(CVC4ostream& out, const std::vector& v) +static CVC5ostream& operator<<(CVC5ostream& out, const std::vector& v) { out << "[ "; std::copy(v.begin(), v.end(), std::ostream_iterator(out, " ")); diff --git a/src/theory/sets/kinds b/src/theory/sets/kinds index 564779f6a..0f15727e0 100644 --- a/src/theory/sets/kinds +++ b/src/theory/sets/kinds @@ -63,7 +63,7 @@ nullaryoperator UNIVERSE_SET "(finite) universe set, all set variables must be i # forall y. ( exists x1...xn. P[x1...xn] ^ t[x1...xn] = y ) <=> (member y C) # where y ranges over the element type of the (set) type of the comprehension. # Notice that since all sets must be interpreted as finite, this means that -# CVC4 will not be able to construct a model for any set comprehension such +# cvc5 will not be able to construct a model for any set comprehension such # that there are infinitely many y that satisfy the left hand side of the # equivalence above. The same limitation occurs more generally when combining # finite sets with quantified formulas. diff --git a/src/theory/sets/theory_sets_rels.h b/src/theory/sets/theory_sets_rels.h index 76edde5ae..2ca8696b0 100644 --- a/src/theory/sets/theory_sets_rels.h +++ b/src/theory/sets/theory_sets_rels.h @@ -51,7 +51,7 @@ public: * This class implements inference schemes described in Meng et al. CADE 2017 * for handling quantifier-free constraints in the theory of relations. * - * In CVC4, relations are represented as sets of tuples. The theory of + * In cvc5, relations are represented as sets of tuples. The theory of * relations includes constraints over operators, e.g. TRANSPOSE, JOIN and so * on, which apply to sets of tuples. * diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp index 4148f51b3..5c4b36043 100644 --- a/src/theory/substitutions.cpp +++ b/src/theory/substitutions.cpp @@ -214,7 +214,7 @@ void SubstitutionMap::print(ostream& out) const { } } -void SubstitutionMap::debugPrint() const { print(CVC4Message.getStream()); } +void SubstitutionMap::debugPrint() const { print(CVC5Message.getStream()); } } // namespace theory diff --git a/src/theory/theory_engine.h b/src/theory/theory_engine.h index 3eacdaa20..e870860c5 100644 --- a/src/theory/theory_engine.h +++ b/src/theory/theory_engine.h @@ -94,7 +94,7 @@ class PropEngine; * This is essentially an abstraction for a collection of theories. A * TheoryEngine provides services to a PropEngine, making various * T-solvers look like a single unit to the propositional part of - * CVC4. + * cvc5. */ class TheoryEngine { diff --git a/src/theory/uf/cardinality_extension.cpp b/src/theory/uf/cardinality_extension.cpp index 25f87de2c..166df3c80 100644 --- a/src/theory/uf/cardinality_extension.cpp +++ b/src/theory/uf/cardinality_extension.cpp @@ -1023,7 +1023,7 @@ int SortModel::addSplit(Region* r) } if (ss == b_t) { - CVC4Message() << "Bad split " << s << std::endl; + CVC5Message() << "Bad split " << s << std::endl; AlwaysAssert(false); } } @@ -1420,7 +1420,7 @@ void CardinalityExtension::assertNode(Node n, bool isDecision) for( std::map< TypeNode, SortModel* >::iterator it = d_rep_model.begin(); it != d_rep_model.end(); ++it ){ if( !it->second->hasCardinalityAsserted() ){ Trace("uf-ss-warn") << "WARNING: Assert " << n << " as a decision before cardinality for " << it->first << "." << std::endl; - // CVC4Message() << "Error: constraint asserted before cardinality + // CVC5Message() << "Error: constraint asserted before cardinality // for " << it->first << std::endl; Unimplemented(); } } diff --git a/src/util/cardinality.h b/src/util/cardinality.h index 52db18017..a480d1375 100644 --- a/src/util/cardinality.h +++ b/src/util/cardinality.h @@ -12,7 +12,7 @@ * * Representation of cardinality. * - * Simple class to represent a cardinality; used by the CVC4 type system + * Simple class to represent a cardinality; used by the cvc5 type system * give the cardinality of sorts. */ diff --git a/src/util/floatingpoint_literal_symfpu_traits.h.in b/src/util/floatingpoint_literal_symfpu_traits.h.in index c08a64520..76d2f47e2 100644 --- a/src/util/floatingpoint_literal_symfpu_traits.h.in +++ b/src/util/floatingpoint_literal_symfpu_traits.h.in @@ -16,7 +16,7 @@ * * This is a symfpu literal "back-end". It allows the library to be used as * an arbitrary precision floating-point implementation. This is effectively - * the glue between symfpu's notion of "signed bit-vector" and CVC4's + * the glue between symfpu's notion of "signed bit-vector" and cvc5's * BitVector. */ diff --git a/src/util/sexpr.cpp b/src/util/sexpr.cpp index 045a17354..794eb7cfc 100644 --- a/src/util/sexpr.cpp +++ b/src/util/sexpr.cpp @@ -279,7 +279,7 @@ bool SExpr::languageQuotesKeywords(OutputLanguage language) { return true; case language::output::LANG_AST: case language::output::LANG_CVC3: - case language::output::LANG_CVC4: + case language::output::LANG_CVC: default: return language::isOutputLang_smt2(language); }; } diff --git a/src/util/string.h b/src/util/string.h index 2afd34a78..6e9bb2866 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -26,7 +26,7 @@ namespace cvc5 { -/** The CVC4 string class +/** The cvc5 string class * * This data structure is the domain of values for the string type. It can also * be used as a generic utility for representing strings. diff --git a/src/util/utility.cpp b/src/util/utility.cpp index 7e36a9c90..9bc09dbc9 100644 --- a/src/util/utility.cpp +++ b/src/util/utility.cpp @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Some standard STL-related utility functions for CVC4. + * Some standard STL-related utility functions for cvc5. */ #include "util/utility.h" diff --git a/src/util/utility.h b/src/util/utility.h index 4f7bfd8e5..3958ff166 100644 --- a/src/util/utility.h +++ b/src/util/utility.h @@ -10,7 +10,7 @@ * directory for licensing information. * **************************************************************************** * - * Some standard STL-related utility functions for CVC4. + * Some standard STL-related utility functions for cvc5. */ #include "cvc5_private.h" diff --git a/test/api/interactive_shell.py b/test/api/interactive_shell.py index 6660ebe2e..3c8a1d5a8 100644 --- a/test/api/interactive_shell.py +++ b/test/api/interactive_shell.py @@ -11,7 +11,7 @@ # directory for licensing information. # ############################################################################# # -# A simple test file to interact with CVC4 with line editing +# A simple test file to interact with cvc5 with line editing ## import sys @@ -19,15 +19,15 @@ import pexpect def check_iteractive_shell(): """ - Interacts with CVC4's interactive shell and checks that things such a tab + Interacts with cvc5's interactive shell and checks that things such a tab completion and "pressing up" works. """ - # Open CVC4 + # Open cvc5 child = pexpect.spawnu("bin/cvc4", timeout=1) - # We expect to see the CVC4 prompt - child.expect("CVC4>") + # We expect to see the cvc5 prompt + child.expect("cvc5>") # If we send a line with just 'BOOLE' ... child.sendline("BOOLE") @@ -56,8 +56,8 @@ def check_iteractive_shell(): # Send enter child.sendcontrol("m") - # We expect to see the CVC4 prompt - child.expect("CVC4>") + # We expect to see the cvc5 prompt + child.expect("cvc5>") # Now send an up key child.send("\033[A") diff --git a/test/api/ouroborous.cpp b/test/api/ouroborous.cpp index d4aeaf427..3f1fa6733 100644 --- a/test/api/ouroborous.cpp +++ b/test/api/ouroborous.cpp @@ -47,7 +47,7 @@ int main() { return runTest(); } - catch (api::CVC4ApiException& e) + catch (api::CVC5ApiException& e) { std::cerr << e.getMessage() << std::endl; } @@ -97,7 +97,7 @@ std::string parse(std::string instr, api::Solver solver; InputLanguage ilang = - input_language == "smt2" ? input::LANG_SMTLIB_V2 : input::LANG_CVC4; + input_language == "smt2" ? input::LANG_SMTLIB_V2 : input::LANG_CVC; solver.setOption("input-language", input_language); solver.setOption("output-language", output_language); @@ -131,10 +131,10 @@ std::string translate(std::string instr, std::cout << "==============================================" << std::endl << "translating from " << (input_language == "smt2" ? input::LANG_SMTLIB_V2 - : input::LANG_CVC4) + : input::LANG_CVC) << " to " << (output_language == "smt2" ? output::LANG_SMTLIB_V2 - : output::LANG_CVC4) + : output::LANG_CVC) << " this string:" << std::endl << instr << std::endl; std::string outstr = parse(instr, input_language, output_language); @@ -142,7 +142,7 @@ std::string translate(std::string instr, << outstr << std::endl << "reparsing as " << (output_language == "smt2" ? input::LANG_SMTLIB_V2 - : input::LANG_CVC4) + : input::LANG_CVC) << std::endl; std::string poutstr = parse(outstr, output_language, output_language); assert(outstr == poutstr); diff --git a/test/api/sep_log_api.cpp b/test/api/sep_log_api.cpp index 2d37d5c36..c01d16bfc 100644 --- a/test/api/sep_log_api.cpp +++ b/test/api/sep_log_api.cpp @@ -85,7 +85,7 @@ int validate_exception(void) { Term heap_expr = slv.getSeparationHeap(); } - catch (const CVC4ApiException& e) + catch (const CVC5ApiException& e) { caught_on_heap = true; @@ -101,7 +101,7 @@ int validate_exception(void) { Term nil_expr = slv.getSeparationNilTerm(); } - catch (const CVC4ApiException& e) + catch (const CVC5ApiException& e) { caught_on_nil = true; diff --git a/test/regress/README.md b/test/regress/README.md index 0dc1d4eb8..f7fb2b6d3 100644 --- a/test/regress/README.md +++ b/test/regress/README.md @@ -2,13 +2,13 @@ ## Regression Levels and Running Regression Tests -CVC4's regression tests are divided into 5 levels (level 0 to 4). Higher +cvc5's regression tests are divided into 5 levels (level 0 to 4). Higher regression levels are reserved for longer running regressions. For running regressions tests, see the [INSTALL](https://github.com/CVC4/CVC4/blob/master/INSTALL.md#testing-cvc4) file. -By default, each invocation of CVC4 is done with a 10 minute timeout. To use a +By default, each invocation of cvc5 is done with a 10 minute timeout. To use a different timeout, set the `TEST_TIMEOUT` environment variable: ``` @@ -36,7 +36,7 @@ The following types of regression files are supported: - `*.smt`: An [SMT1.x](http://smtlib.cs.uiowa.edu/papers/format-v1.2-r06.08.30.pdf) benchmark - `*.smt2`: An [SMT 2.x](http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2017-07-18.pdf) benchmark -- `*.cvc`: A benchmark that uses [CVC4's native input language](https://github.com/CVC4/CVC4/wiki/CVC4-Native-Input-Language) +- `*.cvc`: A benchmark that uses [cvc5's native input language](https://github.com/CVC4/CVC4/wiki/CVC4-Native-Input-Language) - `*.sy`: A [SyGuS](http://sygus.seas.upenn.edu/files/SyGuS-IF.pdf) benchmark - `*.p`: A [TPTP](http://www.cs.miami.edu/~tptp/TPTP/SyntaxBNF.html) benchmark @@ -51,7 +51,7 @@ with the following directives: % EXIT: 0 ``` -This example expects an exit status of 0 from CVC4, the single line "stderr" on +This example expects an exit status of 0 from cvc5, the single line "stderr" on stderr, and the single line "stdout" on stdout. You can repeat `EXPECT` and `EXPECT-ERROR` lines as many times as you like, and at different points of the file. This is useful for multiple queries: @@ -61,7 +61,7 @@ file. This is useful for multiple queries: QUERY FALSE; % EXPECT: VALID QUERY TRUE; -% EXPECT-ERROR: CVC4 Error: +% EXPECT-ERROR: cvc5 Error: % EXPECT-ERROR: Parse Error: regress.cvc:7.13: Unexpected token: 'error'. syntax error; % EXIT: 1 @@ -71,7 +71,7 @@ Note that the directives are in comments, so if the benchmark file is an smt2 file for example, the first character would be `;` instead of `%`. Benchmark files can also specify the command line options to be used when -executing CVC4, for example: +executing cvc5, for example: ``` % COMMAND-LINE: --incremental @@ -98,7 +98,7 @@ string `TERM` to make the regression test robust to the actual term printed (e.g. there could be multiple non-linear facts and it is ok if any of them is printed). -Sometimes, certain benchmarks only apply to certain CVC4 +Sometimes, certain benchmarks only apply to certain cvc5 configurations. The `REQUIRES` directive can be used to only run a given benchmark when a feature is supported. For example: @@ -108,6 +108,6 @@ a given benchmark when a feature is supported. For example: This benchmark is only run when symfpu has been configured. Multiple `REQUIRES` directives are supported. For a list of features that can be listed -as a requirement, refer to CVC4's `--show-config` output. Features can also be +as a requirement, refer to cvc5's `--show-config` output. Features can also be excluded by adding the `no-` prefix, e.g. `no-symfpu` means that the test is not valid for builds that include symfpu support. diff --git a/test/regress/regress0/sygus/no-logic.sy b/test/regress/regress0/sygus/no-logic.sy index 8c9794986..fd63506d2 100644 --- a/test/regress/regress0/sygus/no-logic.sy +++ b/test/regress/regress0/sygus/no-logic.sy @@ -1,7 +1,7 @@ ; REQUIRES: no-competition ; COMMAND-LINE: --sygus-out=status --lang=sygus2 ; EXPECT-ERROR: no-logic.sy:8.10: No set-logic command was given before this point. -; EXPECT-ERROR: no-logic.sy:8.10: CVC4 will make all theories available. +; EXPECT-ERROR: no-logic.sy:8.10: cvc5 will make all theories available. ; EXPECT-ERROR: no-logic.sy:8.10: Consider setting a stricter logic for (likely) better performance. ; EXPECT-ERROR: no-logic.sy:8.10: To suppress this warning in the future use (set-logic ALL). ; EXPECT: unsat diff --git a/test/regress/run_regression.py b/test/regress/run_regression.py index 58e43df36..5ff9628f0 100755 --- a/test/regress/run_regression.py +++ b/test/regress/run_regression.py @@ -103,10 +103,10 @@ def run_process(args, cwd, timeout, s_input=None): return out, err, exit_status -def get_cvc4_features(cvc4_binary): - """Returns a list of features supported by the CVC4 binary `cvc4_binary`.""" +def get_cvc5_features(cvc5_binary): + """Returns a list of features supported by the cvc5 binary `cvc5_binary`.""" - output, _, _ = run_process([cvc4_binary, '--show-config'], None, None) + output, _, _ = run_process([cvc5_binary, '--show-config'], None, None) if isinstance(output, bytes): output = output.decode() @@ -124,17 +124,17 @@ def get_cvc4_features(cvc4_binary): return features, disabled_features -def run_benchmark(dump, wrapper, scrubber, error_scrubber, cvc4_binary, +def run_benchmark(dump, wrapper, scrubber, error_scrubber, cvc5_binary, command_line, benchmark_dir, benchmark_filename, timeout): - """Runs CVC4 on the file `benchmark_filename` in the directory - `benchmark_dir` using the binary `cvc4_binary` with the command line + """Runs cvc5 on the file `benchmark_filename` in the directory + `benchmark_dir` using the binary `cvc5_binary` with the command line options `command_line`. The output is scrubbed using `scrubber` and `error_scrubber` for stdout and stderr, respectively. If dump is true, the - function first uses CVC4 to read in and dump the benchmark file and then + function first uses cvc5 to read in and dump the benchmark file and then uses that as input.""" bin_args = wrapper[:] - bin_args.append(cvc4_binary) + bin_args.append(cvc5_binary) output = None error = None @@ -173,22 +173,22 @@ def run_benchmark(dump, wrapper, scrubber, error_scrubber, cvc4_binary, def run_regression(check_unsat_cores, check_proofs, dump, use_skip_return_code, - skip_timeout, wrapper, cvc4_binary, benchmark_path, + skip_timeout, wrapper, cvc5_binary, benchmark_path, timeout): - """Determines the expected output for a benchmark, runs CVC4 on it and then + """Determines the expected output for a benchmark, runs cvc5 on it and then checks whether the output corresponds to the expected output. Optionally uses a wrapper `wrapper`, tests unsat cores (if check_unsat_cores is true), checks proofs (if check_proofs is true), or dumps a benchmark and uses that as the input (if dump is true). `use_skip_return_code` enables/disables returning 77 when a test is skipped.""" - if not os.access(cvc4_binary, os.X_OK): + if not os.access(cvc5_binary, os.X_OK): sys.exit( - '"{}" does not exist or is not executable'.format(cvc4_binary)) + '"{}" does not exist or is not executable'.format(cvc5_binary)) if not os.path.isfile(benchmark_path): sys.exit('"{}" does not exist or is not a file'.format(benchmark_path)) - cvc4_features, cvc4_disabled_features = get_cvc4_features(cvc4_binary) + cvc5_features, cvc5_disabled_features = get_cvc5_features(cvc5_binary) basic_command_line_args = [] @@ -287,18 +287,18 @@ def run_regression(check_unsat_cores, check_proofs, dump, use_skip_return_code, if req_feature.startswith("no-"): req_feature = req_feature[len("no-"):] is_negative = True - if req_feature not in (cvc4_features + cvc4_disabled_features): + if req_feature not in (cvc5_features + cvc5_disabled_features): print( 'Illegal requirement in regression: {}\nAllowed requirements: {}' .format(req_feature, - ' '.join(cvc4_features + cvc4_disabled_features))) + ' '.join(cvc5_features + cvc5_disabled_features))) return EXIT_FAILURE if is_negative: - if req_feature in cvc4_features: + if req_feature in cvc5_features: print('1..0 # Skipped regression: not valid with {}'.format( req_feature)) return (EXIT_SKIP if use_skip_return_code else EXIT_OK) - elif req_feature not in cvc4_features: + elif req_feature not in cvc5_features: print('1..0 # Skipped regression: {} not supported'.format( req_feature)) return (EXIT_SKIP if use_skip_return_code else EXIT_OK) @@ -360,14 +360,14 @@ def run_regression(check_unsat_cores, check_proofs, dump, use_skip_return_code, for extra_arg in extra_command_line_args: command_line_args_configs.append(all_args + [extra_arg]) - # Run CVC4 on the benchmark with the different option sets and check + # Run cvc5 on the benchmark with the different option sets and check # whether the exit status, stdout output, stderr output are as expected. print('1..{}'.format(len(command_line_args_configs))) print('# Starting') exit_code = EXIT_OK for command_line_args in command_line_args_configs: output, error, exit_status = run_benchmark(dump, wrapper, scrubber, - error_scrubber, cvc4_binary, + error_scrubber, cvc5_binary, command_line_args, benchmark_dir, benchmark_basename, timeout) @@ -444,7 +444,7 @@ def main(): parser.add_argument('--no-check-proofs', dest='check_proofs', action='store_false') parser.add_argument('wrapper', nargs='*') - parser.add_argument('cvc4_binary') + parser.add_argument('cvc5_binary') parser.add_argument('benchmark') argv = sys.argv[1:] @@ -454,7 +454,7 @@ def main(): args = parser.parse_args(argv) - cvc4_binary = os.path.abspath(args.cvc4_binary) + cvc5_binary = os.path.abspath(args.cvc5_binary) wrapper = args.wrapper if os.environ.get('VALGRIND') == '1' and not wrapper: @@ -464,7 +464,7 @@ def main(): return run_regression(args.check_unsat_cores, args.check_proofs, args.dump, args.use_skip_return_code, args.skip_timeout, - wrapper, cvc4_binary, args.benchmark, timeout) + wrapper, cvc5_binary, args.benchmark, timeout) if __name__ == "__main__": diff --git a/test/unit/api/datatype_api_black.cpp b/test/unit/api/datatype_api_black.cpp index 7c85f84e0..3fbdcc0b5 100644 --- a/test/unit/api/datatype_api_black.cpp +++ b/test/unit/api/datatype_api_black.cpp @@ -37,7 +37,7 @@ TEST_F(TestApiBlackDatatype, mkDatatypeSort) Datatype d = listSort.getDatatype(); DatatypeConstructor consConstr = d[0]; DatatypeConstructor nilConstr = d[1]; - ASSERT_THROW(d[2], CVC4ApiException); + ASSERT_THROW(d[2], CVC5ApiException); ASSERT_NO_THROW(consConstr.getConstructorTerm()); ASSERT_NO_THROW(nilConstr.getConstructorTerm()); } @@ -104,7 +104,7 @@ TEST_F(TestApiBlackDatatype, mkDatatypeSorts) std::vector dtdeclsBad; DatatypeDecl emptyD = d_solver.mkDatatypeDecl("emptyD"); dtdeclsBad.push_back(emptyD); - ASSERT_THROW(d_solver.mkDatatypeSorts(dtdeclsBad), CVC4ApiException); + ASSERT_THROW(d_solver.mkDatatypeSorts(dtdeclsBad), CVC5ApiException); } TEST_F(TestApiBlackDatatype, datatypeStructs) @@ -118,7 +118,7 @@ TEST_F(TestApiBlackDatatype, datatypeStructs) cons.addSelector("head", intSort); cons.addSelectorSelf("tail"); Sort nullSort; - ASSERT_THROW(cons.addSelector("null", nullSort), CVC4ApiException); + ASSERT_THROW(cons.addSelector("null", nullSort), CVC5ApiException); dtypeSpec.addConstructor(cons); DatatypeConstructorDecl nil = d_solver.mkDatatypeConstructorDecl("nil"); dtypeSpec.addConstructor(nil); @@ -200,14 +200,14 @@ TEST_F(TestApiBlackDatatype, datatypeNames) ASSERT_EQ(dt.getName(), std::string("list")); ASSERT_NO_THROW(dt.getConstructor("nil")); ASSERT_NO_THROW(dt["cons"]); - ASSERT_THROW(dt.getConstructor("head"), CVC4ApiException); - ASSERT_THROW(dt.getConstructor(""), CVC4ApiException); + ASSERT_THROW(dt.getConstructor("head"), CVC5ApiException); + ASSERT_THROW(dt.getConstructor(""), CVC5ApiException); DatatypeConstructor dcons = dt[0]; ASSERT_EQ(dcons.getName(), std::string("cons")); ASSERT_NO_THROW(dcons.getSelector("head")); ASSERT_NO_THROW(dcons["tail"]); - ASSERT_THROW(dcons.getSelector("cons"), CVC4ApiException); + ASSERT_THROW(dcons.getSelector("cons"), CVC5ApiException); // get selector DatatypeSelector dselTail = dcons[1]; @@ -215,7 +215,7 @@ TEST_F(TestApiBlackDatatype, datatypeNames) ASSERT_EQ(dselTail.getRangeSort(), dtypeSort); // possible to construct null datatype declarations if not using solver - ASSERT_THROW(DatatypeDecl().getName(), CVC4ApiException); + ASSERT_THROW(DatatypeDecl().getName(), CVC5ApiException); } TEST_F(TestApiBlackDatatype, parametricDatatype) @@ -543,7 +543,7 @@ TEST_F(TestApiBlackDatatype, datatypeSpecializedCons) ASSERT_NO_THROW(testConsTerm = nilc.getSpecializedConstructorTerm(listInt)); ASSERT_NE(testConsTerm, nilc.getConstructorTerm()); // error to get the specialized constructor term for Int - ASSERT_THROW(nilc.getSpecializedConstructorTerm(isort), CVC4ApiException); + ASSERT_THROW(nilc.getSpecializedConstructorTerm(isort), CVC5ApiException); } } // namespace test } // namespace cvc5 diff --git a/test/unit/api/grammar_black.cpp b/test/unit/api/grammar_black.cpp index ccab121db..7b7556539 100644 --- a/test/unit/api/grammar_black.cpp +++ b/test/unit/api/grammar_black.cpp @@ -39,15 +39,15 @@ TEST_F(TestApiBlackGrammar, addRule) ASSERT_NO_THROW(g.addRule(start, d_solver.mkBoolean(false))); ASSERT_THROW(g.addRule(nullTerm, d_solver.mkBoolean(false)), - CVC4ApiException); - ASSERT_THROW(g.addRule(start, nullTerm), CVC4ApiException); - ASSERT_THROW(g.addRule(nts, d_solver.mkBoolean(false)), CVC4ApiException); - ASSERT_THROW(g.addRule(start, d_solver.mkInteger(0)), CVC4ApiException); - ASSERT_THROW(g.addRule(start, nts), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(g.addRule(start, nullTerm), CVC5ApiException); + ASSERT_THROW(g.addRule(nts, d_solver.mkBoolean(false)), CVC5ApiException); + ASSERT_THROW(g.addRule(start, d_solver.mkInteger(0)), CVC5ApiException); + ASSERT_THROW(g.addRule(start, nts), CVC5ApiException); d_solver.synthFun("f", {}, boolean, g); - ASSERT_THROW(g.addRule(start, d_solver.mkBoolean(false)), CVC4ApiException); + ASSERT_THROW(g.addRule(start, d_solver.mkBoolean(false)), CVC5ApiException); } TEST_F(TestApiBlackGrammar, addRules) @@ -64,16 +64,16 @@ TEST_F(TestApiBlackGrammar, addRules) ASSERT_NO_THROW(g.addRules(start, {d_solver.mkBoolean(false)})); ASSERT_THROW(g.addRules(nullTerm, {d_solver.mkBoolean(false)}), - CVC4ApiException); - ASSERT_THROW(g.addRules(start, {nullTerm}), CVC4ApiException); - ASSERT_THROW(g.addRules(nts, {d_solver.mkBoolean(false)}), CVC4ApiException); - ASSERT_THROW(g.addRules(start, {d_solver.mkInteger(0)}), CVC4ApiException); - ASSERT_THROW(g.addRules(start, {nts}), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(g.addRules(start, {nullTerm}), CVC5ApiException); + ASSERT_THROW(g.addRules(nts, {d_solver.mkBoolean(false)}), CVC5ApiException); + ASSERT_THROW(g.addRules(start, {d_solver.mkInteger(0)}), CVC5ApiException); + ASSERT_THROW(g.addRules(start, {nts}), CVC5ApiException); d_solver.synthFun("f", {}, boolean, g); ASSERT_THROW(g.addRules(start, {d_solver.mkBoolean(false)}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackGrammar, addAnyConstant) @@ -89,12 +89,12 @@ TEST_F(TestApiBlackGrammar, addAnyConstant) ASSERT_NO_THROW(g.addAnyConstant(start)); ASSERT_NO_THROW(g.addAnyConstant(start)); - ASSERT_THROW(g.addAnyConstant(nullTerm), CVC4ApiException); - ASSERT_THROW(g.addAnyConstant(nts), CVC4ApiException); + ASSERT_THROW(g.addAnyConstant(nullTerm), CVC5ApiException); + ASSERT_THROW(g.addAnyConstant(nts), CVC5ApiException); d_solver.synthFun("f", {}, boolean, g); - ASSERT_THROW(g.addAnyConstant(start), CVC4ApiException); + ASSERT_THROW(g.addAnyConstant(start), CVC5ApiException); } TEST_F(TestApiBlackGrammar, addAnyVariable) @@ -113,12 +113,12 @@ TEST_F(TestApiBlackGrammar, addAnyVariable) ASSERT_NO_THROW(g1.addAnyVariable(start)); ASSERT_NO_THROW(g2.addAnyVariable(start)); - ASSERT_THROW(g1.addAnyVariable(nullTerm), CVC4ApiException); - ASSERT_THROW(g1.addAnyVariable(nts), CVC4ApiException); + ASSERT_THROW(g1.addAnyVariable(nullTerm), CVC5ApiException); + ASSERT_THROW(g1.addAnyVariable(nts), CVC5ApiException); d_solver.synthFun("f", {}, boolean, g1); - ASSERT_THROW(g1.addAnyVariable(start), CVC4ApiException); + ASSERT_THROW(g1.addAnyVariable(start), CVC5ApiException); } } // namespace test } // namespace cvc5 diff --git a/test/unit/api/op_black.cpp b/test/unit/api/op_black.cpp index 0b67c0013..e7b83f455 100644 --- a/test/unit/api/op_black.cpp +++ b/test/unit/api/op_black.cpp @@ -43,13 +43,13 @@ TEST_F(TestApiBlackOp, isNull) TEST_F(TestApiBlackOp, opFromKind) { ASSERT_NO_THROW(d_solver.mkOp(PLUS)); - ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT), CVC4ApiException); + ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT), CVC5ApiException); } TEST_F(TestApiBlackOp, getIndicesString) { Op x; - ASSERT_THROW(x.getIndices(), CVC4ApiException); + ASSERT_THROW(x.getIndices(), CVC5ApiException); Op divisible_ot = d_solver.mkOp(DIVISIBLE, 4); ASSERT_TRUE(divisible_ot.isIndexed()); @@ -59,7 +59,7 @@ TEST_F(TestApiBlackOp, getIndicesString) Op record_update_ot = d_solver.mkOp(RECORD_UPDATE, "test"); std::string record_update_idx = record_update_ot.getIndices(); ASSERT_EQ(record_update_idx, "test"); - ASSERT_THROW(record_update_ot.getIndices(), CVC4ApiException); + ASSERT_THROW(record_update_ot.getIndices(), CVC5ApiException); } TEST_F(TestApiBlackOp, getIndicesUint) @@ -70,7 +70,7 @@ TEST_F(TestApiBlackOp, getIndicesUint) ASSERT_EQ(bitvector_repeat_idx, 5); ASSERT_THROW( (bitvector_repeat_ot.getIndices>()), - CVC4ApiException); + CVC5ApiException); Op bitvector_zero_extend_ot = d_solver.mkOp(BITVECTOR_ZERO_EXTEND, 6); uint32_t bitvector_zero_extend_idx = @@ -109,7 +109,7 @@ TEST_F(TestApiBlackOp, getIndicesUint) Op tuple_update_ot = d_solver.mkOp(TUPLE_UPDATE, 5); uint32_t tuple_update_idx = tuple_update_ot.getIndices(); ASSERT_EQ(tuple_update_idx, 5); - ASSERT_THROW(tuple_update_ot.getIndices(), CVC4ApiException); + ASSERT_THROW(tuple_update_ot.getIndices(), CVC5ApiException); } TEST_F(TestApiBlackOp, getIndicesPairUint) @@ -168,7 +168,7 @@ TEST_F(TestApiBlackOp, getIndicesPairUint) ASSERT_TRUE((floatingpoint_to_fp_generic_indices == std::pair{4, 25})); ASSERT_THROW(floatingpoint_to_fp_generic_ot.getIndices(), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackOp, opScopingToString) diff --git a/test/unit/api/op_white.cpp b/test/unit/api/op_white.cpp index 4953cdd60..39952739b 100644 --- a/test/unit/api/op_white.cpp +++ b/test/unit/api/op_white.cpp @@ -29,7 +29,7 @@ TEST_F(TestApiWhiteOp, opFromKind) { Op plus(&d_solver, PLUS); ASSERT_FALSE(plus.isIndexed()); - ASSERT_THROW(plus.getIndices(), CVC4ApiException); + ASSERT_THROW(plus.getIndices(), CVC5ApiException); ASSERT_EQ(plus, d_solver.mkOp(PLUS)); } } // namespace test diff --git a/test/unit/api/solver_black.cpp b/test/unit/api/solver_black.cpp index c5cdf4f8c..361bfa8aa 100644 --- a/test/unit/api/solver_black.cpp +++ b/test/unit/api/solver_black.cpp @@ -30,7 +30,7 @@ TEST_F(TestApiBlackSolver, recoverableException) d_solver.setOption("produce-models", "true"); Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x).notTerm()); - ASSERT_THROW(d_solver.getValue(x), CVC4ApiRecoverableException); + ASSERT_THROW(d_solver.getValue(x), CVC5ApiRecoverableException); } TEST_F(TestApiBlackSolver, supportsFloatingPoint) @@ -42,7 +42,7 @@ TEST_F(TestApiBlackSolver, supportsFloatingPoint) else { ASSERT_THROW(d_solver.mkRoundingMode(ROUND_NEAREST_TIES_TO_EVEN), - CVC4ApiException); + CVC5ApiException); } } @@ -84,7 +84,7 @@ TEST_F(TestApiBlackSolver, getRoundingModeSort) } else { - ASSERT_THROW(d_solver.getRoundingModeSort(), CVC4ApiException); + ASSERT_THROW(d_solver.getRoundingModeSort(), CVC5ApiException); } } @@ -109,13 +109,13 @@ TEST_F(TestApiBlackSolver, mkArraySort) } Solver slv; - ASSERT_THROW(slv.mkArraySort(boolSort, boolSort), CVC4ApiException); + ASSERT_THROW(slv.mkArraySort(boolSort, boolSort), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkBitVectorSort) { ASSERT_NO_THROW(d_solver.mkBitVectorSort(32)); - ASSERT_THROW(d_solver.mkBitVectorSort(0), CVC4ApiException); + ASSERT_THROW(d_solver.mkBitVectorSort(0), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkFloatingPointSort) @@ -123,12 +123,12 @@ TEST_F(TestApiBlackSolver, mkFloatingPointSort) if (d_solver.supportsFloatingPoint()) { ASSERT_NO_THROW(d_solver.mkFloatingPointSort(4, 8)); - ASSERT_THROW(d_solver.mkFloatingPointSort(0, 8), CVC4ApiException); - ASSERT_THROW(d_solver.mkFloatingPointSort(4, 0), CVC4ApiException); + ASSERT_THROW(d_solver.mkFloatingPointSort(0, 8), CVC5ApiException); + ASSERT_THROW(d_solver.mkFloatingPointSort(4, 0), CVC5ApiException); } else { - ASSERT_THROW(d_solver.mkFloatingPointSort(4, 8), CVC4ApiException); + ASSERT_THROW(d_solver.mkFloatingPointSort(4, 8), CVC5ApiException); } } @@ -143,10 +143,10 @@ TEST_F(TestApiBlackSolver, mkDatatypeSort) ASSERT_NO_THROW(d_solver.mkDatatypeSort(dtypeSpec)); Solver slv; - ASSERT_THROW(slv.mkDatatypeSort(dtypeSpec), CVC4ApiException); + ASSERT_THROW(slv.mkDatatypeSort(dtypeSpec), CVC5ApiException); DatatypeDecl throwsDtypeSpec = d_solver.mkDatatypeDecl("list"); - ASSERT_THROW(d_solver.mkDatatypeSort(throwsDtypeSpec), CVC4ApiException); + ASSERT_THROW(d_solver.mkDatatypeSort(throwsDtypeSpec), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkDatatypeSorts) @@ -168,11 +168,11 @@ TEST_F(TestApiBlackSolver, mkDatatypeSorts) std::vector decls = {dtypeSpec1, dtypeSpec2}; ASSERT_NO_THROW(d_solver.mkDatatypeSorts(decls)); - ASSERT_THROW(slv.mkDatatypeSorts(decls), CVC4ApiException); + ASSERT_THROW(slv.mkDatatypeSorts(decls), CVC5ApiException); DatatypeDecl throwsDtypeSpec = d_solver.mkDatatypeDecl("list"); std::vector throwsDecls = {throwsDtypeSpec}; - ASSERT_THROW(d_solver.mkDatatypeSorts(throwsDecls), CVC4ApiException); + ASSERT_THROW(d_solver.mkDatatypeSorts(throwsDecls), CVC5ApiException); /* with unresolved sorts */ Sort unresList = d_solver.mkUninterpretedSort("ulist"); @@ -187,7 +187,7 @@ TEST_F(TestApiBlackSolver, mkDatatypeSorts) std::vector udecls = {ulist}; ASSERT_NO_THROW(d_solver.mkDatatypeSorts(udecls, unresSorts)); - ASSERT_THROW(slv.mkDatatypeSorts(udecls, unresSorts), CVC4ApiException); + ASSERT_THROW(slv.mkDatatypeSorts(udecls, unresSorts), CVC5ApiException); /* Note: More tests are in datatype_api_black. */ } @@ -203,9 +203,9 @@ TEST_F(TestApiBlackSolver, mkFunctionSort) // non-first-class arguments are not allowed Sort reSort = d_solver.getRegExpSort(); ASSERT_THROW(d_solver.mkFunctionSort(reSort, d_solver.getIntegerSort()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.mkFunctionSort(d_solver.getIntegerSort(), funSort), - CVC4ApiException); + CVC5ApiException); ASSERT_NO_THROW(d_solver.mkFunctionSort( {d_solver.mkUninterpretedSort("u"), d_solver.getIntegerSort()}, d_solver.getIntegerSort())); @@ -218,24 +218,24 @@ TEST_F(TestApiBlackSolver, mkFunctionSort) ASSERT_THROW(d_solver.mkFunctionSort({d_solver.getIntegerSort(), d_solver.mkUninterpretedSort("u")}, funSort2), - CVC4ApiException); + CVC5ApiException); Solver slv; ASSERT_THROW(slv.mkFunctionSort(d_solver.mkUninterpretedSort("u"), d_solver.getIntegerSort()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.mkFunctionSort(slv.mkUninterpretedSort("u"), d_solver.getIntegerSort()), - CVC4ApiException); + CVC5ApiException); std::vector sorts1 = {d_solver.getBooleanSort(), slv.getIntegerSort(), d_solver.getIntegerSort()}; std::vector sorts2 = {slv.getBooleanSort(), slv.getIntegerSort()}; ASSERT_NO_THROW(slv.mkFunctionSort(sorts2, slv.getIntegerSort())); ASSERT_THROW(slv.mkFunctionSort(sorts1, slv.getIntegerSort()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.mkFunctionSort(sorts2, d_solver.getIntegerSort()), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, mkParamSort) @@ -247,7 +247,7 @@ TEST_F(TestApiBlackSolver, mkParamSort) TEST_F(TestApiBlackSolver, mkPredicateSort) { ASSERT_NO_THROW(d_solver.mkPredicateSort({d_solver.getIntegerSort()})); - ASSERT_THROW(d_solver.mkPredicateSort({}), CVC4ApiException); + ASSERT_THROW(d_solver.mkPredicateSort({}), CVC5ApiException); Sort funSort = d_solver.mkFunctionSort(d_solver.mkUninterpretedSort("u"), d_solver.getIntegerSort()); // functions as arguments are allowed @@ -256,7 +256,7 @@ TEST_F(TestApiBlackSolver, mkPredicateSort) Solver slv; ASSERT_THROW(slv.mkPredicateSort({d_solver.getIntegerSort()}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, mkRecordSort) @@ -272,7 +272,7 @@ TEST_F(TestApiBlackSolver, mkRecordSort) ASSERT_NO_THROW(recSort.getDatatype()); Solver slv; - ASSERT_THROW(slv.mkRecordSort(fields), CVC4ApiException); + ASSERT_THROW(slv.mkRecordSort(fields), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkSetSort) @@ -281,7 +281,7 @@ TEST_F(TestApiBlackSolver, mkSetSort) ASSERT_NO_THROW(d_solver.mkSetSort(d_solver.getIntegerSort())); ASSERT_NO_THROW(d_solver.mkSetSort(d_solver.mkBitVectorSort(4))); Solver slv; - ASSERT_THROW(slv.mkSetSort(d_solver.mkBitVectorSort(4)), CVC4ApiException); + ASSERT_THROW(slv.mkSetSort(d_solver.mkBitVectorSort(4)), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkBagSort) @@ -290,7 +290,7 @@ TEST_F(TestApiBlackSolver, mkBagSort) ASSERT_NO_THROW(d_solver.mkBagSort(d_solver.getIntegerSort())); ASSERT_NO_THROW(d_solver.mkBagSort(d_solver.mkBitVectorSort(4))); Solver slv; - ASSERT_THROW(slv.mkBagSort(d_solver.mkBitVectorSort(4)), CVC4ApiException); + ASSERT_THROW(slv.mkBagSort(d_solver.mkBitVectorSort(4)), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkSequenceSort) @@ -299,7 +299,7 @@ TEST_F(TestApiBlackSolver, mkSequenceSort) ASSERT_NO_THROW(d_solver.mkSequenceSort( d_solver.mkSequenceSort(d_solver.getIntegerSort()))); Solver slv; - ASSERT_THROW(slv.mkSequenceSort(d_solver.getIntegerSort()), CVC4ApiException); + ASSERT_THROW(slv.mkSequenceSort(d_solver.getIntegerSort()), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkUninterpretedSort) @@ -312,7 +312,7 @@ TEST_F(TestApiBlackSolver, mkSortConstructorSort) { ASSERT_NO_THROW(d_solver.mkSortConstructorSort("s", 2)); ASSERT_NO_THROW(d_solver.mkSortConstructorSort("", 2)); - ASSERT_THROW(d_solver.mkSortConstructorSort("", 0), CVC4ApiException); + ASSERT_THROW(d_solver.mkSortConstructorSort("", 0), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkTupleSort) @@ -321,10 +321,10 @@ TEST_F(TestApiBlackSolver, mkTupleSort) Sort funSort = d_solver.mkFunctionSort(d_solver.mkUninterpretedSort("u"), d_solver.getIntegerSort()); ASSERT_THROW(d_solver.mkTupleSort({d_solver.getIntegerSort(), funSort}), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkTupleSort({d_solver.getIntegerSort()}), CVC4ApiException); + ASSERT_THROW(slv.mkTupleSort({d_solver.getIntegerSort()}), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkBitVector) @@ -339,13 +339,13 @@ TEST_F(TestApiBlackSolver, mkBitVector) ASSERT_NO_THROW(d_solver.mkBitVector("1010", 16)); ASSERT_NO_THROW(d_solver.mkBitVector("a09f", 16)); ASSERT_NO_THROW(d_solver.mkBitVector(8, "-127", 10)); - ASSERT_THROW(d_solver.mkBitVector(size0, val1), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector(size0, val2), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector("", 2), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector("10", 3), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector("20", 2), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector(8, "101010101", 2), CVC4ApiException); - ASSERT_THROW(d_solver.mkBitVector(8, "-256", 10), CVC4ApiException); + ASSERT_THROW(d_solver.mkBitVector(size0, val1), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector(size0, val2), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector("", 2), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector("10", 3), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector("20", 2), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector(8, "101010101", 2), CVC5ApiException); + ASSERT_THROW(d_solver.mkBitVector(8, "-256", 10), CVC5ApiException); ASSERT_EQ(d_solver.mkBitVector("1010", 2), d_solver.mkBitVector("10", 10)); ASSERT_EQ(d_solver.mkBitVector("1010", 2), d_solver.mkBitVector("a", 16)); ASSERT_EQ(d_solver.mkBitVector(8, "01010101", 2).toString(), "#b01010101"); @@ -363,10 +363,10 @@ TEST_F(TestApiBlackSolver, mkVar) ASSERT_NO_THROW(d_solver.mkVar(funSort)); ASSERT_NO_THROW(d_solver.mkVar(boolSort, std::string("b"))); ASSERT_NO_THROW(d_solver.mkVar(funSort, "")); - ASSERT_THROW(d_solver.mkVar(Sort()), CVC4ApiException); - ASSERT_THROW(d_solver.mkVar(Sort(), "a"), CVC4ApiException); + ASSERT_THROW(d_solver.mkVar(Sort()), CVC5ApiException); + ASSERT_THROW(d_solver.mkVar(Sort(), "a"), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkVar(boolSort, "x"), CVC4ApiException); + ASSERT_THROW(slv.mkVar(boolSort, "x"), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkBoolean) @@ -384,27 +384,27 @@ TEST_F(TestApiBlackSolver, mkRoundingMode) else { ASSERT_THROW(d_solver.mkRoundingMode(RoundingMode::ROUND_TOWARD_ZERO), - CVC4ApiException); + CVC5ApiException); } } TEST_F(TestApiBlackSolver, mkUninterpretedConst) { ASSERT_NO_THROW(d_solver.mkUninterpretedConst(d_solver.getBooleanSort(), 1)); - ASSERT_THROW(d_solver.mkUninterpretedConst(Sort(), 1), CVC4ApiException); + ASSERT_THROW(d_solver.mkUninterpretedConst(Sort(), 1), CVC5ApiException); Solver slv; ASSERT_THROW(slv.mkUninterpretedConst(d_solver.getBooleanSort(), 1), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, mkAbstractValue) { ASSERT_NO_THROW(d_solver.mkAbstractValue(std::string("1"))); - ASSERT_THROW(d_solver.mkAbstractValue(std::string("0")), CVC4ApiException); - ASSERT_THROW(d_solver.mkAbstractValue(std::string("-1")), CVC4ApiException); - ASSERT_THROW(d_solver.mkAbstractValue(std::string("1.2")), CVC4ApiException); - ASSERT_THROW(d_solver.mkAbstractValue("1/2"), CVC4ApiException); - ASSERT_THROW(d_solver.mkAbstractValue("asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.mkAbstractValue(std::string("0")), CVC5ApiException); + ASSERT_THROW(d_solver.mkAbstractValue(std::string("-1")), CVC5ApiException); + ASSERT_THROW(d_solver.mkAbstractValue(std::string("1.2")), CVC5ApiException); + ASSERT_THROW(d_solver.mkAbstractValue("1/2"), CVC5ApiException); + ASSERT_THROW(d_solver.mkAbstractValue("asdf"), CVC5ApiException); ASSERT_NO_THROW(d_solver.mkAbstractValue((uint32_t)1)); ASSERT_NO_THROW(d_solver.mkAbstractValue((int32_t)1)); @@ -412,7 +412,7 @@ TEST_F(TestApiBlackSolver, mkAbstractValue) ASSERT_NO_THROW(d_solver.mkAbstractValue((int64_t)1)); ASSERT_NO_THROW(d_solver.mkAbstractValue((int32_t)-1)); ASSERT_NO_THROW(d_solver.mkAbstractValue((int64_t)-1)); - ASSERT_THROW(d_solver.mkAbstractValue(0), CVC4ApiException); + ASSERT_THROW(d_solver.mkAbstractValue(0), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkFloatingPoint) @@ -426,18 +426,18 @@ TEST_F(TestApiBlackSolver, mkFloatingPoint) } else { - ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t1), CVC4ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t1), CVC5ApiException); } - ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, Term()), CVC4ApiException); - ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, t1), CVC4ApiException); - ASSERT_THROW(d_solver.mkFloatingPoint(3, 0, t1), CVC4ApiException); - ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC4ApiException); - ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC4ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, Term()), CVC5ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(0, 5, t1), CVC5ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(3, 0, t1), CVC5ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC5ApiException); + ASSERT_THROW(d_solver.mkFloatingPoint(3, 5, t2), CVC5ApiException); if (d_solver.supportsFloatingPoint()) { Solver slv; - ASSERT_THROW(slv.mkFloatingPoint(3, 5, t1), CVC4ApiException); + ASSERT_THROW(slv.mkFloatingPoint(3, 5, t1), CVC5ApiException); } } @@ -448,8 +448,8 @@ TEST_F(TestApiBlackSolver, mkEmptySet) ASSERT_NO_THROW(d_solver.mkEmptySet(Sort())); ASSERT_NO_THROW(d_solver.mkEmptySet(s)); ASSERT_THROW(d_solver.mkEmptySet(d_solver.getBooleanSort()), - CVC4ApiException); - ASSERT_THROW(slv.mkEmptySet(s), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(slv.mkEmptySet(s), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkEmptyBag) @@ -459,8 +459,8 @@ TEST_F(TestApiBlackSolver, mkEmptyBag) ASSERT_NO_THROW(d_solver.mkEmptyBag(Sort())); ASSERT_NO_THROW(d_solver.mkEmptyBag(s)); ASSERT_THROW(d_solver.mkEmptyBag(d_solver.getBooleanSort()), - CVC4ApiException); - ASSERT_THROW(slv.mkEmptyBag(s), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(slv.mkEmptyBag(s), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkEmptySequence) @@ -469,7 +469,7 @@ TEST_F(TestApiBlackSolver, mkEmptySequence) Sort s = d_solver.mkSequenceSort(d_solver.getBooleanSort()); ASSERT_NO_THROW(d_solver.mkEmptySequence(s)); ASSERT_NO_THROW(d_solver.mkEmptySequence(d_solver.getBooleanSort())); - ASSERT_THROW(slv.mkEmptySequence(s), CVC4ApiException); + ASSERT_THROW(slv.mkEmptySequence(s), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkFalse) @@ -486,7 +486,7 @@ TEST_F(TestApiBlackSolver, mkNaN) } else { - ASSERT_THROW(d_solver.mkNaN(3, 5), CVC4ApiException); + ASSERT_THROW(d_solver.mkNaN(3, 5), CVC5ApiException); } } @@ -498,7 +498,7 @@ TEST_F(TestApiBlackSolver, mkNegZero) } else { - ASSERT_THROW(d_solver.mkNegZero(3, 5), CVC4ApiException); + ASSERT_THROW(d_solver.mkNegZero(3, 5), CVC5ApiException); } } @@ -510,7 +510,7 @@ TEST_F(TestApiBlackSolver, mkNegInf) } else { - ASSERT_THROW(d_solver.mkNegInf(3, 5), CVC4ApiException); + ASSERT_THROW(d_solver.mkNegInf(3, 5), CVC5ApiException); } } @@ -522,7 +522,7 @@ TEST_F(TestApiBlackSolver, mkPosInf) } else { - ASSERT_THROW(d_solver.mkPosInf(3, 5), CVC4ApiException); + ASSERT_THROW(d_solver.mkPosInf(3, 5), CVC5ApiException); } } @@ -534,29 +534,29 @@ TEST_F(TestApiBlackSolver, mkPosZero) } else { - ASSERT_THROW(d_solver.mkPosZero(3, 5), CVC4ApiException); + ASSERT_THROW(d_solver.mkPosZero(3, 5), CVC5ApiException); } } TEST_F(TestApiBlackSolver, mkOp) { // mkOp(Kind kind, Kind k) - ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, EQUAL), CVC4ApiException); + ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, EQUAL), CVC5ApiException); // mkOp(Kind kind, const std::string& arg) ASSERT_NO_THROW(d_solver.mkOp(RECORD_UPDATE, "asdf")); ASSERT_NO_THROW(d_solver.mkOp(DIVISIBLE, "2147483648")); - ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, "asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, "asdf"), CVC5ApiException); // mkOp(Kind kind, uint32_t arg) ASSERT_NO_THROW(d_solver.mkOp(DIVISIBLE, 1)); ASSERT_NO_THROW(d_solver.mkOp(BITVECTOR_ROTATE_LEFT, 1)); ASSERT_NO_THROW(d_solver.mkOp(BITVECTOR_ROTATE_RIGHT, 1)); - ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, 1), CVC4ApiException); + ASSERT_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, 1), CVC5ApiException); // mkOp(Kind kind, uint32_t arg1, uint32_t arg2) ASSERT_NO_THROW(d_solver.mkOp(BITVECTOR_EXTRACT, 1, 1)); - ASSERT_THROW(d_solver.mkOp(DIVISIBLE, 1, 2), CVC4ApiException); + ASSERT_THROW(d_solver.mkOp(DIVISIBLE, 1, 2), CVC5ApiException); // mkOp(Kind kind, std::vector args) std::vector args = {1, 2, 2}; @@ -568,32 +568,32 @@ TEST_F(TestApiBlackSolver, mkPi) { ASSERT_NO_THROW(d_solver.mkPi()); } TEST_F(TestApiBlackSolver, mkInteger) { ASSERT_NO_THROW(d_solver.mkInteger("123")); - ASSERT_THROW(d_solver.mkInteger("1.23"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("1/23"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("12/3"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(".2"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("2."), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(""), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("asdf"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("1.2/3"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("."), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("/"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("2/"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("/2"), CVC4ApiException); + ASSERT_THROW(d_solver.mkInteger("1.23"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("1/23"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("12/3"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(".2"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("2."), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(""), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("asdf"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("1.2/3"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("."), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("/"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("2/"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("/2"), CVC5ApiException); ASSERT_NO_THROW(d_solver.mkReal(std::string("123"))); - ASSERT_THROW(d_solver.mkInteger(std::string("1.23")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("1/23")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("12/3")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string(".2")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("2.")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("asdf")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("1.2/3")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string(".")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("/")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("2/")), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger(std::string("/2")), CVC4ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("1.23")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("1/23")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("12/3")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string(".2")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("2.")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("asdf")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("1.2/3")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string(".")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("/")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("2/")), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger(std::string("/2")), CVC5ApiException); int32_t val1 = 1; int64_t val2 = -1; @@ -614,13 +614,13 @@ TEST_F(TestApiBlackSolver, mkReal) ASSERT_NO_THROW(d_solver.mkReal("12/3")); ASSERT_NO_THROW(d_solver.mkReal(".2")); ASSERT_NO_THROW(d_solver.mkReal("2.")); - ASSERT_THROW(d_solver.mkReal(""), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("asdf"), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("1.2/3"), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("."), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("/"), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("2/"), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal("/2"), CVC4ApiException); + ASSERT_THROW(d_solver.mkReal(""), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("asdf"), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("1.2/3"), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("."), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("/"), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("2/"), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal("/2"), CVC5ApiException); ASSERT_NO_THROW(d_solver.mkReal(std::string("123"))); ASSERT_NO_THROW(d_solver.mkReal(std::string("1.23"))); @@ -628,13 +628,13 @@ TEST_F(TestApiBlackSolver, mkReal) ASSERT_NO_THROW(d_solver.mkReal(std::string("12/3"))); ASSERT_NO_THROW(d_solver.mkReal(std::string(".2"))); ASSERT_NO_THROW(d_solver.mkReal(std::string("2."))); - ASSERT_THROW(d_solver.mkReal(std::string("")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string("asdf")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string("1.2/3")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string(".")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string("/")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string("2/")), CVC4ApiException); - ASSERT_THROW(d_solver.mkReal(std::string("/2")), CVC4ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("asdf")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("1.2/3")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string(".")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("/")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("2/")), CVC5ApiException); + ASSERT_THROW(d_solver.mkReal(std::string("/2")), CVC5ApiException); int32_t val1 = 1; int64_t val2 = -1; @@ -670,9 +670,9 @@ TEST_F(TestApiBlackSolver, mkRegexpSigma) TEST_F(TestApiBlackSolver, mkSepNil) { ASSERT_NO_THROW(d_solver.mkSepNil(d_solver.getBooleanSort())); - ASSERT_THROW(d_solver.mkSepNil(Sort()), CVC4ApiException); + ASSERT_THROW(d_solver.mkSepNil(Sort()), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkSepNil(d_solver.getIntegerSort()), CVC4ApiException); + ASSERT_THROW(slv.mkSepNil(d_solver.getIntegerSort()), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkString) @@ -689,9 +689,9 @@ TEST_F(TestApiBlackSolver, mkChar) { ASSERT_NO_THROW(d_solver.mkChar(std::string("0123"))); ASSERT_NO_THROW(d_solver.mkChar("aA")); - ASSERT_THROW(d_solver.mkChar(""), CVC4ApiException); - ASSERT_THROW(d_solver.mkChar("0g0"), CVC4ApiException); - ASSERT_THROW(d_solver.mkChar("100000"), CVC4ApiException); + ASSERT_THROW(d_solver.mkChar(""), CVC5ApiException); + ASSERT_THROW(d_solver.mkChar("0g0"), CVC5ApiException); + ASSERT_THROW(d_solver.mkChar("100000"), CVC5ApiException); ASSERT_EQ(d_solver.mkChar("abc"), d_solver.mkChar("ABC")); } @@ -712,44 +712,44 @@ TEST_F(TestApiBlackSolver, mkTerm) ASSERT_NO_THROW(d_solver.mkTerm(PI)); ASSERT_NO_THROW(d_solver.mkTerm(REGEXP_EMPTY)); ASSERT_NO_THROW(d_solver.mkTerm(REGEXP_SIGMA)); - ASSERT_THROW(d_solver.mkTerm(CONST_BITVECTOR), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(CONST_BITVECTOR), CVC5ApiException); // mkTerm(Kind kind, Term child) const ASSERT_NO_THROW(d_solver.mkTerm(NOT, d_solver.mkTrue())); - ASSERT_THROW(d_solver.mkTerm(NOT, Term()), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(NOT, a), CVC4ApiException); - ASSERT_THROW(slv.mkTerm(NOT, d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(NOT, Term()), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(NOT, a), CVC5ApiException); + ASSERT_THROW(slv.mkTerm(NOT, d_solver.mkTrue()), CVC5ApiException); // mkTerm(Kind kind, Term child1, Term child2) const ASSERT_NO_THROW(d_solver.mkTerm(EQUAL, a, b)); - ASSERT_THROW(d_solver.mkTerm(EQUAL, Term(), b), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(EQUAL, a, Term()), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(EQUAL, a, d_solver.mkTrue()), CVC4ApiException); - ASSERT_THROW(slv.mkTerm(EQUAL, a, b), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(EQUAL, Term(), b), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(EQUAL, a, Term()), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(EQUAL, a, d_solver.mkTrue()), CVC5ApiException); + ASSERT_THROW(slv.mkTerm(EQUAL, a, b), CVC5ApiException); // mkTerm(Kind kind, Term child1, Term child2, Term child3) const ASSERT_NO_THROW(d_solver.mkTerm( ITE, d_solver.mkTrue(), d_solver.mkTrue(), d_solver.mkTrue())); ASSERT_THROW( d_solver.mkTerm(ITE, Term(), d_solver.mkTrue(), d_solver.mkTrue()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( d_solver.mkTerm(ITE, d_solver.mkTrue(), Term(), d_solver.mkTrue()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( d_solver.mkTerm(ITE, d_solver.mkTrue(), d_solver.mkTrue(), Term()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.mkTerm(ITE, d_solver.mkTrue(), d_solver.mkTrue(), b), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( slv.mkTerm(ITE, d_solver.mkTrue(), d_solver.mkTrue(), d_solver.mkTrue()), - CVC4ApiException); + CVC5ApiException); // mkTerm(Kind kind, const std::vector& children) const ASSERT_NO_THROW(d_solver.mkTerm(EQUAL, v1)); - ASSERT_THROW(d_solver.mkTerm(EQUAL, v2), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(EQUAL, v3), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(DISTINCT, v6), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(EQUAL, v2), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(EQUAL, v3), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(DISTINCT, v6), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkTermFromOp) @@ -795,25 +795,25 @@ TEST_F(TestApiBlackSolver, mkTermFromOp) // mkTerm(Op op, Term term) const ASSERT_NO_THROW(d_solver.mkTerm(APPLY_CONSTRUCTOR, nilTerm1)); ASSERT_NO_THROW(d_solver.mkTerm(APPLY_CONSTRUCTOR, nilTerm2)); - ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, nilTerm1), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, consTerm1), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(APPLY_CONSTRUCTOR, consTerm2), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm1), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, headTerm1), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm1), CVC4ApiException); - ASSERT_THROW(slv.mkTerm(APPLY_CONSTRUCTOR, nilTerm1), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, nilTerm1), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, consTerm1), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(APPLY_CONSTRUCTOR, consTerm2), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm1), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(APPLY_SELECTOR, headTerm1), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm1), CVC5ApiException); + ASSERT_THROW(slv.mkTerm(APPLY_CONSTRUCTOR, nilTerm1), CVC5ApiException); // mkTerm(Op op, Term child) const ASSERT_NO_THROW(d_solver.mkTerm(opterm1, a)); ASSERT_NO_THROW(d_solver.mkTerm(opterm2, d_solver.mkInteger(1))); ASSERT_NO_THROW(d_solver.mkTerm(APPLY_SELECTOR, headTerm1, c)); ASSERT_NO_THROW(d_solver.mkTerm(APPLY_SELECTOR, tailTerm2, c)); - ASSERT_THROW(d_solver.mkTerm(opterm2, a), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm1, Term()), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm2, a), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm1, Term()), CVC5ApiException); ASSERT_THROW( d_solver.mkTerm(APPLY_CONSTRUCTOR, consTerm1, d_solver.mkInteger(0)), - CVC4ApiException); - ASSERT_THROW(slv.mkTerm(opterm1, a), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(slv.mkTerm(opterm1, a), CVC5ApiException); // mkTerm(Op op, Term child1, Term child2) const ASSERT_NO_THROW( @@ -823,31 +823,31 @@ TEST_F(TestApiBlackSolver, mkTermFromOp) d_solver.mkTerm(APPLY_CONSTRUCTOR, nilTerm1))); ASSERT_THROW( d_solver.mkTerm(opterm2, d_solver.mkInteger(1), d_solver.mkInteger(2)), - CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm1, a, b), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm1, a, b), CVC5ApiException); ASSERT_THROW(d_solver.mkTerm(opterm2, d_solver.mkInteger(1), Term()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.mkTerm(opterm2, Term(), d_solver.mkInteger(1)), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.mkTerm(APPLY_CONSTRUCTOR, consTerm1, d_solver.mkInteger(0), d_solver.mkTerm(APPLY_CONSTRUCTOR, nilTerm1)), - CVC4ApiException); + CVC5ApiException); // mkTerm(Op op, Term child1, Term child2, Term child3) const - ASSERT_THROW(d_solver.mkTerm(opterm1, a, b, a), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm1, a, b, a), CVC5ApiException); ASSERT_THROW( d_solver.mkTerm( opterm2, d_solver.mkInteger(1), d_solver.mkInteger(1), Term()), - CVC4ApiException); + CVC5ApiException); // mkTerm(Op op, const std::vector& children) const ASSERT_NO_THROW(d_solver.mkTerm(opterm2, v4)); - ASSERT_THROW(d_solver.mkTerm(opterm2, v1), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm2, v2), CVC4ApiException); - ASSERT_THROW(d_solver.mkTerm(opterm2, v3), CVC4ApiException); - ASSERT_THROW(slv.mkTerm(opterm2, v4), CVC4ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm2, v1), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm2, v2), CVC5ApiException); + ASSERT_THROW(d_solver.mkTerm(opterm2, v3), CVC5ApiException); + ASSERT_THROW(slv.mkTerm(opterm2, v4), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkTrue) @@ -864,28 +864,28 @@ TEST_F(TestApiBlackSolver, mkTuple) d_solver.mkTuple({d_solver.getRealSort()}, {d_solver.mkInteger("5")})); ASSERT_THROW(d_solver.mkTuple({}, {d_solver.mkBitVector("101", 2)}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.mkTuple({d_solver.mkBitVectorSort(4)}, {d_solver.mkBitVector("101", 2)}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( d_solver.mkTuple({d_solver.getIntegerSort()}, {d_solver.mkReal("5.3")}), - CVC4ApiException); + CVC5ApiException); Solver slv; ASSERT_THROW( slv.mkTuple({d_solver.mkBitVectorSort(3)}, {slv.mkBitVector("101", 2)}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( slv.mkTuple({slv.mkBitVectorSort(3)}, {d_solver.mkBitVector("101", 2)}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, mkUniverseSet) { ASSERT_NO_THROW(d_solver.mkUniverseSet(d_solver.getBooleanSort())); - ASSERT_THROW(d_solver.mkUniverseSet(Sort()), CVC4ApiException); + ASSERT_THROW(d_solver.mkUniverseSet(Sort()), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkUniverseSet(d_solver.getBooleanSort()), CVC4ApiException); + ASSERT_THROW(slv.mkUniverseSet(d_solver.getBooleanSort()), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkConst) @@ -899,11 +899,11 @@ TEST_F(TestApiBlackSolver, mkConst) ASSERT_NO_THROW(d_solver.mkConst(intSort, std::string("i"))); ASSERT_NO_THROW(d_solver.mkConst(funSort, "f")); ASSERT_NO_THROW(d_solver.mkConst(funSort, "")); - ASSERT_THROW(d_solver.mkConst(Sort()), CVC4ApiException); - ASSERT_THROW(d_solver.mkConst(Sort(), "a"), CVC4ApiException); + ASSERT_THROW(d_solver.mkConst(Sort()), CVC5ApiException); + ASSERT_THROW(d_solver.mkConst(Sort(), "a"), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkConst(boolSort), CVC4ApiException); + ASSERT_THROW(slv.mkConst(boolSort), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkConstArray) @@ -914,16 +914,16 @@ TEST_F(TestApiBlackSolver, mkConstArray) Term constArr = d_solver.mkConstArray(arrSort, zero); ASSERT_NO_THROW(d_solver.mkConstArray(arrSort, zero)); - ASSERT_THROW(d_solver.mkConstArray(Sort(), zero), CVC4ApiException); - ASSERT_THROW(d_solver.mkConstArray(arrSort, Term()), CVC4ApiException); + ASSERT_THROW(d_solver.mkConstArray(Sort(), zero), CVC5ApiException); + ASSERT_THROW(d_solver.mkConstArray(arrSort, Term()), CVC5ApiException); ASSERT_THROW(d_solver.mkConstArray(arrSort, d_solver.mkBitVector(1, 1)), - CVC4ApiException); - ASSERT_THROW(d_solver.mkConstArray(intSort, zero), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(d_solver.mkConstArray(intSort, zero), CVC5ApiException); Solver slv; Term zero2 = slv.mkInteger(0); Sort arrSort2 = slv.mkArraySort(slv.getIntegerSort(), slv.getIntegerSort()); - ASSERT_THROW(slv.mkConstArray(arrSort2, zero), CVC4ApiException); - ASSERT_THROW(slv.mkConstArray(arrSort, zero2), CVC4ApiException); + ASSERT_THROW(slv.mkConstArray(arrSort2, zero), CVC5ApiException); + ASSERT_THROW(slv.mkConstArray(arrSort, zero2), CVC5ApiException); } TEST_F(TestApiBlackSolver, declareDatatype) @@ -941,11 +941,11 @@ TEST_F(TestApiBlackSolver, declareDatatype) ASSERT_NO_THROW(d_solver.declareDatatype(std::string(""), ctors3)); std::vector ctors4; ASSERT_THROW(d_solver.declareDatatype(std::string("c"), ctors4), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.declareDatatype(std::string(""), ctors4), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.declareDatatype(std::string("a"), ctors1), CVC4ApiException); + ASSERT_THROW(slv.declareDatatype(std::string("a"), ctors1), CVC5ApiException); } TEST_F(TestApiBlackSolver, declareFun) @@ -956,13 +956,13 @@ TEST_F(TestApiBlackSolver, declareFun) ASSERT_NO_THROW(d_solver.declareFun("f1", {}, bvSort)); ASSERT_NO_THROW( d_solver.declareFun("f3", {bvSort, d_solver.getIntegerSort()}, bvSort)); - ASSERT_THROW(d_solver.declareFun("f2", {}, funSort), CVC4ApiException); + ASSERT_THROW(d_solver.declareFun("f2", {}, funSort), CVC5ApiException); // functions as arguments is allowed ASSERT_NO_THROW(d_solver.declareFun("f4", {bvSort, funSort}, bvSort)); ASSERT_THROW(d_solver.declareFun("f5", {bvSort, bvSort}, funSort), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.declareFun("f1", {}, bvSort), CVC4ApiException); + ASSERT_THROW(slv.declareFun("f1", {}, bvSort), CVC5ApiException); } TEST_F(TestApiBlackSolver, declareSort) @@ -1006,30 +1006,30 @@ TEST_F(TestApiBlackSolver, defineFun) ASSERT_NO_THROW(d_solver.defineFun("ff", {b1, b2}, bvSort, v1)); ASSERT_NO_THROW(d_solver.defineFun(f1, {b1, b11}, v1)); ASSERT_THROW(d_solver.defineFun("ff", {v1, b2}, bvSort, v1), - CVC4ApiException); - ASSERT_THROW(d_solver.defineFun("fff", {b1}, bvSort, v3), CVC4ApiException); + CVC5ApiException); + ASSERT_THROW(d_solver.defineFun("fff", {b1}, bvSort, v3), CVC5ApiException); ASSERT_THROW(d_solver.defineFun("ffff", {b1}, funSort2, v3), - CVC4ApiException); + CVC5ApiException); // b3 has function sort, which is allowed as an argument ASSERT_NO_THROW(d_solver.defineFun("fffff", {b1, b3}, bvSort, v1)); - ASSERT_THROW(d_solver.defineFun(f1, {v1, b11}, v1), CVC4ApiException); - ASSERT_THROW(d_solver.defineFun(f1, {b1}, v1), CVC4ApiException); - ASSERT_THROW(d_solver.defineFun(f1, {b1, b11}, v2), CVC4ApiException); - ASSERT_THROW(d_solver.defineFun(f1, {b1, b11}, v3), CVC4ApiException); - ASSERT_THROW(d_solver.defineFun(f2, {b1}, v2), CVC4ApiException); - ASSERT_THROW(d_solver.defineFun(f3, {b1}, v1), CVC4ApiException); + ASSERT_THROW(d_solver.defineFun(f1, {v1, b11}, v1), CVC5ApiException); + ASSERT_THROW(d_solver.defineFun(f1, {b1}, v1), CVC5ApiException); + ASSERT_THROW(d_solver.defineFun(f1, {b1, b11}, v2), CVC5ApiException); + ASSERT_THROW(d_solver.defineFun(f1, {b1, b11}, v3), CVC5ApiException); + ASSERT_THROW(d_solver.defineFun(f2, {b1}, v2), CVC5ApiException); + ASSERT_THROW(d_solver.defineFun(f3, {b1}, v1), CVC5ApiException); Solver slv; Sort bvSort2 = slv.mkBitVectorSort(32); Term v12 = slv.mkConst(bvSort2, "v1"); Term b12 = slv.mkVar(bvSort2, "b1"); Term b22 = slv.mkVar(slv.getIntegerSort(), "b2"); - ASSERT_THROW(slv.defineFun("f", {}, bvSort, v12), CVC4ApiException); - ASSERT_THROW(slv.defineFun("f", {}, bvSort2, v1), CVC4ApiException); - ASSERT_THROW(slv.defineFun("ff", {b1, b22}, bvSort2, v12), CVC4ApiException); - ASSERT_THROW(slv.defineFun("ff", {b12, b2}, bvSort2, v12), CVC4ApiException); - ASSERT_THROW(slv.defineFun("ff", {b12, b22}, bvSort, v12), CVC4ApiException); - ASSERT_THROW(slv.defineFun("ff", {b12, b22}, bvSort2, v1), CVC4ApiException); + ASSERT_THROW(slv.defineFun("f", {}, bvSort, v12), CVC5ApiException); + ASSERT_THROW(slv.defineFun("f", {}, bvSort2, v1), CVC5ApiException); + ASSERT_THROW(slv.defineFun("ff", {b1, b22}, bvSort2, v12), CVC5ApiException); + ASSERT_THROW(slv.defineFun("ff", {b12, b2}, bvSort2, v12), CVC5ApiException); + ASSERT_THROW(slv.defineFun("ff", {b12, b22}, bvSort, v12), CVC5ApiException); + ASSERT_THROW(slv.defineFun("ff", {b12, b22}, bvSort2, v1), CVC5ApiException); } TEST_F(TestApiBlackSolver, defineFunGlobal) @@ -1076,18 +1076,18 @@ TEST_F(TestApiBlackSolver, defineFunRec) ASSERT_NO_THROW(d_solver.defineFunRec("ff", {b1, b2}, bvSort, v1)); ASSERT_NO_THROW(d_solver.defineFunRec(f1, {b1, b11}, v1)); ASSERT_THROW(d_solver.defineFunRec("fff", {b1}, bvSort, v3), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunRec("ff", {b1, v2}, bvSort, v1), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunRec("ffff", {b1}, funSort2, v3), - CVC4ApiException); + CVC5ApiException); // b3 has function sort, which is allowed as an argument ASSERT_NO_THROW(d_solver.defineFunRec("fffff", {b1, b3}, bvSort, v1)); - ASSERT_THROW(d_solver.defineFunRec(f1, {b1}, v1), CVC4ApiException); - ASSERT_THROW(d_solver.defineFunRec(f1, {b1, b11}, v2), CVC4ApiException); - ASSERT_THROW(d_solver.defineFunRec(f1, {b1, b11}, v3), CVC4ApiException); - ASSERT_THROW(d_solver.defineFunRec(f2, {b1}, v2), CVC4ApiException); - ASSERT_THROW(d_solver.defineFunRec(f3, {b1}, v1), CVC4ApiException); + ASSERT_THROW(d_solver.defineFunRec(f1, {b1}, v1), CVC5ApiException); + ASSERT_THROW(d_solver.defineFunRec(f1, {b1, b11}, v2), CVC5ApiException); + ASSERT_THROW(d_solver.defineFunRec(f1, {b1, b11}, v3), CVC5ApiException); + ASSERT_THROW(d_solver.defineFunRec(f2, {b1}, v2), CVC5ApiException); + ASSERT_THROW(d_solver.defineFunRec(f3, {b1}, v1), CVC5ApiException); Solver slv; Sort bvSort2 = slv.mkBitVectorSort(32); @@ -1096,16 +1096,16 @@ TEST_F(TestApiBlackSolver, defineFunRec) Term b22 = slv.mkVar(slv.getIntegerSort(), "b2"); ASSERT_NO_THROW(slv.defineFunRec("f", {}, bvSort2, v12)); ASSERT_NO_THROW(slv.defineFunRec("ff", {b12, b22}, bvSort2, v12)); - ASSERT_THROW(slv.defineFunRec("f", {}, bvSort, v12), CVC4ApiException); - ASSERT_THROW(slv.defineFunRec("f", {}, bvSort2, v1), CVC4ApiException); + ASSERT_THROW(slv.defineFunRec("f", {}, bvSort, v12), CVC5ApiException); + ASSERT_THROW(slv.defineFunRec("f", {}, bvSort2, v1), CVC5ApiException); ASSERT_THROW(slv.defineFunRec("ff", {b1, b22}, bvSort2, v12), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunRec("ff", {b12, b2}, bvSort2, v12), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunRec("ff", {b12, b22}, bvSort, v12), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunRec("ff", {b12, b22}, bvSort2, v1), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, defineFunRecWrongLogic) @@ -1116,8 +1116,8 @@ TEST_F(TestApiBlackSolver, defineFunRecWrongLogic) Term b = d_solver.mkVar(bvSort, "b"); Term v = d_solver.mkConst(bvSort, "v"); Term f = d_solver.mkConst(funSort, "f"); - ASSERT_THROW(d_solver.defineFunRec("f", {}, bvSort, v), CVC4ApiException); - ASSERT_THROW(d_solver.defineFunRec(f, {b, b}, v), CVC4ApiException); + ASSERT_THROW(d_solver.defineFunRec("f", {}, bvSort, v), CVC5ApiException); + ASSERT_THROW(d_solver.defineFunRec(f, {b, b}, v), CVC5ApiException); } TEST_F(TestApiBlackSolver, defineFunRecGlobal) @@ -1166,15 +1166,15 @@ TEST_F(TestApiBlackSolver, defineFunsRec) ASSERT_NO_THROW( d_solver.defineFunsRec({f1, f2}, {{b1, b11}, {b4}}, {v1, v2})); ASSERT_THROW(d_solver.defineFunsRec({f1, f2}, {{v1, b11}, {b4}}, {v1, v2}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunsRec({f1, f3}, {{b1, b11}, {b4}}, {v1, v2}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunsRec({f1, f2}, {{b1}, {b4}}, {v1, v2}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunsRec({f1, f2}, {{b1, b2}, {b4}}, {v1, v2}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.defineFunsRec({f1, f2}, {{b1, b11}, {b4}}, {v1, v4}), - CVC4ApiException); + CVC5ApiException); Solver slv; Sort uSort2 = slv.mkUninterpretedSort("u"); @@ -1191,19 +1191,19 @@ TEST_F(TestApiBlackSolver, defineFunsRec) ASSERT_NO_THROW( slv.defineFunsRec({f12, f22}, {{b12, b112}, {b42}}, {v12, v22})); ASSERT_THROW(slv.defineFunsRec({f1, f22}, {{b12, b112}, {b42}}, {v12, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f2}, {{b12, b112}, {b42}}, {v12, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f22}, {{b1, b112}, {b42}}, {v12, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f22}, {{b12, b11}, {b42}}, {v12, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f22}, {{b12, b112}, {b4}}, {v12, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f22}, {{b12, b112}, {b42}}, {v1, v22}), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.defineFunsRec({f12, f22}, {{b12, b112}, {b42}}, {v12, v2}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, defineFunsRecWrongLogic) @@ -1220,7 +1220,7 @@ TEST_F(TestApiBlackSolver, defineFunsRecWrongLogic) Term f1 = d_solver.mkConst(funSort1, "f1"); Term f2 = d_solver.mkConst(funSort2, "f2"); ASSERT_THROW(d_solver.defineFunsRec({f1, f2}, {{b, b}, {u}}, {v1, v2}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, defineFunsRecGlobal) @@ -1267,7 +1267,7 @@ TEST_F(TestApiBlackSolver, uFIteration) TEST_F(TestApiBlackSolver, getInfo) { ASSERT_NO_THROW(d_solver.getInfo("name")); - ASSERT_THROW(d_solver.getInfo("asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.getInfo("asdf"), CVC5ApiException); } TEST_F(TestApiBlackSolver, getInterpolant) @@ -1307,7 +1307,7 @@ TEST_F(TestApiBlackSolver, getOp) Term exta = d_solver.mkTerm(ext, a); ASSERT_FALSE(a.hasOp()); - ASSERT_THROW(a.getOp(), CVC4ApiException); + ASSERT_THROW(a.getOp(), CVC5ApiException); ASSERT_TRUE(exta.hasOp()); ASSERT_EQ(exta.getOp(), ext); @@ -1339,14 +1339,14 @@ TEST_F(TestApiBlackSolver, getOp) TEST_F(TestApiBlackSolver, getOption) { ASSERT_NO_THROW(d_solver.getOption("incremental")); - ASSERT_THROW(d_solver.getOption("asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.getOption("asdf"), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatAssumptions1) { d_solver.setOption("incremental", "false"); d_solver.checkSatAssuming(d_solver.mkFalse()); - ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC4ApiException); + ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatAssumptions2) @@ -1354,7 +1354,7 @@ TEST_F(TestApiBlackSolver, getUnsatAssumptions2) d_solver.setOption("incremental", "true"); d_solver.setOption("produce-unsat-assumptions", "false"); d_solver.checkSatAssuming(d_solver.mkFalse()); - ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC4ApiException); + ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatAssumptions3) @@ -1364,7 +1364,7 @@ TEST_F(TestApiBlackSolver, getUnsatAssumptions3) d_solver.checkSatAssuming(d_solver.mkFalse()); ASSERT_NO_THROW(d_solver.getUnsatAssumptions()); d_solver.checkSatAssuming(d_solver.mkTrue()); - ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC4ApiException); + ASSERT_THROW(d_solver.getUnsatAssumptions(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatCore1) @@ -1372,7 +1372,7 @@ TEST_F(TestApiBlackSolver, getUnsatCore1) d_solver.setOption("incremental", "false"); d_solver.assertFormula(d_solver.mkFalse()); d_solver.checkSat(); - ASSERT_THROW(d_solver.getUnsatCore(), CVC4ApiException); + ASSERT_THROW(d_solver.getUnsatCore(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatCore2) @@ -1381,7 +1381,7 @@ TEST_F(TestApiBlackSolver, getUnsatCore2) d_solver.setOption("produce-unsat-cores", "false"); d_solver.assertFormula(d_solver.mkFalse()); d_solver.checkSat(); - ASSERT_THROW(d_solver.getUnsatCore(), CVC4ApiException); + ASSERT_THROW(d_solver.getUnsatCore(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getUnsatCore3) @@ -1431,7 +1431,7 @@ TEST_F(TestApiBlackSolver, getValue1) Term t = d_solver.mkTrue(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getValue(t), CVC4ApiException); + ASSERT_THROW(d_solver.getValue(t), CVC5ApiException); } TEST_F(TestApiBlackSolver, getValue2) @@ -1440,7 +1440,7 @@ TEST_F(TestApiBlackSolver, getValue2) Term t = d_solver.mkFalse(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getValue(t), CVC4ApiException); + ASSERT_THROW(d_solver.getValue(t), CVC5ApiException); } TEST_F(TestApiBlackSolver, getValue3) @@ -1479,7 +1479,7 @@ TEST_F(TestApiBlackSolver, getValue3) ASSERT_NO_THROW(d_solver.getValue(p_f_y)); Solver slv; - ASSERT_THROW(slv.getValue(x), CVC4ApiException); + ASSERT_THROW(slv.getValue(x), CVC5ApiException); } TEST_F(TestApiBlackSolver, getQuantifierElimination) @@ -1489,9 +1489,9 @@ TEST_F(TestApiBlackSolver, getQuantifierElimination) d_solver.mkTerm(FORALL, d_solver.mkTerm(BOUND_VAR_LIST, x), d_solver.mkTerm(OR, x, d_solver.mkTerm(NOT, x))); - ASSERT_THROW(d_solver.getQuantifierElimination(Term()), CVC4ApiException); + ASSERT_THROW(d_solver.getQuantifierElimination(Term()), CVC5ApiException); ASSERT_THROW(d_solver.getQuantifierElimination(Solver().mkBoolean(false)), - CVC4ApiException); + CVC5ApiException); ASSERT_NO_THROW(d_solver.getQuantifierElimination(forall)); } @@ -1503,10 +1503,10 @@ TEST_F(TestApiBlackSolver, getQuantifierEliminationDisjunct) d_solver.mkTerm(BOUND_VAR_LIST, x), d_solver.mkTerm(OR, x, d_solver.mkTerm(NOT, x))); ASSERT_THROW(d_solver.getQuantifierEliminationDisjunct(Term()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW( d_solver.getQuantifierEliminationDisjunct(Solver().mkBoolean(false)), - CVC4ApiException); + CVC5ApiException); ASSERT_NO_THROW(d_solver.getQuantifierEliminationDisjunct(forall)); } @@ -1517,7 +1517,7 @@ TEST_F(TestApiBlackSolver, declareSeparationHeap) ASSERT_NO_THROW(d_solver.declareSeparationHeap(integer, integer)); // cannot declare separation logic heap more than once ASSERT_THROW(d_solver.declareSeparationHeap(integer, integer), - CVC4ApiException); + CVC5ApiException); } namespace { @@ -1547,7 +1547,7 @@ TEST_F(TestApiBlackSolver, getSeparationHeapTerm1) d_solver.setOption("produce-models", "true"); Term t = d_solver.mkTrue(); d_solver.assertFormula(t); - ASSERT_THROW(d_solver.getSeparationHeap(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationHeap(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationHeapTerm2) @@ -1556,7 +1556,7 @@ TEST_F(TestApiBlackSolver, getSeparationHeapTerm2) d_solver.setOption("incremental", "false"); d_solver.setOption("produce-models", "false"); checkSimpleSeparationConstraints(&d_solver); - ASSERT_THROW(d_solver.getSeparationHeap(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationHeap(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationHeapTerm3) @@ -1567,7 +1567,7 @@ TEST_F(TestApiBlackSolver, getSeparationHeapTerm3) Term t = d_solver.mkFalse(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getSeparationHeap(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationHeap(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationHeapTerm4) @@ -1578,7 +1578,7 @@ TEST_F(TestApiBlackSolver, getSeparationHeapTerm4) Term t = d_solver.mkTrue(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getSeparationHeap(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationHeap(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationHeapTerm5) @@ -1597,7 +1597,7 @@ TEST_F(TestApiBlackSolver, getSeparationNilTerm1) d_solver.setOption("produce-models", "true"); Term t = d_solver.mkTrue(); d_solver.assertFormula(t); - ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationNilTerm2) @@ -1606,7 +1606,7 @@ TEST_F(TestApiBlackSolver, getSeparationNilTerm2) d_solver.setOption("incremental", "false"); d_solver.setOption("produce-models", "false"); checkSimpleSeparationConstraints(&d_solver); - ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationNilTerm3) @@ -1617,7 +1617,7 @@ TEST_F(TestApiBlackSolver, getSeparationNilTerm3) Term t = d_solver.mkFalse(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationNilTerm4) @@ -1628,7 +1628,7 @@ TEST_F(TestApiBlackSolver, getSeparationNilTerm4) Term t = d_solver.mkTrue(); d_solver.assertFormula(t); d_solver.checkSat(); - ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC4ApiException); + ASSERT_THROW(d_solver.getSeparationNilTerm(), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSeparationNilTerm5) @@ -1644,26 +1644,26 @@ TEST_F(TestApiBlackSolver, push1) { d_solver.setOption("incremental", "true"); ASSERT_NO_THROW(d_solver.push(1)); - ASSERT_THROW(d_solver.setOption("incremental", "false"), CVC4ApiException); - ASSERT_THROW(d_solver.setOption("incremental", "true"), CVC4ApiException); + ASSERT_THROW(d_solver.setOption("incremental", "false"), CVC5ApiException); + ASSERT_THROW(d_solver.setOption("incremental", "true"), CVC5ApiException); } TEST_F(TestApiBlackSolver, push2) { d_solver.setOption("incremental", "false"); - ASSERT_THROW(d_solver.push(1), CVC4ApiException); + ASSERT_THROW(d_solver.push(1), CVC5ApiException); } TEST_F(TestApiBlackSolver, pop1) { d_solver.setOption("incremental", "false"); - ASSERT_THROW(d_solver.pop(1), CVC4ApiException); + ASSERT_THROW(d_solver.pop(1), CVC5ApiException); } TEST_F(TestApiBlackSolver, pop2) { d_solver.setOption("incremental", "true"); - ASSERT_THROW(d_solver.pop(1), CVC4ApiException); + ASSERT_THROW(d_solver.pop(1), CVC5ApiException); } TEST_F(TestApiBlackSolver, pop3) @@ -1671,7 +1671,7 @@ TEST_F(TestApiBlackSolver, pop3) d_solver.setOption("incremental", "true"); ASSERT_NO_THROW(d_solver.push(1)); ASSERT_NO_THROW(d_solver.pop(1)); - ASSERT_THROW(d_solver.pop(1), CVC4ApiException); + ASSERT_THROW(d_solver.pop(1), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModel1) @@ -1680,7 +1680,7 @@ TEST_F(TestApiBlackSolver, blockModel1) Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); d_solver.checkSat(); - ASSERT_THROW(d_solver.blockModel(), CVC4ApiException); + ASSERT_THROW(d_solver.blockModel(), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModel2) @@ -1689,7 +1689,7 @@ TEST_F(TestApiBlackSolver, blockModel2) Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); d_solver.checkSat(); - ASSERT_THROW(d_solver.blockModel(), CVC4ApiException); + ASSERT_THROW(d_solver.blockModel(), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModel3) @@ -1698,7 +1698,7 @@ TEST_F(TestApiBlackSolver, blockModel3) d_solver.setOption("block-models", "literals"); Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); - ASSERT_THROW(d_solver.blockModel(), CVC4ApiException); + ASSERT_THROW(d_solver.blockModel(), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModel4) @@ -1718,10 +1718,10 @@ TEST_F(TestApiBlackSolver, blockModelValues1) Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); d_solver.checkSat(); - ASSERT_THROW(d_solver.blockModelValues({}), CVC4ApiException); - ASSERT_THROW(d_solver.blockModelValues({Term()}), CVC4ApiException); + ASSERT_THROW(d_solver.blockModelValues({}), CVC5ApiException); + ASSERT_THROW(d_solver.blockModelValues({Term()}), CVC5ApiException); ASSERT_THROW(d_solver.blockModelValues({Solver().mkBoolean(false)}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModelValues2) @@ -1730,7 +1730,7 @@ TEST_F(TestApiBlackSolver, blockModelValues2) Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); d_solver.checkSat(); - ASSERT_THROW(d_solver.blockModelValues({x}), CVC4ApiException); + ASSERT_THROW(d_solver.blockModelValues({x}), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModelValues3) @@ -1739,7 +1739,7 @@ TEST_F(TestApiBlackSolver, blockModelValues3) Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); d_solver.checkSat(); - ASSERT_THROW(d_solver.blockModelValues({x}), CVC4ApiException); + ASSERT_THROW(d_solver.blockModelValues({x}), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModelValues4) @@ -1748,7 +1748,7 @@ TEST_F(TestApiBlackSolver, blockModelValues4) d_solver.setOption("block-models", "literals"); Term x = d_solver.mkConst(d_solver.getBooleanSort(), "x"); d_solver.assertFormula(x.eqTerm(x)); - ASSERT_THROW(d_solver.blockModelValues({x}), CVC4ApiException); + ASSERT_THROW(d_solver.blockModelValues({x}), CVC5ApiException); } TEST_F(TestApiBlackSolver, blockModelValues5) @@ -1763,9 +1763,9 @@ TEST_F(TestApiBlackSolver, blockModelValues5) TEST_F(TestApiBlackSolver, setInfo) { - ASSERT_THROW(d_solver.setInfo("cvc4-lagic", "QF_BV"), CVC4ApiException); - ASSERT_THROW(d_solver.setInfo("cvc2-logic", "QF_BV"), CVC4ApiException); - ASSERT_THROW(d_solver.setInfo("cvc4-logic", "asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.setInfo("cvc4-lagic", "QF_BV"), CVC5ApiException); + ASSERT_THROW(d_solver.setInfo("cvc2-logic", "QF_BV"), CVC5ApiException); + ASSERT_THROW(d_solver.setInfo("cvc4-logic", "asdf"), CVC5ApiException); ASSERT_NO_THROW(d_solver.setInfo("source", "asdf")); ASSERT_NO_THROW(d_solver.setInfo("category", "asdf")); @@ -1779,17 +1779,17 @@ TEST_F(TestApiBlackSolver, setInfo) ASSERT_NO_THROW(d_solver.setInfo("smt-lib-version", "2.0")); ASSERT_NO_THROW(d_solver.setInfo("smt-lib-version", "2.5")); ASSERT_NO_THROW(d_solver.setInfo("smt-lib-version", "2.6")); - ASSERT_THROW(d_solver.setInfo("smt-lib-version", ".0"), CVC4ApiException); + ASSERT_THROW(d_solver.setInfo("smt-lib-version", ".0"), CVC5ApiException); ASSERT_NO_THROW(d_solver.setInfo("status", "sat")); ASSERT_NO_THROW(d_solver.setInfo("status", "unsat")); ASSERT_NO_THROW(d_solver.setInfo("status", "unknown")); - ASSERT_THROW(d_solver.setInfo("status", "asdf"), CVC4ApiException); + ASSERT_THROW(d_solver.setInfo("status", "asdf"), CVC5ApiException); } TEST_F(TestApiBlackSolver, simplify) { - ASSERT_THROW(d_solver.simplify(Term()), CVC4ApiException); + ASSERT_THROW(d_solver.simplify(Term()), CVC5ApiException); Sort bvSort = d_solver.mkBitVectorSort(32); Sort uSort = d_solver.mkUninterpretedSort("u"); @@ -1819,7 +1819,7 @@ TEST_F(TestApiBlackSolver, simplify) ASSERT_NE(d_solver.mkTrue(), x_eq_b); ASSERT_NE(d_solver.mkTrue(), d_solver.simplify(x_eq_b)); Solver slv; - ASSERT_THROW(slv.simplify(x), CVC4ApiException); + ASSERT_THROW(slv.simplify(x), CVC5ApiException); Term i1 = d_solver.mkConst(d_solver.getIntegerSort(), "i1"); ASSERT_NO_THROW(d_solver.simplify(i1)); @@ -1865,18 +1865,18 @@ TEST_F(TestApiBlackSolver, simplify) TEST_F(TestApiBlackSolver, assertFormula) { ASSERT_NO_THROW(d_solver.assertFormula(d_solver.mkTrue())); - ASSERT_THROW(d_solver.assertFormula(Term()), CVC4ApiException); + ASSERT_THROW(d_solver.assertFormula(Term()), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.assertFormula(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.assertFormula(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkEntailed) { d_solver.setOption("incremental", "false"); ASSERT_NO_THROW(d_solver.checkEntailed(d_solver.mkTrue())); - ASSERT_THROW(d_solver.checkEntailed(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(d_solver.checkEntailed(d_solver.mkTrue()), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkEntailed1) @@ -1887,11 +1887,11 @@ TEST_F(TestApiBlackSolver, checkEntailed1) Term z = d_solver.mkTerm(AND, x, y); d_solver.setOption("incremental", "true"); ASSERT_NO_THROW(d_solver.checkEntailed(d_solver.mkTrue())); - ASSERT_THROW(d_solver.checkEntailed(Term()), CVC4ApiException); + ASSERT_THROW(d_solver.checkEntailed(Term()), CVC5ApiException); ASSERT_NO_THROW(d_solver.checkEntailed(d_solver.mkTrue())); ASSERT_NO_THROW(d_solver.checkEntailed(z)); Solver slv; - ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkEntailed2) @@ -1936,27 +1936,27 @@ TEST_F(TestApiBlackSolver, checkEntailed2) ASSERT_NO_THROW(d_solver.checkEntailed(d_solver.mkTerm(DISTINCT, x, y))); ASSERT_NO_THROW(d_solver.checkEntailed( {d_solver.mkFalse(), d_solver.mkTerm(DISTINCT, x, y)})); - ASSERT_THROW(d_solver.checkEntailed(n), CVC4ApiException); + ASSERT_THROW(d_solver.checkEntailed(n), CVC5ApiException); ASSERT_THROW(d_solver.checkEntailed({n, d_solver.mkTerm(DISTINCT, x, y)}), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkEntailed(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkSat) { d_solver.setOption("incremental", "false"); ASSERT_NO_THROW(d_solver.checkSat()); - ASSERT_THROW(d_solver.checkSat(), CVC4ApiException); + ASSERT_THROW(d_solver.checkSat(), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkSatAssuming) { d_solver.setOption("incremental", "false"); ASSERT_NO_THROW(d_solver.checkSatAssuming(d_solver.mkTrue())); - ASSERT_THROW(d_solver.checkSatAssuming(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(d_solver.checkSatAssuming(d_solver.mkTrue()), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkSatAssuming1) @@ -1967,11 +1967,11 @@ TEST_F(TestApiBlackSolver, checkSatAssuming1) Term z = d_solver.mkTerm(AND, x, y); d_solver.setOption("incremental", "true"); ASSERT_NO_THROW(d_solver.checkSatAssuming(d_solver.mkTrue())); - ASSERT_THROW(d_solver.checkSatAssuming(Term()), CVC4ApiException); + ASSERT_THROW(d_solver.checkSatAssuming(Term()), CVC5ApiException); ASSERT_NO_THROW(d_solver.checkSatAssuming(d_solver.mkTrue())); ASSERT_NO_THROW(d_solver.checkSatAssuming(z)); Solver slv; - ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, checkSatAssuming2) @@ -2016,28 +2016,28 @@ TEST_F(TestApiBlackSolver, checkSatAssuming2) ASSERT_NO_THROW(d_solver.checkSatAssuming(d_solver.mkTerm(DISTINCT, x, y))); ASSERT_NO_THROW(d_solver.checkSatAssuming( {d_solver.mkFalse(), d_solver.mkTerm(DISTINCT, x, y)})); - ASSERT_THROW(d_solver.checkSatAssuming(n), CVC4ApiException); + ASSERT_THROW(d_solver.checkSatAssuming(n), CVC5ApiException); ASSERT_THROW(d_solver.checkSatAssuming({n, d_solver.mkTerm(DISTINCT, x, y)}), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC4ApiException); + ASSERT_THROW(slv.checkSatAssuming(d_solver.mkTrue()), CVC5ApiException); } TEST_F(TestApiBlackSolver, setLogic) { ASSERT_NO_THROW(d_solver.setLogic("AUFLIRA")); - ASSERT_THROW(d_solver.setLogic("AF_BV"), CVC4ApiException); + ASSERT_THROW(d_solver.setLogic("AF_BV"), CVC5ApiException); d_solver.assertFormula(d_solver.mkTrue()); - ASSERT_THROW(d_solver.setLogic("AUFLIRA"), CVC4ApiException); + ASSERT_THROW(d_solver.setLogic("AUFLIRA"), CVC5ApiException); } TEST_F(TestApiBlackSolver, setOption) { ASSERT_NO_THROW(d_solver.setOption("bv-sat-solver", "minisat")); - ASSERT_THROW(d_solver.setOption("bv-sat-solver", "1"), CVC4ApiException); + ASSERT_THROW(d_solver.setOption("bv-sat-solver", "1"), CVC5ApiException); d_solver.assertFormula(d_solver.mkTrue()); ASSERT_THROW(d_solver.setOption("bv-sat-solver", "minisat"), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, resetAssertions) @@ -2065,11 +2065,11 @@ TEST_F(TestApiBlackSolver, mkSygusVar) ASSERT_NO_THROW(d_solver.mkSygusVar(funSort)); ASSERT_NO_THROW(d_solver.mkSygusVar(boolSort, std::string("b"))); ASSERT_NO_THROW(d_solver.mkSygusVar(funSort, "")); - ASSERT_THROW(d_solver.mkSygusVar(Sort()), CVC4ApiException); + ASSERT_THROW(d_solver.mkSygusVar(Sort()), CVC5ApiException); ASSERT_THROW(d_solver.mkSygusVar(d_solver.getNullSort(), "a"), - CVC4ApiException); + CVC5ApiException); Solver slv; - ASSERT_THROW(slv.mkSygusVar(boolSort), CVC4ApiException); + ASSERT_THROW(slv.mkSygusVar(boolSort), CVC5ApiException); } TEST_F(TestApiBlackSolver, mkSygusGrammar) @@ -2081,16 +2081,16 @@ TEST_F(TestApiBlackSolver, mkSygusGrammar) ASSERT_NO_THROW(d_solver.mkSygusGrammar({}, {intVar})); ASSERT_NO_THROW(d_solver.mkSygusGrammar({boolVar}, {intVar})); - ASSERT_THROW(d_solver.mkSygusGrammar({}, {}), CVC4ApiException); - ASSERT_THROW(d_solver.mkSygusGrammar({}, {nullTerm}), CVC4ApiException); - ASSERT_THROW(d_solver.mkSygusGrammar({}, {boolTerm}), CVC4ApiException); - ASSERT_THROW(d_solver.mkSygusGrammar({boolTerm}, {intVar}), CVC4ApiException); + ASSERT_THROW(d_solver.mkSygusGrammar({}, {}), CVC5ApiException); + ASSERT_THROW(d_solver.mkSygusGrammar({}, {nullTerm}), CVC5ApiException); + ASSERT_THROW(d_solver.mkSygusGrammar({}, {boolTerm}), CVC5ApiException); + ASSERT_THROW(d_solver.mkSygusGrammar({boolTerm}, {intVar}), CVC5ApiException); Solver slv; Term boolVar2 = slv.mkVar(slv.getBooleanSort()); Term intVar2 = slv.mkVar(slv.getIntegerSort()); ASSERT_NO_THROW(slv.mkSygusGrammar({boolVar2}, {intVar2})); - ASSERT_THROW(slv.mkSygusGrammar({boolVar}, {intVar2}), CVC4ApiException); - ASSERT_THROW(slv.mkSygusGrammar({boolVar2}, {intVar}), CVC4ApiException); + ASSERT_THROW(slv.mkSygusGrammar({boolVar}, {intVar2}), CVC5ApiException); + ASSERT_THROW(slv.mkSygusGrammar({boolVar2}, {intVar}), CVC5ApiException); } TEST_F(TestApiBlackSolver, synthFun) @@ -2115,16 +2115,16 @@ TEST_F(TestApiBlackSolver, synthFun) ASSERT_NO_THROW(d_solver.synthFun("f1", {x}, boolean)); ASSERT_NO_THROW(d_solver.synthFun("f2", {x}, boolean, g1)); - ASSERT_THROW(d_solver.synthFun("f3", {nullTerm}, boolean), CVC4ApiException); - ASSERT_THROW(d_solver.synthFun("f4", {}, null), CVC4ApiException); - ASSERT_THROW(d_solver.synthFun("f6", {x}, boolean, g2), CVC4ApiException); + ASSERT_THROW(d_solver.synthFun("f3", {nullTerm}, boolean), CVC5ApiException); + ASSERT_THROW(d_solver.synthFun("f4", {}, null), CVC5ApiException); + ASSERT_THROW(d_solver.synthFun("f6", {x}, boolean, g2), CVC5ApiException); Solver slv; Term x2 = slv.mkVar(slv.getBooleanSort()); ASSERT_NO_THROW(slv.synthFun("f1", {x2}, slv.getBooleanSort())); ASSERT_THROW(slv.synthFun("", {}, d_solver.getBooleanSort()), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.synthFun("f1", {x}, d_solver.getBooleanSort()), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, synthInv) @@ -2148,8 +2148,8 @@ TEST_F(TestApiBlackSolver, synthInv) ASSERT_NO_THROW(d_solver.synthInv("i1", {x})); ASSERT_NO_THROW(d_solver.synthInv("i2", {x}, g1)); - ASSERT_THROW(d_solver.synthInv("i3", {nullTerm}), CVC4ApiException); - ASSERT_THROW(d_solver.synthInv("i4", {x}, g2), CVC4ApiException); + ASSERT_THROW(d_solver.synthInv("i3", {nullTerm}), CVC5ApiException); + ASSERT_THROW(d_solver.synthInv("i4", {x}, g2), CVC5ApiException); } TEST_F(TestApiBlackSolver, addSygusConstraint) @@ -2159,11 +2159,11 @@ TEST_F(TestApiBlackSolver, addSygusConstraint) Term intTerm = d_solver.mkInteger(1); ASSERT_NO_THROW(d_solver.addSygusConstraint(boolTerm)); - ASSERT_THROW(d_solver.addSygusConstraint(nullTerm), CVC4ApiException); - ASSERT_THROW(d_solver.addSygusConstraint(intTerm), CVC4ApiException); + ASSERT_THROW(d_solver.addSygusConstraint(nullTerm), CVC5ApiException); + ASSERT_THROW(d_solver.addSygusConstraint(intTerm), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.addSygusConstraint(boolTerm), CVC4ApiException); + ASSERT_THROW(slv.addSygusConstraint(boolTerm), CVC5ApiException); } TEST_F(TestApiBlackSolver, addSygusInvConstraint) @@ -2188,36 +2188,36 @@ TEST_F(TestApiBlackSolver, addSygusInvConstraint) ASSERT_NO_THROW(d_solver.addSygusInvConstraint(inv, pre, trans, post)); ASSERT_THROW(d_solver.addSygusInvConstraint(nullTerm, pre, trans, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, nullTerm, trans, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, nullTerm, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, trans, nullTerm), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(intTerm, pre, trans, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv1, pre, trans, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, trans, trans, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, intTerm, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, pre, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, trans1, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, trans2, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, trans3, post), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.addSygusInvConstraint(inv, pre, trans, trans), - CVC4ApiException); + CVC5ApiException); Solver slv; Sort boolean2 = slv.getBooleanSort(); Sort real2 = slv.getRealSort(); @@ -2227,13 +2227,13 @@ TEST_F(TestApiBlackSolver, addSygusInvConstraint) Term post22 = slv.declareFun("post", {real2}, boolean2); ASSERT_NO_THROW(slv.addSygusInvConstraint(inv22, pre22, trans22, post22)); ASSERT_THROW(slv.addSygusInvConstraint(inv, pre22, trans22, post22), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.addSygusInvConstraint(inv22, pre, trans22, post22), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.addSygusInvConstraint(inv22, pre22, trans, post22), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(slv.addSygusInvConstraint(inv22, pre22, trans22, post), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSolver, getSynthSolution) @@ -2245,18 +2245,18 @@ TEST_F(TestApiBlackSolver, getSynthSolution) Term x = d_solver.mkBoolean(false); Term f = d_solver.synthFun("f", {}, d_solver.getBooleanSort()); - ASSERT_THROW(d_solver.getSynthSolution(f), CVC4ApiException); + ASSERT_THROW(d_solver.getSynthSolution(f), CVC5ApiException); d_solver.checkSynth(); ASSERT_NO_THROW(d_solver.getSynthSolution(f)); ASSERT_NO_THROW(d_solver.getSynthSolution(f)); - ASSERT_THROW(d_solver.getSynthSolution(nullTerm), CVC4ApiException); - ASSERT_THROW(d_solver.getSynthSolution(x), CVC4ApiException); + ASSERT_THROW(d_solver.getSynthSolution(nullTerm), CVC5ApiException); + ASSERT_THROW(d_solver.getSynthSolution(x), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.getSynthSolution(f), CVC4ApiException); + ASSERT_THROW(slv.getSynthSolution(f), CVC5ApiException); } TEST_F(TestApiBlackSolver, getSynthSolutions) @@ -2268,20 +2268,20 @@ TEST_F(TestApiBlackSolver, getSynthSolutions) Term x = d_solver.mkBoolean(false); Term f = d_solver.synthFun("f", {}, d_solver.getBooleanSort()); - ASSERT_THROW(d_solver.getSynthSolutions({}), CVC4ApiException); - ASSERT_THROW(d_solver.getSynthSolutions({f}), CVC4ApiException); + ASSERT_THROW(d_solver.getSynthSolutions({}), CVC5ApiException); + ASSERT_THROW(d_solver.getSynthSolutions({f}), CVC5ApiException); d_solver.checkSynth(); ASSERT_NO_THROW(d_solver.getSynthSolutions({f})); ASSERT_NO_THROW(d_solver.getSynthSolutions({f, f})); - ASSERT_THROW(d_solver.getSynthSolutions({}), CVC4ApiException); - ASSERT_THROW(d_solver.getSynthSolutions({nullTerm}), CVC4ApiException); - ASSERT_THROW(d_solver.getSynthSolutions({x}), CVC4ApiException); + ASSERT_THROW(d_solver.getSynthSolutions({}), CVC5ApiException); + ASSERT_THROW(d_solver.getSynthSolutions({nullTerm}), CVC5ApiException); + ASSERT_THROW(d_solver.getSynthSolutions({x}), CVC5ApiException); Solver slv; - ASSERT_THROW(slv.getSynthSolutions({x}), CVC4ApiException); + ASSERT_THROW(slv.getSynthSolutions({x}), CVC5ApiException); } TEST_F(TestApiBlackSolver, tupleProject) @@ -2315,9 +2315,9 @@ TEST_F(TestApiBlackSolver, tupleProject) d_solver.mkTerm(d_solver.mkOp(TUPLE_PROJECT, indices4), tuple)); ASSERT_THROW(d_solver.mkTerm(d_solver.mkOp(TUPLE_PROJECT, indices5), tuple), - CVC4ApiException); + CVC5ApiException); ASSERT_THROW(d_solver.mkTerm(d_solver.mkOp(TUPLE_PROJECT, indices6), tuple), - CVC4ApiException); + CVC5ApiException); std::vector indices = {0, 3, 2, 0, 1, 2}; diff --git a/test/unit/api/sort_black.cpp b/test/unit/api/sort_black.cpp index 8338ffa2c..c2b924bfa 100644 --- a/test/unit/api/sort_black.cpp +++ b/test/unit/api/sort_black.cpp @@ -282,7 +282,7 @@ TEST_F(TestApiBlackSort, getDatatype) ASSERT_NO_THROW(dtypeSort.getDatatype()); // create bv sort, check should fail Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getDatatype(), CVC4ApiException); + ASSERT_THROW(bvSort.getDatatype(), CVC5ApiException); } TEST_F(TestApiBlackSort, datatypeSorts) @@ -291,9 +291,9 @@ TEST_F(TestApiBlackSort, datatypeSorts) Sort dtypeSort = create_datatype_sort(); Datatype dt = dtypeSort.getDatatype(); ASSERT_FALSE(dtypeSort.isConstructor()); - ASSERT_THROW(dtypeSort.getConstructorCodomainSort(), CVC4ApiException); - ASSERT_THROW(dtypeSort.getConstructorDomainSorts(), CVC4ApiException); - ASSERT_THROW(dtypeSort.getConstructorArity(), CVC4ApiException); + ASSERT_THROW(dtypeSort.getConstructorCodomainSort(), CVC5ApiException); + ASSERT_THROW(dtypeSort.getConstructorDomainSorts(), CVC5ApiException); + ASSERT_THROW(dtypeSort.getConstructorArity(), CVC5ApiException); // get constructor DatatypeConstructor dcons = dt[0]; @@ -314,8 +314,8 @@ TEST_F(TestApiBlackSort, datatypeSorts) ASSERT_EQ(isConsTerm.getSort().getTesterDomainSort(), dtypeSort); Sort booleanSort = d_solver.getBooleanSort(); ASSERT_EQ(isConsTerm.getSort().getTesterCodomainSort(), booleanSort); - ASSERT_THROW(booleanSort.getTesterDomainSort(), CVC4ApiException); - ASSERT_THROW(booleanSort.getTesterCodomainSort(), CVC4ApiException); + ASSERT_THROW(booleanSort.getTesterDomainSort(), CVC5ApiException); + ASSERT_THROW(booleanSort.getTesterCodomainSort(), CVC5ApiException); // get selector DatatypeSelector dselTail = dcons[1]; @@ -323,8 +323,8 @@ TEST_F(TestApiBlackSort, datatypeSorts) ASSERT_TRUE(tailTerm.getSort().isSelector()); ASSERT_EQ(tailTerm.getSort().getSelectorDomainSort(), dtypeSort); ASSERT_EQ(tailTerm.getSort().getSelectorCodomainSort(), dtypeSort); - ASSERT_THROW(booleanSort.getSelectorDomainSort(), CVC4ApiException); - ASSERT_THROW(booleanSort.getSelectorCodomainSort(), CVC4ApiException); + ASSERT_THROW(booleanSort.getSelectorDomainSort(), CVC5ApiException); + ASSERT_THROW(booleanSort.getSelectorCodomainSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, instantiate) @@ -343,7 +343,7 @@ TEST_F(TestApiBlackSort, instantiate) Sort dtypeSort = d_solver.mkDatatypeSort(dtypeSpec); ASSERT_THROW( dtypeSort.instantiate(std::vector{d_solver.getIntegerSort()}), - CVC4ApiException); + CVC5ApiException); } TEST_F(TestApiBlackSort, getFunctionArity) @@ -352,7 +352,7 @@ TEST_F(TestApiBlackSort, getFunctionArity) d_solver.getIntegerSort()); ASSERT_NO_THROW(funSort.getFunctionArity()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getFunctionArity(), CVC4ApiException); + ASSERT_THROW(bvSort.getFunctionArity(), CVC5ApiException); } TEST_F(TestApiBlackSort, getFunctionDomainSorts) @@ -361,7 +361,7 @@ TEST_F(TestApiBlackSort, getFunctionDomainSorts) d_solver.getIntegerSort()); ASSERT_NO_THROW(funSort.getFunctionDomainSorts()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getFunctionDomainSorts(), CVC4ApiException); + ASSERT_THROW(bvSort.getFunctionDomainSorts(), CVC5ApiException); } TEST_F(TestApiBlackSort, getFunctionCodomainSort) @@ -370,7 +370,7 @@ TEST_F(TestApiBlackSort, getFunctionCodomainSort) d_solver.getIntegerSort()); ASSERT_NO_THROW(funSort.getFunctionCodomainSort()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getFunctionCodomainSort(), CVC4ApiException); + ASSERT_THROW(bvSort.getFunctionCodomainSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getArrayIndexSort) @@ -379,7 +379,7 @@ TEST_F(TestApiBlackSort, getArrayIndexSort) Sort indexSort = d_solver.mkBitVectorSort(32); Sort arraySort = d_solver.mkArraySort(indexSort, elementSort); ASSERT_NO_THROW(arraySort.getArrayIndexSort()); - ASSERT_THROW(indexSort.getArrayIndexSort(), CVC4ApiException); + ASSERT_THROW(indexSort.getArrayIndexSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getArrayElementSort) @@ -388,7 +388,7 @@ TEST_F(TestApiBlackSort, getArrayElementSort) Sort indexSort = d_solver.mkBitVectorSort(32); Sort arraySort = d_solver.mkArraySort(indexSort, elementSort); ASSERT_NO_THROW(arraySort.getArrayElementSort()); - ASSERT_THROW(indexSort.getArrayElementSort(), CVC4ApiException); + ASSERT_THROW(indexSort.getArrayElementSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getSetElementSort) @@ -398,7 +398,7 @@ TEST_F(TestApiBlackSort, getSetElementSort) Sort elementSort = setSort.getSetElementSort(); ASSERT_EQ(elementSort, d_solver.getIntegerSort()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getSetElementSort(), CVC4ApiException); + ASSERT_THROW(bvSort.getSetElementSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getBagElementSort) @@ -408,7 +408,7 @@ TEST_F(TestApiBlackSort, getBagElementSort) Sort elementSort = bagSort.getBagElementSort(); ASSERT_EQ(elementSort, d_solver.getIntegerSort()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getBagElementSort(), CVC4ApiException); + ASSERT_THROW(bvSort.getBagElementSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getSequenceElementSort) @@ -418,7 +418,7 @@ TEST_F(TestApiBlackSort, getSequenceElementSort) ASSERT_NO_THROW(seqSort.getSequenceElementSort()); Sort bvSort = d_solver.mkBitVectorSort(32); ASSERT_FALSE(bvSort.isSequence()); - ASSERT_THROW(bvSort.getSequenceElementSort(), CVC4ApiException); + ASSERT_THROW(bvSort.getSequenceElementSort(), CVC5ApiException); } TEST_F(TestApiBlackSort, getUninterpretedSortName) @@ -426,7 +426,7 @@ TEST_F(TestApiBlackSort, getUninterpretedSortName) Sort uSort = d_solver.mkUninterpretedSort("u"); ASSERT_NO_THROW(uSort.getUninterpretedSortName()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getUninterpretedSortName(), CVC4ApiException); + ASSERT_THROW(bvSort.getUninterpretedSortName(), CVC5ApiException); } TEST_F(TestApiBlackSort, isUninterpretedSortParameterized) @@ -437,7 +437,7 @@ TEST_F(TestApiBlackSort, isUninterpretedSortParameterized) Sort siSort = sSort.instantiate({uSort}); ASSERT_TRUE(siSort.isUninterpretedSortParameterized()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.isUninterpretedSortParameterized(), CVC4ApiException); + ASSERT_THROW(bvSort.isUninterpretedSortParameterized(), CVC5ApiException); } TEST_F(TestApiBlackSort, getUninterpretedSortParamSorts) @@ -448,7 +448,7 @@ TEST_F(TestApiBlackSort, getUninterpretedSortParamSorts) Sort siSort = sSort.instantiate({uSort, uSort}); ASSERT_EQ(siSort.getUninterpretedSortParamSorts().size(), 2); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getUninterpretedSortParamSorts(), CVC4ApiException); + ASSERT_THROW(bvSort.getUninterpretedSortParamSorts(), CVC5ApiException); } TEST_F(TestApiBlackSort, getUninterpretedSortConstructorName) @@ -456,7 +456,7 @@ TEST_F(TestApiBlackSort, getUninterpretedSortConstructorName) Sort sSort = d_solver.mkSortConstructorSort("s", 2); ASSERT_NO_THROW(sSort.getSortConstructorName()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getSortConstructorName(), CVC4ApiException); + ASSERT_THROW(bvSort.getSortConstructorName(), CVC5ApiException); } TEST_F(TestApiBlackSort, getUninterpretedSortConstructorArity) @@ -464,7 +464,7 @@ TEST_F(TestApiBlackSort, getUninterpretedSortConstructorArity) Sort sSort = d_solver.mkSortConstructorSort("s", 2); ASSERT_NO_THROW(sSort.getSortConstructorArity()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getSortConstructorArity(), CVC4ApiException); + ASSERT_THROW(bvSort.getSortConstructorArity(), CVC5ApiException); } TEST_F(TestApiBlackSort, getBVSize) @@ -472,7 +472,7 @@ TEST_F(TestApiBlackSort, getBVSize) Sort bvSort = d_solver.mkBitVectorSort(32); ASSERT_NO_THROW(bvSort.getBVSize()); Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort()); - ASSERT_THROW(setSort.getBVSize(), CVC4ApiException); + ASSERT_THROW(setSort.getBVSize(), CVC5ApiException); } TEST_F(TestApiBlackSort, getFPExponentSize) @@ -482,7 +482,7 @@ TEST_F(TestApiBlackSort, getFPExponentSize) Sort fpSort = d_solver.mkFloatingPointSort(4, 8); ASSERT_NO_THROW(fpSort.getFPExponentSize()); Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort()); - ASSERT_THROW(setSort.getFPExponentSize(), CVC4ApiException); + ASSERT_THROW(setSort.getFPExponentSize(), CVC5ApiException); } } @@ -493,7 +493,7 @@ TEST_F(TestApiBlackSort, getFPSignificandSize) Sort fpSort = d_solver.mkFloatingPointSort(4, 8); ASSERT_NO_THROW(fpSort.getFPSignificandSize()); Sort setSort = d_solver.mkSetSort(d_solver.getIntegerSort()); - ASSERT_THROW(setSort.getFPSignificandSize(), CVC4ApiException); + ASSERT_THROW(setSort.getFPSignificandSize(), CVC5ApiException); } } @@ -518,7 +518,7 @@ TEST_F(TestApiBlackSort, getDatatypeParamSorts) DatatypeConstructorDecl nil = d_solver.mkDatatypeConstructorDecl("nil"); dtypeSpec.addConstructor(nil); Sort dtypeSort = d_solver.mkDatatypeSort(dtypeSpec); - ASSERT_THROW(dtypeSort.getDatatypeParamSorts(), CVC4ApiException); + ASSERT_THROW(dtypeSort.getDatatypeParamSorts(), CVC5ApiException); } TEST_F(TestApiBlackSort, getDatatypeArity) @@ -534,7 +534,7 @@ TEST_F(TestApiBlackSort, getDatatypeArity) ASSERT_NO_THROW(dtypeSort.getDatatypeArity()); // create bv sort, check should fail Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getDatatypeArity(), CVC4ApiException); + ASSERT_THROW(bvSort.getDatatypeArity(), CVC5ApiException); } TEST_F(TestApiBlackSort, getTupleLength) @@ -543,7 +543,7 @@ TEST_F(TestApiBlackSort, getTupleLength) {d_solver.getIntegerSort(), d_solver.getIntegerSort()}); ASSERT_NO_THROW(tupleSort.getTupleLength()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getTupleLength(), CVC4ApiException); + ASSERT_THROW(bvSort.getTupleLength(), CVC5ApiException); } TEST_F(TestApiBlackSort, getTupleSorts) @@ -552,7 +552,7 @@ TEST_F(TestApiBlackSort, getTupleSorts) {d_solver.getIntegerSort(), d_solver.getIntegerSort()}); ASSERT_NO_THROW(tupleSort.getTupleSorts()); Sort bvSort = d_solver.mkBitVectorSort(32); - ASSERT_THROW(bvSort.getTupleSorts(), CVC4ApiException); + ASSERT_THROW(bvSort.getTupleSorts(), CVC5ApiException); } TEST_F(TestApiBlackSort, sortCompare) diff --git a/test/unit/api/term_black.cpp b/test/unit/api/term_black.cpp index d894f9720..9dd803c93 100644 --- a/test/unit/api/term_black.cpp +++ b/test/unit/api/term_black.cpp @@ -43,7 +43,7 @@ TEST_F(TestApiBlackTerm, eq) TEST_F(TestApiBlackTerm, getId) { Term n; - ASSERT_THROW(n.getId(), CVC4ApiException); + ASSERT_THROW(n.getId(), CVC5ApiException); Term x = d_solver.mkVar(d_solver.getIntegerSort(), "x"); ASSERT_NO_THROW(x.getId()); Term y = x; @@ -62,7 +62,7 @@ TEST_F(TestApiBlackTerm, getKind) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term n; - ASSERT_THROW(n.getKind(), CVC4ApiException); + ASSERT_THROW(n.getKind(), CVC5ApiException); Term x = d_solver.mkVar(uSort, "x"); ASSERT_NO_THROW(x.getKind()); Term y = d_solver.mkVar(uSort, "y"); @@ -104,7 +104,7 @@ TEST_F(TestApiBlackTerm, getSort) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term n; - ASSERT_THROW(n.getSort(), CVC4ApiException); + ASSERT_THROW(n.getSort(), CVC5ApiException); Term x = d_solver.mkVar(bvSort, "x"); ASSERT_NO_THROW(x.getSort()); ASSERT_EQ(x.getSort(), bvSort); @@ -152,7 +152,7 @@ TEST_F(TestApiBlackTerm, getOp) Term b = d_solver.mkConst(bvsort, "b"); ASSERT_FALSE(x.hasOp()); - ASSERT_THROW(x.getOp(), CVC4ApiException); + ASSERT_THROW(x.getOp(), CVC5ApiException); Term ab = d_solver.mkTerm(SELECT, a, b); Op ext = d_solver.mkOp(BITVECTOR_EXTRACT, 4, 0); @@ -169,7 +169,7 @@ TEST_F(TestApiBlackTerm, getOp) Term fx = d_solver.mkTerm(APPLY_UF, f, x); ASSERT_FALSE(f.hasOp()); - ASSERT_THROW(f.getOp(), CVC4ApiException); + ASSERT_THROW(f.getOp(), CVC5ApiException); ASSERT_TRUE(fx.hasOp()); std::vector children(fx.begin(), fx.end()); // testing rebuild from op and children @@ -228,21 +228,21 @@ TEST_F(TestApiBlackTerm, notTerm) Sort funSort1 = d_solver.mkFunctionSort(bvSort, intSort); Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); - ASSERT_THROW(Term().notTerm(), CVC4ApiException); + ASSERT_THROW(Term().notTerm(), CVC5ApiException); Term b = d_solver.mkTrue(); ASSERT_NO_THROW(b.notTerm()); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.notTerm(), CVC4ApiException); + ASSERT_THROW(x.notTerm(), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.notTerm(), CVC4ApiException); + ASSERT_THROW(f.notTerm(), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.notTerm(), CVC4ApiException); + ASSERT_THROW(p.notTerm(), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.notTerm(), CVC4ApiException); + ASSERT_THROW(zero.notTerm(), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.notTerm(), CVC4ApiException); + ASSERT_THROW(f_x.notTerm(), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.notTerm(), CVC4ApiException); + ASSERT_THROW(sum.notTerm(), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.notTerm()); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); @@ -258,59 +258,59 @@ TEST_F(TestApiBlackTerm, andTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().andTerm(b), CVC4ApiException); - ASSERT_THROW(b.andTerm(Term()), CVC4ApiException); + ASSERT_THROW(Term().andTerm(b), CVC5ApiException); + ASSERT_THROW(b.andTerm(Term()), CVC5ApiException); ASSERT_NO_THROW(b.andTerm(b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.andTerm(b), CVC4ApiException); - ASSERT_THROW(x.andTerm(x), CVC4ApiException); + ASSERT_THROW(x.andTerm(b), CVC5ApiException); + ASSERT_THROW(x.andTerm(x), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.andTerm(b), CVC4ApiException); - ASSERT_THROW(f.andTerm(x), CVC4ApiException); - ASSERT_THROW(f.andTerm(f), CVC4ApiException); + ASSERT_THROW(f.andTerm(b), CVC5ApiException); + ASSERT_THROW(f.andTerm(x), CVC5ApiException); + ASSERT_THROW(f.andTerm(f), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.andTerm(b), CVC4ApiException); - ASSERT_THROW(p.andTerm(x), CVC4ApiException); - ASSERT_THROW(p.andTerm(f), CVC4ApiException); - ASSERT_THROW(p.andTerm(p), CVC4ApiException); + ASSERT_THROW(p.andTerm(b), CVC5ApiException); + ASSERT_THROW(p.andTerm(x), CVC5ApiException); + ASSERT_THROW(p.andTerm(f), CVC5ApiException); + ASSERT_THROW(p.andTerm(p), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.andTerm(b), CVC4ApiException); - ASSERT_THROW(zero.andTerm(x), CVC4ApiException); - ASSERT_THROW(zero.andTerm(f), CVC4ApiException); - ASSERT_THROW(zero.andTerm(p), CVC4ApiException); - ASSERT_THROW(zero.andTerm(zero), CVC4ApiException); + ASSERT_THROW(zero.andTerm(b), CVC5ApiException); + ASSERT_THROW(zero.andTerm(x), CVC5ApiException); + ASSERT_THROW(zero.andTerm(f), CVC5ApiException); + ASSERT_THROW(zero.andTerm(p), CVC5ApiException); + ASSERT_THROW(zero.andTerm(zero), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.andTerm(b), CVC4ApiException); - ASSERT_THROW(f_x.andTerm(x), CVC4ApiException); - ASSERT_THROW(f_x.andTerm(f), CVC4ApiException); - ASSERT_THROW(f_x.andTerm(p), CVC4ApiException); - ASSERT_THROW(f_x.andTerm(zero), CVC4ApiException); - ASSERT_THROW(f_x.andTerm(f_x), CVC4ApiException); + ASSERT_THROW(f_x.andTerm(b), CVC5ApiException); + ASSERT_THROW(f_x.andTerm(x), CVC5ApiException); + ASSERT_THROW(f_x.andTerm(f), CVC5ApiException); + ASSERT_THROW(f_x.andTerm(p), CVC5ApiException); + ASSERT_THROW(f_x.andTerm(zero), CVC5ApiException); + ASSERT_THROW(f_x.andTerm(f_x), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.andTerm(b), CVC4ApiException); - ASSERT_THROW(sum.andTerm(x), CVC4ApiException); - ASSERT_THROW(sum.andTerm(f), CVC4ApiException); - ASSERT_THROW(sum.andTerm(p), CVC4ApiException); - ASSERT_THROW(sum.andTerm(zero), CVC4ApiException); - ASSERT_THROW(sum.andTerm(f_x), CVC4ApiException); - ASSERT_THROW(sum.andTerm(sum), CVC4ApiException); + ASSERT_THROW(sum.andTerm(b), CVC5ApiException); + ASSERT_THROW(sum.andTerm(x), CVC5ApiException); + ASSERT_THROW(sum.andTerm(f), CVC5ApiException); + ASSERT_THROW(sum.andTerm(p), CVC5ApiException); + ASSERT_THROW(sum.andTerm(zero), CVC5ApiException); + ASSERT_THROW(sum.andTerm(f_x), CVC5ApiException); + ASSERT_THROW(sum.andTerm(sum), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.andTerm(b)); - ASSERT_THROW(p_0.andTerm(x), CVC4ApiException); - ASSERT_THROW(p_0.andTerm(f), CVC4ApiException); - ASSERT_THROW(p_0.andTerm(p), CVC4ApiException); - ASSERT_THROW(p_0.andTerm(zero), CVC4ApiException); - ASSERT_THROW(p_0.andTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_0.andTerm(sum), CVC4ApiException); + ASSERT_THROW(p_0.andTerm(x), CVC5ApiException); + ASSERT_THROW(p_0.andTerm(f), CVC5ApiException); + ASSERT_THROW(p_0.andTerm(p), CVC5ApiException); + ASSERT_THROW(p_0.andTerm(zero), CVC5ApiException); + ASSERT_THROW(p_0.andTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_0.andTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_0.andTerm(p_0)); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.andTerm(b)); - ASSERT_THROW(p_f_x.andTerm(x), CVC4ApiException); - ASSERT_THROW(p_f_x.andTerm(f), CVC4ApiException); - ASSERT_THROW(p_f_x.andTerm(p), CVC4ApiException); - ASSERT_THROW(p_f_x.andTerm(zero), CVC4ApiException); - ASSERT_THROW(p_f_x.andTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_f_x.andTerm(sum), CVC4ApiException); + ASSERT_THROW(p_f_x.andTerm(x), CVC5ApiException); + ASSERT_THROW(p_f_x.andTerm(f), CVC5ApiException); + ASSERT_THROW(p_f_x.andTerm(p), CVC5ApiException); + ASSERT_THROW(p_f_x.andTerm(zero), CVC5ApiException); + ASSERT_THROW(p_f_x.andTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_f_x.andTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_f_x.andTerm(p_0)); ASSERT_NO_THROW(p_f_x.andTerm(p_f_x)); } @@ -324,59 +324,59 @@ TEST_F(TestApiBlackTerm, orTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().orTerm(b), CVC4ApiException); - ASSERT_THROW(b.orTerm(Term()), CVC4ApiException); + ASSERT_THROW(Term().orTerm(b), CVC5ApiException); + ASSERT_THROW(b.orTerm(Term()), CVC5ApiException); ASSERT_NO_THROW(b.orTerm(b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.orTerm(b), CVC4ApiException); - ASSERT_THROW(x.orTerm(x), CVC4ApiException); + ASSERT_THROW(x.orTerm(b), CVC5ApiException); + ASSERT_THROW(x.orTerm(x), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.orTerm(b), CVC4ApiException); - ASSERT_THROW(f.orTerm(x), CVC4ApiException); - ASSERT_THROW(f.orTerm(f), CVC4ApiException); + ASSERT_THROW(f.orTerm(b), CVC5ApiException); + ASSERT_THROW(f.orTerm(x), CVC5ApiException); + ASSERT_THROW(f.orTerm(f), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.orTerm(b), CVC4ApiException); - ASSERT_THROW(p.orTerm(x), CVC4ApiException); - ASSERT_THROW(p.orTerm(f), CVC4ApiException); - ASSERT_THROW(p.orTerm(p), CVC4ApiException); + ASSERT_THROW(p.orTerm(b), CVC5ApiException); + ASSERT_THROW(p.orTerm(x), CVC5ApiException); + ASSERT_THROW(p.orTerm(f), CVC5ApiException); + ASSERT_THROW(p.orTerm(p), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.orTerm(b), CVC4ApiException); - ASSERT_THROW(zero.orTerm(x), CVC4ApiException); - ASSERT_THROW(zero.orTerm(f), CVC4ApiException); - ASSERT_THROW(zero.orTerm(p), CVC4ApiException); - ASSERT_THROW(zero.orTerm(zero), CVC4ApiException); + ASSERT_THROW(zero.orTerm(b), CVC5ApiException); + ASSERT_THROW(zero.orTerm(x), CVC5ApiException); + ASSERT_THROW(zero.orTerm(f), CVC5ApiException); + ASSERT_THROW(zero.orTerm(p), CVC5ApiException); + ASSERT_THROW(zero.orTerm(zero), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.orTerm(b), CVC4ApiException); - ASSERT_THROW(f_x.orTerm(x), CVC4ApiException); - ASSERT_THROW(f_x.orTerm(f), CVC4ApiException); - ASSERT_THROW(f_x.orTerm(p), CVC4ApiException); - ASSERT_THROW(f_x.orTerm(zero), CVC4ApiException); - ASSERT_THROW(f_x.orTerm(f_x), CVC4ApiException); + ASSERT_THROW(f_x.orTerm(b), CVC5ApiException); + ASSERT_THROW(f_x.orTerm(x), CVC5ApiException); + ASSERT_THROW(f_x.orTerm(f), CVC5ApiException); + ASSERT_THROW(f_x.orTerm(p), CVC5ApiException); + ASSERT_THROW(f_x.orTerm(zero), CVC5ApiException); + ASSERT_THROW(f_x.orTerm(f_x), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.orTerm(b), CVC4ApiException); - ASSERT_THROW(sum.orTerm(x), CVC4ApiException); - ASSERT_THROW(sum.orTerm(f), CVC4ApiException); - ASSERT_THROW(sum.orTerm(p), CVC4ApiException); - ASSERT_THROW(sum.orTerm(zero), CVC4ApiException); - ASSERT_THROW(sum.orTerm(f_x), CVC4ApiException); - ASSERT_THROW(sum.orTerm(sum), CVC4ApiException); + ASSERT_THROW(sum.orTerm(b), CVC5ApiException); + ASSERT_THROW(sum.orTerm(x), CVC5ApiException); + ASSERT_THROW(sum.orTerm(f), CVC5ApiException); + ASSERT_THROW(sum.orTerm(p), CVC5ApiException); + ASSERT_THROW(sum.orTerm(zero), CVC5ApiException); + ASSERT_THROW(sum.orTerm(f_x), CVC5ApiException); + ASSERT_THROW(sum.orTerm(sum), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.orTerm(b)); - ASSERT_THROW(p_0.orTerm(x), CVC4ApiException); - ASSERT_THROW(p_0.orTerm(f), CVC4ApiException); - ASSERT_THROW(p_0.orTerm(p), CVC4ApiException); - ASSERT_THROW(p_0.orTerm(zero), CVC4ApiException); - ASSERT_THROW(p_0.orTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_0.orTerm(sum), CVC4ApiException); + ASSERT_THROW(p_0.orTerm(x), CVC5ApiException); + ASSERT_THROW(p_0.orTerm(f), CVC5ApiException); + ASSERT_THROW(p_0.orTerm(p), CVC5ApiException); + ASSERT_THROW(p_0.orTerm(zero), CVC5ApiException); + ASSERT_THROW(p_0.orTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_0.orTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_0.orTerm(p_0)); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.orTerm(b)); - ASSERT_THROW(p_f_x.orTerm(x), CVC4ApiException); - ASSERT_THROW(p_f_x.orTerm(f), CVC4ApiException); - ASSERT_THROW(p_f_x.orTerm(p), CVC4ApiException); - ASSERT_THROW(p_f_x.orTerm(zero), CVC4ApiException); - ASSERT_THROW(p_f_x.orTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_f_x.orTerm(sum), CVC4ApiException); + ASSERT_THROW(p_f_x.orTerm(x), CVC5ApiException); + ASSERT_THROW(p_f_x.orTerm(f), CVC5ApiException); + ASSERT_THROW(p_f_x.orTerm(p), CVC5ApiException); + ASSERT_THROW(p_f_x.orTerm(zero), CVC5ApiException); + ASSERT_THROW(p_f_x.orTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_f_x.orTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_f_x.orTerm(p_0)); ASSERT_NO_THROW(p_f_x.orTerm(p_f_x)); } @@ -390,59 +390,59 @@ TEST_F(TestApiBlackTerm, xorTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().xorTerm(b), CVC4ApiException); - ASSERT_THROW(b.xorTerm(Term()), CVC4ApiException); + ASSERT_THROW(Term().xorTerm(b), CVC5ApiException); + ASSERT_THROW(b.xorTerm(Term()), CVC5ApiException); ASSERT_NO_THROW(b.xorTerm(b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.xorTerm(b), CVC4ApiException); - ASSERT_THROW(x.xorTerm(x), CVC4ApiException); + ASSERT_THROW(x.xorTerm(b), CVC5ApiException); + ASSERT_THROW(x.xorTerm(x), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.xorTerm(b), CVC4ApiException); - ASSERT_THROW(f.xorTerm(x), CVC4ApiException); - ASSERT_THROW(f.xorTerm(f), CVC4ApiException); + ASSERT_THROW(f.xorTerm(b), CVC5ApiException); + ASSERT_THROW(f.xorTerm(x), CVC5ApiException); + ASSERT_THROW(f.xorTerm(f), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.xorTerm(b), CVC4ApiException); - ASSERT_THROW(p.xorTerm(x), CVC4ApiException); - ASSERT_THROW(p.xorTerm(f), CVC4ApiException); - ASSERT_THROW(p.xorTerm(p), CVC4ApiException); + ASSERT_THROW(p.xorTerm(b), CVC5ApiException); + ASSERT_THROW(p.xorTerm(x), CVC5ApiException); + ASSERT_THROW(p.xorTerm(f), CVC5ApiException); + ASSERT_THROW(p.xorTerm(p), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.xorTerm(b), CVC4ApiException); - ASSERT_THROW(zero.xorTerm(x), CVC4ApiException); - ASSERT_THROW(zero.xorTerm(f), CVC4ApiException); - ASSERT_THROW(zero.xorTerm(p), CVC4ApiException); - ASSERT_THROW(zero.xorTerm(zero), CVC4ApiException); + ASSERT_THROW(zero.xorTerm(b), CVC5ApiException); + ASSERT_THROW(zero.xorTerm(x), CVC5ApiException); + ASSERT_THROW(zero.xorTerm(f), CVC5ApiException); + ASSERT_THROW(zero.xorTerm(p), CVC5ApiException); + ASSERT_THROW(zero.xorTerm(zero), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.xorTerm(b), CVC4ApiException); - ASSERT_THROW(f_x.xorTerm(x), CVC4ApiException); - ASSERT_THROW(f_x.xorTerm(f), CVC4ApiException); - ASSERT_THROW(f_x.xorTerm(p), CVC4ApiException); - ASSERT_THROW(f_x.xorTerm(zero), CVC4ApiException); - ASSERT_THROW(f_x.xorTerm(f_x), CVC4ApiException); + ASSERT_THROW(f_x.xorTerm(b), CVC5ApiException); + ASSERT_THROW(f_x.xorTerm(x), CVC5ApiException); + ASSERT_THROW(f_x.xorTerm(f), CVC5ApiException); + ASSERT_THROW(f_x.xorTerm(p), CVC5ApiException); + ASSERT_THROW(f_x.xorTerm(zero), CVC5ApiException); + ASSERT_THROW(f_x.xorTerm(f_x), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.xorTerm(b), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(x), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(f), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(p), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(zero), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(f_x), CVC4ApiException); - ASSERT_THROW(sum.xorTerm(sum), CVC4ApiException); + ASSERT_THROW(sum.xorTerm(b), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(x), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(f), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(p), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(zero), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(f_x), CVC5ApiException); + ASSERT_THROW(sum.xorTerm(sum), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.xorTerm(b)); - ASSERT_THROW(p_0.xorTerm(x), CVC4ApiException); - ASSERT_THROW(p_0.xorTerm(f), CVC4ApiException); - ASSERT_THROW(p_0.xorTerm(p), CVC4ApiException); - ASSERT_THROW(p_0.xorTerm(zero), CVC4ApiException); - ASSERT_THROW(p_0.xorTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_0.xorTerm(sum), CVC4ApiException); + ASSERT_THROW(p_0.xorTerm(x), CVC5ApiException); + ASSERT_THROW(p_0.xorTerm(f), CVC5ApiException); + ASSERT_THROW(p_0.xorTerm(p), CVC5ApiException); + ASSERT_THROW(p_0.xorTerm(zero), CVC5ApiException); + ASSERT_THROW(p_0.xorTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_0.xorTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_0.xorTerm(p_0)); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.xorTerm(b)); - ASSERT_THROW(p_f_x.xorTerm(x), CVC4ApiException); - ASSERT_THROW(p_f_x.xorTerm(f), CVC4ApiException); - ASSERT_THROW(p_f_x.xorTerm(p), CVC4ApiException); - ASSERT_THROW(p_f_x.xorTerm(zero), CVC4ApiException); - ASSERT_THROW(p_f_x.xorTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_f_x.xorTerm(sum), CVC4ApiException); + ASSERT_THROW(p_f_x.xorTerm(x), CVC5ApiException); + ASSERT_THROW(p_f_x.xorTerm(f), CVC5ApiException); + ASSERT_THROW(p_f_x.xorTerm(p), CVC5ApiException); + ASSERT_THROW(p_f_x.xorTerm(zero), CVC5ApiException); + ASSERT_THROW(p_f_x.xorTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_f_x.xorTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_f_x.xorTerm(p_0)); ASSERT_NO_THROW(p_f_x.xorTerm(p_f_x)); } @@ -456,59 +456,59 @@ TEST_F(TestApiBlackTerm, eqTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().eqTerm(b), CVC4ApiException); - ASSERT_THROW(b.eqTerm(Term()), CVC4ApiException); + ASSERT_THROW(Term().eqTerm(b), CVC5ApiException); + ASSERT_THROW(b.eqTerm(Term()), CVC5ApiException); ASSERT_NO_THROW(b.eqTerm(b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.eqTerm(b), CVC4ApiException); + ASSERT_THROW(x.eqTerm(b), CVC5ApiException); ASSERT_NO_THROW(x.eqTerm(x)); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.eqTerm(b), CVC4ApiException); - ASSERT_THROW(f.eqTerm(x), CVC4ApiException); + ASSERT_THROW(f.eqTerm(b), CVC5ApiException); + ASSERT_THROW(f.eqTerm(x), CVC5ApiException); ASSERT_NO_THROW(f.eqTerm(f)); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.eqTerm(b), CVC4ApiException); - ASSERT_THROW(p.eqTerm(x), CVC4ApiException); - ASSERT_THROW(p.eqTerm(f), CVC4ApiException); + ASSERT_THROW(p.eqTerm(b), CVC5ApiException); + ASSERT_THROW(p.eqTerm(x), CVC5ApiException); + ASSERT_THROW(p.eqTerm(f), CVC5ApiException); ASSERT_NO_THROW(p.eqTerm(p)); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.eqTerm(b), CVC4ApiException); - ASSERT_THROW(zero.eqTerm(x), CVC4ApiException); - ASSERT_THROW(zero.eqTerm(f), CVC4ApiException); - ASSERT_THROW(zero.eqTerm(p), CVC4ApiException); + ASSERT_THROW(zero.eqTerm(b), CVC5ApiException); + ASSERT_THROW(zero.eqTerm(x), CVC5ApiException); + ASSERT_THROW(zero.eqTerm(f), CVC5ApiException); + ASSERT_THROW(zero.eqTerm(p), CVC5ApiException); ASSERT_NO_THROW(zero.eqTerm(zero)); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.eqTerm(b), CVC4ApiException); - ASSERT_THROW(f_x.eqTerm(x), CVC4ApiException); - ASSERT_THROW(f_x.eqTerm(f), CVC4ApiException); - ASSERT_THROW(f_x.eqTerm(p), CVC4ApiException); + ASSERT_THROW(f_x.eqTerm(b), CVC5ApiException); + ASSERT_THROW(f_x.eqTerm(x), CVC5ApiException); + ASSERT_THROW(f_x.eqTerm(f), CVC5ApiException); + ASSERT_THROW(f_x.eqTerm(p), CVC5ApiException); ASSERT_NO_THROW(f_x.eqTerm(zero)); ASSERT_NO_THROW(f_x.eqTerm(f_x)); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.eqTerm(b), CVC4ApiException); - ASSERT_THROW(sum.eqTerm(x), CVC4ApiException); - ASSERT_THROW(sum.eqTerm(f), CVC4ApiException); - ASSERT_THROW(sum.eqTerm(p), CVC4ApiException); + ASSERT_THROW(sum.eqTerm(b), CVC5ApiException); + ASSERT_THROW(sum.eqTerm(x), CVC5ApiException); + ASSERT_THROW(sum.eqTerm(f), CVC5ApiException); + ASSERT_THROW(sum.eqTerm(p), CVC5ApiException); ASSERT_NO_THROW(sum.eqTerm(zero)); ASSERT_NO_THROW(sum.eqTerm(f_x)); ASSERT_NO_THROW(sum.eqTerm(sum)); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.eqTerm(b)); - ASSERT_THROW(p_0.eqTerm(x), CVC4ApiException); - ASSERT_THROW(p_0.eqTerm(f), CVC4ApiException); - ASSERT_THROW(p_0.eqTerm(p), CVC4ApiException); - ASSERT_THROW(p_0.eqTerm(zero), CVC4ApiException); - ASSERT_THROW(p_0.eqTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_0.eqTerm(sum), CVC4ApiException); + ASSERT_THROW(p_0.eqTerm(x), CVC5ApiException); + ASSERT_THROW(p_0.eqTerm(f), CVC5ApiException); + ASSERT_THROW(p_0.eqTerm(p), CVC5ApiException); + ASSERT_THROW(p_0.eqTerm(zero), CVC5ApiException); + ASSERT_THROW(p_0.eqTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_0.eqTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_0.eqTerm(p_0)); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.eqTerm(b)); - ASSERT_THROW(p_f_x.eqTerm(x), CVC4ApiException); - ASSERT_THROW(p_f_x.eqTerm(f), CVC4ApiException); - ASSERT_THROW(p_f_x.eqTerm(p), CVC4ApiException); - ASSERT_THROW(p_f_x.eqTerm(zero), CVC4ApiException); - ASSERT_THROW(p_f_x.eqTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_f_x.eqTerm(sum), CVC4ApiException); + ASSERT_THROW(p_f_x.eqTerm(x), CVC5ApiException); + ASSERT_THROW(p_f_x.eqTerm(f), CVC5ApiException); + ASSERT_THROW(p_f_x.eqTerm(p), CVC5ApiException); + ASSERT_THROW(p_f_x.eqTerm(zero), CVC5ApiException); + ASSERT_THROW(p_f_x.eqTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_f_x.eqTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_f_x.eqTerm(p_0)); ASSERT_NO_THROW(p_f_x.eqTerm(p_f_x)); } @@ -522,59 +522,59 @@ TEST_F(TestApiBlackTerm, impTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().impTerm(b), CVC4ApiException); - ASSERT_THROW(b.impTerm(Term()), CVC4ApiException); + ASSERT_THROW(Term().impTerm(b), CVC5ApiException); + ASSERT_THROW(b.impTerm(Term()), CVC5ApiException); ASSERT_NO_THROW(b.impTerm(b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); - ASSERT_THROW(x.impTerm(b), CVC4ApiException); - ASSERT_THROW(x.impTerm(x), CVC4ApiException); + ASSERT_THROW(x.impTerm(b), CVC5ApiException); + ASSERT_THROW(x.impTerm(x), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.impTerm(b), CVC4ApiException); - ASSERT_THROW(f.impTerm(x), CVC4ApiException); - ASSERT_THROW(f.impTerm(f), CVC4ApiException); + ASSERT_THROW(f.impTerm(b), CVC5ApiException); + ASSERT_THROW(f.impTerm(x), CVC5ApiException); + ASSERT_THROW(f.impTerm(f), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.impTerm(b), CVC4ApiException); - ASSERT_THROW(p.impTerm(x), CVC4ApiException); - ASSERT_THROW(p.impTerm(f), CVC4ApiException); - ASSERT_THROW(p.impTerm(p), CVC4ApiException); + ASSERT_THROW(p.impTerm(b), CVC5ApiException); + ASSERT_THROW(p.impTerm(x), CVC5ApiException); + ASSERT_THROW(p.impTerm(f), CVC5ApiException); + ASSERT_THROW(p.impTerm(p), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.impTerm(b), CVC4ApiException); - ASSERT_THROW(zero.impTerm(x), CVC4ApiException); - ASSERT_THROW(zero.impTerm(f), CVC4ApiException); - ASSERT_THROW(zero.impTerm(p), CVC4ApiException); - ASSERT_THROW(zero.impTerm(zero), CVC4ApiException); + ASSERT_THROW(zero.impTerm(b), CVC5ApiException); + ASSERT_THROW(zero.impTerm(x), CVC5ApiException); + ASSERT_THROW(zero.impTerm(f), CVC5ApiException); + ASSERT_THROW(zero.impTerm(p), CVC5ApiException); + ASSERT_THROW(zero.impTerm(zero), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.impTerm(b), CVC4ApiException); - ASSERT_THROW(f_x.impTerm(x), CVC4ApiException); - ASSERT_THROW(f_x.impTerm(f), CVC4ApiException); - ASSERT_THROW(f_x.impTerm(p), CVC4ApiException); - ASSERT_THROW(f_x.impTerm(zero), CVC4ApiException); - ASSERT_THROW(f_x.impTerm(f_x), CVC4ApiException); + ASSERT_THROW(f_x.impTerm(b), CVC5ApiException); + ASSERT_THROW(f_x.impTerm(x), CVC5ApiException); + ASSERT_THROW(f_x.impTerm(f), CVC5ApiException); + ASSERT_THROW(f_x.impTerm(p), CVC5ApiException); + ASSERT_THROW(f_x.impTerm(zero), CVC5ApiException); + ASSERT_THROW(f_x.impTerm(f_x), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.impTerm(b), CVC4ApiException); - ASSERT_THROW(sum.impTerm(x), CVC4ApiException); - ASSERT_THROW(sum.impTerm(f), CVC4ApiException); - ASSERT_THROW(sum.impTerm(p), CVC4ApiException); - ASSERT_THROW(sum.impTerm(zero), CVC4ApiException); - ASSERT_THROW(sum.impTerm(f_x), CVC4ApiException); - ASSERT_THROW(sum.impTerm(sum), CVC4ApiException); + ASSERT_THROW(sum.impTerm(b), CVC5ApiException); + ASSERT_THROW(sum.impTerm(x), CVC5ApiException); + ASSERT_THROW(sum.impTerm(f), CVC5ApiException); + ASSERT_THROW(sum.impTerm(p), CVC5ApiException); + ASSERT_THROW(sum.impTerm(zero), CVC5ApiException); + ASSERT_THROW(sum.impTerm(f_x), CVC5ApiException); + ASSERT_THROW(sum.impTerm(sum), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.impTerm(b)); - ASSERT_THROW(p_0.impTerm(x), CVC4ApiException); - ASSERT_THROW(p_0.impTerm(f), CVC4ApiException); - ASSERT_THROW(p_0.impTerm(p), CVC4ApiException); - ASSERT_THROW(p_0.impTerm(zero), CVC4ApiException); - ASSERT_THROW(p_0.impTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_0.impTerm(sum), CVC4ApiException); + ASSERT_THROW(p_0.impTerm(x), CVC5ApiException); + ASSERT_THROW(p_0.impTerm(f), CVC5ApiException); + ASSERT_THROW(p_0.impTerm(p), CVC5ApiException); + ASSERT_THROW(p_0.impTerm(zero), CVC5ApiException); + ASSERT_THROW(p_0.impTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_0.impTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_0.impTerm(p_0)); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.impTerm(b)); - ASSERT_THROW(p_f_x.impTerm(x), CVC4ApiException); - ASSERT_THROW(p_f_x.impTerm(f), CVC4ApiException); - ASSERT_THROW(p_f_x.impTerm(p), CVC4ApiException); - ASSERT_THROW(p_f_x.impTerm(zero), CVC4ApiException); - ASSERT_THROW(p_f_x.impTerm(f_x), CVC4ApiException); - ASSERT_THROW(p_f_x.impTerm(sum), CVC4ApiException); + ASSERT_THROW(p_f_x.impTerm(x), CVC5ApiException); + ASSERT_THROW(p_f_x.impTerm(f), CVC5ApiException); + ASSERT_THROW(p_f_x.impTerm(p), CVC5ApiException); + ASSERT_THROW(p_f_x.impTerm(zero), CVC5ApiException); + ASSERT_THROW(p_f_x.impTerm(f_x), CVC5ApiException); + ASSERT_THROW(p_f_x.impTerm(sum), CVC5ApiException); ASSERT_NO_THROW(p_f_x.impTerm(p_0)); ASSERT_NO_THROW(p_f_x.impTerm(p_f_x)); } @@ -588,39 +588,39 @@ TEST_F(TestApiBlackTerm, iteTerm) Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort); Term b = d_solver.mkTrue(); - ASSERT_THROW(Term().iteTerm(b, b), CVC4ApiException); - ASSERT_THROW(b.iteTerm(Term(), b), CVC4ApiException); - ASSERT_THROW(b.iteTerm(b, Term()), CVC4ApiException); + ASSERT_THROW(Term().iteTerm(b, b), CVC5ApiException); + ASSERT_THROW(b.iteTerm(Term(), b), CVC5ApiException); + ASSERT_THROW(b.iteTerm(b, Term()), CVC5ApiException); ASSERT_NO_THROW(b.iteTerm(b, b)); Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x"); ASSERT_NO_THROW(b.iteTerm(x, x)); ASSERT_NO_THROW(b.iteTerm(b, b)); - ASSERT_THROW(b.iteTerm(x, b), CVC4ApiException); - ASSERT_THROW(x.iteTerm(x, x), CVC4ApiException); - ASSERT_THROW(x.iteTerm(x, b), CVC4ApiException); + ASSERT_THROW(b.iteTerm(x, b), CVC5ApiException); + ASSERT_THROW(x.iteTerm(x, x), CVC5ApiException); + ASSERT_THROW(x.iteTerm(x, b), CVC5ApiException); Term f = d_solver.mkVar(funSort1, "f"); - ASSERT_THROW(f.iteTerm(b, b), CVC4ApiException); - ASSERT_THROW(x.iteTerm(b, x), CVC4ApiException); + ASSERT_THROW(f.iteTerm(b, b), CVC5ApiException); + ASSERT_THROW(x.iteTerm(b, x), CVC5ApiException); Term p = d_solver.mkVar(funSort2, "p"); - ASSERT_THROW(p.iteTerm(b, b), CVC4ApiException); - ASSERT_THROW(p.iteTerm(x, b), CVC4ApiException); + ASSERT_THROW(p.iteTerm(b, b), CVC5ApiException); + ASSERT_THROW(p.iteTerm(x, b), CVC5ApiException); Term zero = d_solver.mkInteger(0); - ASSERT_THROW(zero.iteTerm(x, x), CVC4ApiException); - ASSERT_THROW(zero.iteTerm(x, b), CVC4ApiException); + ASSERT_THROW(zero.iteTerm(x, x), CVC5ApiException); + ASSERT_THROW(zero.iteTerm(x, b), CVC5ApiException); Term f_x = d_solver.mkTerm(APPLY_UF, f, x); - ASSERT_THROW(f_x.iteTerm(b, b), CVC4ApiException); - ASSERT_THROW(f_x.iteTerm(b, x), CVC4ApiException); + ASSERT_THROW(f_x.iteTerm(b, b), CVC5ApiException); + ASSERT_THROW(f_x.iteTerm(b, x), CVC5ApiException); Term sum = d_solver.mkTerm(PLUS, f_x, f_x); - ASSERT_THROW(sum.iteTerm(x, x), CVC4ApiException); - ASSERT_THROW(sum.iteTerm(b, x), CVC4ApiException); + ASSERT_THROW(sum.iteTerm(x, x), CVC5ApiException); + ASSERT_THROW(sum.iteTerm(b, x), CVC5ApiException); Term p_0 = d_solver.mkTerm(APPLY_UF, p, zero); ASSERT_NO_THROW(p_0.iteTerm(b, b)); ASSERT_NO_THROW(p_0.iteTerm(x, x)); - ASSERT_THROW(p_0.iteTerm(x, b), CVC4ApiException); + ASSERT_THROW(p_0.iteTerm(x, b), CVC5ApiException); Term p_f_x = d_solver.mkTerm(APPLY_UF, p, f_x); ASSERT_NO_THROW(p_f_x.iteTerm(b, b)); ASSERT_NO_THROW(p_f_x.iteTerm(x, x)); - ASSERT_THROW(p_f_x.iteTerm(x, b), CVC4ApiException); + ASSERT_THROW(p_f_x.iteTerm(x, b), CVC5ApiException); } TEST_F(TestApiBlackTerm, termAssignment) @@ -650,7 +650,7 @@ TEST_F(TestApiBlackTerm, termChildren) ASSERT_EQ(t1[0], two); ASSERT_EQ(t1.getNumChildren(), 2); Term tnull; - ASSERT_THROW(tnull.getNumChildren(), CVC4ApiException); + ASSERT_THROW(tnull.getNumChildren(), CVC5ApiException); // apply term f(2) Sort intSort = d_solver.getIntegerSort(); @@ -661,7 +661,7 @@ TEST_F(TestApiBlackTerm, termChildren) ASSERT_EQ(t2.getNumChildren(), 2); ASSERT_EQ(t2[0], f); ASSERT_EQ(t2[1], two); - ASSERT_THROW(tnull[0], CVC4ApiException); + ASSERT_THROW(tnull[0], CVC5ApiException); } TEST_F(TestApiBlackTerm, getInteger) @@ -679,15 +679,15 @@ TEST_F(TestApiBlackTerm, getInteger) Term int11 = d_solver.mkInteger("18446744073709551616"); Term int12 = d_solver.mkInteger("-0"); - ASSERT_THROW(d_solver.mkInteger(""), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("-"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("-1-"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("0.0"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("-0.1"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("012"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("0000"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("-01"), CVC4ApiException); - ASSERT_THROW(d_solver.mkInteger("-00"), CVC4ApiException); + ASSERT_THROW(d_solver.mkInteger(""), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("-"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("-1-"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("0.0"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("-0.1"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("012"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("0000"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("-01"), CVC5ApiException); + ASSERT_THROW(d_solver.mkInteger("-00"), CVC5ApiException); ASSERT_TRUE(!int1.isInt32() && !int1.isUInt32() && !int1.isInt64() && !int1.isUInt64() && int1.isInteger()); @@ -760,7 +760,7 @@ TEST_F(TestApiBlackTerm, substitute) ASSERT_EQ(xpx.substitute(x, one), onepone); ASSERT_EQ(onepone.substitute(one, x), xpx); // incorrect due to type - ASSERT_THROW(xpx.substitute(one, ttrue), CVC4ApiException); + ASSERT_THROW(xpx.substitute(one, ttrue), CVC5ApiException); // simultaneous substitution Term y = d_solver.mkConst(d_solver.getIntegerSort(), "y"); @@ -776,28 +776,28 @@ TEST_F(TestApiBlackTerm, substitute) // incorrect substitution due to arity rs.pop_back(); - ASSERT_THROW(xpy.substitute(es, rs), CVC4ApiException); + ASSERT_THROW(xpy.substitute(es, rs), CVC5ApiException); // incorrect substitution due to types rs.push_back(ttrue); - ASSERT_THROW(xpy.substitute(es, rs), CVC4ApiException); + ASSERT_THROW(xpy.substitute(es, rs), CVC5ApiException); // null cannot substitute Term tnull; - ASSERT_THROW(tnull.substitute(one, x), CVC4ApiException); - ASSERT_THROW(xpx.substitute(tnull, x), CVC4ApiException); - ASSERT_THROW(xpx.substitute(x, tnull), CVC4ApiException); + ASSERT_THROW(tnull.substitute(one, x), CVC5ApiException); + ASSERT_THROW(xpx.substitute(tnull, x), CVC5ApiException); + ASSERT_THROW(xpx.substitute(x, tnull), CVC5ApiException); rs.pop_back(); rs.push_back(tnull); - ASSERT_THROW(xpy.substitute(es, rs), CVC4ApiException); + ASSERT_THROW(xpy.substitute(es, rs), CVC5ApiException); es.clear(); rs.clear(); es.push_back(x); rs.push_back(y); - ASSERT_THROW(tnull.substitute(es, rs), CVC4ApiException); + ASSERT_THROW(tnull.substitute(es, rs), CVC5ApiException); es.push_back(tnull); rs.push_back(one); - ASSERT_THROW(xpx.substitute(es, rs), CVC4ApiException); + ASSERT_THROW(xpx.substitute(es, rs), CVC5ApiException); } TEST_F(TestApiBlackTerm, constArray) @@ -810,7 +810,7 @@ TEST_F(TestApiBlackTerm, constArray) ASSERT_EQ(constarr.getKind(), CONST_ARRAY); ASSERT_EQ(constarr.getConstArrayBase(), one); - ASSERT_THROW(a.getConstArrayBase(), CVC4ApiException); + ASSERT_THROW(a.getConstArrayBase(), CVC5ApiException); arrsort = d_solver.mkArraySort(d_solver.getRealSort(), d_solver.getRealSort()); @@ -837,7 +837,7 @@ TEST_F(TestApiBlackTerm, constSequenceElements) // A seq.unit app is not a constant sequence (regardless of whether it is // applied to a constant). Term su = d_solver.mkTerm(SEQ_UNIT, d_solver.mkReal(1)); - ASSERT_THROW(su.getConstSequenceElements(), CVC4ApiException); + ASSERT_THROW(su.getConstSequenceElements(), CVC5ApiException); } TEST_F(TestApiBlackTerm, termScopedToString) diff --git a/test/unit/main/interactive_shell_black.cpp b/test/unit/main/interactive_shell_black.cpp index 71ad2b1f4..8af29a8e4 100644 --- a/test/unit/main/interactive_shell_black.cpp +++ b/test/unit/main/interactive_shell_black.cpp @@ -39,7 +39,7 @@ class TestMainBlackInteractiveShell : public TestInternal d_sout.reset(new std::stringstream); d_options.set(options::in, d_sin.get()); d_options.set(options::out, d_sout.get()); - d_options.set(options::inputLanguage, language::input::LANG_CVC4); + d_options.set(options::inputLanguage, language::input::LANG_CVC); d_solver.reset(new cvc5::api::Solver(&d_options)); d_symman.reset(new SymbolManager(d_solver.get())); } diff --git a/test/unit/node/node_black.cpp b/test/unit/node/node_black.cpp index 94eb3ae83..2309c0ac7 100644 --- a/test/unit/node/node_black.cpp +++ b/test/unit/node/node_black.cpp @@ -623,7 +623,7 @@ TEST_F(TestNodeBlackNode, dagifier) OR, fffx_eq_x, fffx_eq_y, fx_eq_gx, x_eq_y, fgx_eq_gy); std::stringstream sstr; - sstr << Node::setdepth(-1) << Node::setlanguage(language::output::LANG_CVC4); + sstr << Node::setdepth(-1) << Node::setlanguage(language::output::LANG_CVC); sstr << Node::dag(false) << n; // never dagify ASSERT_EQ(sstr.str(), "(f(f(f(x))) = x) OR (f(f(f(x))) = y) OR (f(x) = g(x)) OR (x = " diff --git a/test/unit/parser/parser_black.cpp b/test/unit/parser/parser_black.cpp index 1e8e210ca..b6c433663 100644 --- a/test/unit/parser/parser_black.cpp +++ b/test/unit/parser/parser_black.cpp @@ -193,7 +193,7 @@ class TestParserBlackParser : public TestInternal class TestParserBlackCvCParser : public TestParserBlackParser { protected: - TestParserBlackCvCParser() : TestParserBlackParser(LANG_CVC4) {} + TestParserBlackCvCParser() : TestParserBlackParser(LANG_CVC) {} }; TEST_F(TestParserBlackCvCParser, good_inputs) diff --git a/test/unit/parser/parser_builder_black.cpp b/test/unit/parser/parser_builder_black.cpp index b8c12eee2..4ed036202 100644 --- a/test/unit/parser/parser_builder_black.cpp +++ b/test/unit/parser/parser_builder_black.cpp @@ -81,7 +81,7 @@ TEST_F(TestParseBlackParserBuilder, empty_file_input) ASSERT_NE(filename, nullptr); checkEmptyInput(ParserBuilder(&d_solver, d_symman.get(), filename) - .withInputLanguage(LANG_CVC4)); + .withInputLanguage(LANG_CVC)); remove(filename); free(filename); @@ -96,7 +96,7 @@ TEST_F(TestParseBlackParserBuilder, simple_file_input) fs.close(); checkTrueInput(ParserBuilder(&d_solver, d_symman.get(), filename) - .withInputLanguage(LANG_CVC4)); + .withInputLanguage(LANG_CVC)); remove(filename); free(filename); @@ -105,14 +105,14 @@ TEST_F(TestParseBlackParserBuilder, simple_file_input) TEST_F(TestParseBlackParserBuilder, empty_string_input) { checkEmptyInput(ParserBuilder(&d_solver, d_symman.get(), "foo") - .withInputLanguage(LANG_CVC4) + .withInputLanguage(LANG_CVC) .withStringInput("")); } TEST_F(TestParseBlackParserBuilder, true_string_input) { checkTrueInput(ParserBuilder(&d_solver, d_symman.get(), "foo") - .withInputLanguage(LANG_CVC4) + .withInputLanguage(LANG_CVC) .withStringInput("TRUE")); } @@ -120,7 +120,7 @@ TEST_F(TestParseBlackParserBuilder, empty_stream_input) { std::stringstream ss("", std::ios_base::in); checkEmptyInput(ParserBuilder(&d_solver, d_symman.get(), "foo") - .withInputLanguage(LANG_CVC4) + .withInputLanguage(LANG_CVC) .withStreamInput(ss)); } @@ -128,7 +128,7 @@ TEST_F(TestParseBlackParserBuilder, true_stream_input) { std::stringstream ss("TRUE", std::ios_base::in); checkTrueInput(ParserBuilder(&d_solver, d_symman.get(), "foo") - .withInputLanguage(LANG_CVC4) + .withInputLanguage(LANG_CVC) .withStreamInput(ss)); } diff --git a/test/unit/theory/theory_sets_type_rules_white.cpp b/test/unit/theory/theory_sets_type_rules_white.cpp index d75e5881d..ccf26cbbd 100644 --- a/test/unit/theory/theory_sets_type_rules_white.cpp +++ b/test/unit/theory/theory_sets_type_rules_white.cpp @@ -53,7 +53,7 @@ TEST_F(TestTheoryWhiteSetsTypeRuleApi, singleton_term) // (singleton (singleton_op Int) 1) // (as emptyset (Set Real))) ASSERT_THROW(d_solver.mkTerm(UNION, singletonInt, emptyReal), - CVC4ApiException); + CVC5ApiException); // (union // (singleton (singleton_op Real) 1) // (as emptyset (Set Real))) diff --git a/test/unit/util/boolean_simplification_black.cpp b/test/unit/util/boolean_simplification_black.cpp index 4a3afb281..1078a0e4e 100644 --- a/test/unit/util/boolean_simplification_black.cpp +++ b/test/unit/util/boolean_simplification_black.cpp @@ -72,7 +72,7 @@ class TestUtilBlackBooleanSimplification : public TestNode Assert(BooleanSimplification::DUPLICATE_REMOVAL_THRESHOLD >= 10); std::cout << expr::ExprSetDepth(-1) - << language::SetLanguage(language::output::LANG_CVC4); + << language::SetLanguage(language::output::LANG_CVC); } // assert equality up to commuting children diff --git a/test/unit/util/output_black.cpp b/test/unit/util/output_black.cpp index 8e9595009..37937769c 100644 --- a/test/unit/util/output_black.cpp +++ b/test/unit/util/output_black.cpp @@ -69,7 +69,7 @@ TEST_F(TestUtilBlackOutput, output) Debug.on("foo"); Debug("foo") << "testing3"; - CVC4Message() << "a message"; + CVC5Message() << "a message"; Warning() << "bad warning!"; Chat() << "chatty"; Notice() << "note"; @@ -136,7 +136,7 @@ TEST_F(TestUtilBlackOutput, evaluation_off_when_it_is_supposed_to_be) ASSERT_FALSE(Debug.isOn("foo")); ASSERT_FALSE(Trace.isOn("foo")); ASSERT_FALSE(Warning.isOn()); - ASSERT_FALSE(CVC4Message.isOn()); + ASSERT_FALSE(CVC5Message.isOn()); ASSERT_FALSE(Notice.isOn()); ASSERT_FALSE(Chat.isOn()); @@ -147,7 +147,7 @@ TEST_F(TestUtilBlackOutput, evaluation_off_when_it_is_supposed_to_be) cout << "warning" << std::endl; Warning() << failure() << std::endl; cout << "message" << std::endl; - CVC4Message() << failure() << std::endl; + CVC5Message() << failure() << std::endl; cout << "notice" << std::endl; Notice() << failure() << std::endl; cout << "chat" << std::endl; @@ -185,7 +185,7 @@ TEST_F(TestUtilBlackOutput, simple_print) ASSERT_EQ(d_chatStream.str(), std::string()); d_chatStream.str(""); - CVC4Message() << "baz foo"; + CVC5Message() << "baz foo"; ASSERT_EQ(d_messageStream.str(), std::string()); d_messageStream.str(""); @@ -229,7 +229,7 @@ TEST_F(TestUtilBlackOutput, simple_print) ASSERT_EQ(d_chatStream.str(), std::string("baz foo")); d_chatStream.str(""); - CVC4Message() << "baz foo"; + CVC5Message() << "baz foo"; ASSERT_EQ(d_messageStream.str(), std::string("baz foo")); d_messageStream.str("");