Term Term::notTerm() const
{
+ CVC4_API_CHECK_NOT_NULL;
try
{
Term res = d_expr->notExpr();
Term Term::andTerm(const Term& t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(t);
try
{
Term res = d_expr->andExpr(*t.d_expr);
Term Term::orTerm(const Term& t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(t);
try
{
Term res = d_expr->orExpr(*t.d_expr);
Term Term::xorTerm(const Term& t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(t);
try
{
Term res = d_expr->xorExpr(*t.d_expr);
Term Term::eqTerm(const Term& t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(t);
try
{
Term res = d_expr->eqExpr(*t.d_expr);
Term Term::impTerm(const Term& t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(t);
try
{
Term res = d_expr->impExpr(*t.d_expr);
Term Term::iteTerm(const Term& then_t, const Term& else_t) const
{
+ CVC4_API_CHECK_NOT_NULL;
+ CVC4_API_ARG_CHECK_NOT_NULL(then_t);
+ CVC4_API_ARG_CHECK_NOT_NULL(else_t);
try
{
Term res = d_expr->iteExpr(*then_t.d_expr, *else_t.d_expr);
Sort funSort1 = d_solver.mkFunctionSort(bvSort, intSort);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
+ TS_ASSERT_THROWS(Term().notTerm(), CVC4ApiException&);
Term b = d_solver.mkTrue();
TS_ASSERT_THROWS_NOTHING(b.notTerm());
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().andTerm(b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.andTerm(Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.andTerm(b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS(x.andTerm(b), CVC4ApiException&);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().orTerm(b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.orTerm(Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.orTerm(b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS(x.orTerm(b), CVC4ApiException&);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().xorTerm(b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.xorTerm(Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.xorTerm(b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS(x.xorTerm(b), CVC4ApiException&);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().eqTerm(b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.eqTerm(Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.eqTerm(b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS(x.eqTerm(b), CVC4ApiException&);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().impTerm(b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.impTerm(Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.impTerm(b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS(x.impTerm(b), CVC4ApiException&);
Sort funSort2 = d_solver.mkFunctionSort(intSort, boolSort);
Term b = d_solver.mkTrue();
+ TS_ASSERT_THROWS(Term().iteTerm(b, b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.iteTerm(Term(), b), CVC4ApiException&);
+ TS_ASSERT_THROWS(b.iteTerm(b, Term()), CVC4ApiException&);
TS_ASSERT_THROWS_NOTHING(b.iteTerm(b, b));
Term x = d_solver.mkVar(d_solver.mkBitVectorSort(8), "x");
TS_ASSERT_THROWS_NOTHING(b.iteTerm(x, x));