diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2019-01-10 10:47:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 10:47:53 -0800 |
commit | 51cb061609e10ff68fb9db053d23ea9dd72ddea2 (patch) | |
tree | 37e66c9a6200f45f90d48ab9d3b305e37f154d68 /src/api/cvc4cpp.h | |
parent | fb145effd5bfe67090736969478ff54cf7f62984 (diff) |
New C++ API: Get rid of mkConst functions (simplify API). (#2783)
Diffstat (limited to 'src/api/cvc4cpp.h')
-rw-r--r-- | src/api/cvc4cpp.h | 187 |
1 files changed, 18 insertions, 169 deletions
diff --git a/src/api/cvc4cpp.h b/src/api/cvc4cpp.h index ef82a9174..1d98f127d 100644 --- a/src/api/cvc4cpp.h +++ b/src/api/cvc4cpp.h @@ -2088,183 +2088,38 @@ class CVC4_PUBLIC Solver Term mkNegZero(uint32_t exp, uint32_t sig) const; /** - * Create constant of kind: - * - CONST_ROUNDINGMODE + * Create a roundingmode constant. * @param rm the floating point rounding mode this constant represents */ - Term mkConst(RoundingMode rm) const; - - /* - * Create constant of kind: - * - EMPTYSET - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, Sort arg) const; - - /** - * Create constant of kind: - * - UNINTERPRETED_CONSTANT - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, Sort arg1, int32_t arg2) const; - - /** - * Create constant of kind: - * - BOOLEAN - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, bool arg) const; - - /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * - CONST_STRING - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, const char* arg) const; - - /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * - CONST_STRING - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, const std::string& arg) const; - - /** - * Create constant of kind: - * - CONST_BITVECTOR - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, const char* arg1, uint32_t arg2) const; + Term mkRoundingMode(RoundingMode rm) const; /** - * Create constant of kind: - * - CONST_BITVECTOR - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind + * Create uninterpreted constant. + * @param arg1 Sort of the constant + * @param arg2 Index of the constant */ - Term mkConst(Kind kind, const std::string& arg1, uint32_t arg2) const; + Term mkUninterpretedConst(Sort sort, int32_t index) const; /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind + * Create an abstract value constant. + * @param index Index of the abstract value */ - Term mkConst(Kind kind, uint32_t arg) const; + Term mkAbstractValue(const std::string& index) const; /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind + * Create an abstract value constant. + * @param index Index of the abstract value */ - Term mkConst(Kind kind, int32_t arg) const; + Term mkAbstractValue(uint64_t index) const; /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, int64_t arg) const; - - /** - * Create constant of kind: - * - ABSTRACT_VALUE - * - CONST_RATIONAL (for integers, reals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg the argument to this kind - */ - Term mkConst(Kind kind, uint64_t arg) const; - - /** - * Create constant of kind: - * - CONST_RATIONAL (for rationals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, int32_t arg1, int32_t arg2) const; - - /** - * Create constant of kind: - * - CONST_RATIONAL (for rationals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, int64_t arg1, int64_t arg2) const; - - /** - * Create constant of kind: - * - CONST_RATIONAL (for rationals) - * - CONST_BITVECTOR - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, uint32_t arg1, uint32_t arg2) const; - - /** - * Create constant of kind: - * - CONST_RATIONAL (for rationals) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, uint64_t arg1, uint64_t arg2) const; - - /** - * Create constant of kind: - * - CONST_BITVECTOR - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - */ - Term mkConst(Kind kind, uint32_t arg1, uint64_t arg2) const; - - /** - * Create constant of kind: - * - CONST_FLOATINGPOINT (requires CVC4 to be compiled with symFPU support) - * See enum Kind for a description of the parameters. - * @param kind the kind of the constant - * @param arg1 the first argument to this kind - * @param arg2 the second argument to this kind - * @param arg3 the third argument to this kind + * Create a floating-point constant (requires CVC4 to be compiled with symFPU + * support). + * @param exp Size of the exponent + * @param sig Size of the significand + * @param val Value of the floating-point constant as a bit-vector term */ - Term mkConst(Kind kind, uint32_t arg1, uint32_t arg2, Term arg3) const; + Term mkFloatingPoint(uint32_t exp, uint32_t sig, Term val) const; /* .................................................................... */ /* Create Variables */ @@ -2644,12 +2499,6 @@ class CVC4_PUBLIC Solver Term mkBVFromStrHelper(uint32_t size, std::string s, uint32_t base) const; /* Helper for mkBitVector functions that take an integer as argument. */ Term mkBVFromIntHelper(uint32_t size, uint64_t val) const; - /* Helper for mkConst functions that take a string as argument. */ - Term mkConstFromStrHelper(Kind kind, std::string s) const; - Term mkConstFromStrHelper(Kind kind, std::string s, uint32_t a) const; - /* Helper for mkConst functions that take an integer as argument. */ - template <typename T> - Term mkConstFromIntHelper(Kind kind, T a) const; /** * Helper function that ensures that a given term is of sort real (as opposed |