From: Aina Niemetz Date: Wed, 13 Feb 2019 04:16:24 +0000 (-0800) Subject: New C++ API: Remove redundant mkTerm function. (#2836) X-Git-Tag: cvc5-1.0.0~4261 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6eb492f636d2c950a6064389dfba297baff8e08e;p=cvc5.git New C++ API: Remove redundant mkTerm function. (#2836) --- diff --git a/src/api/cvc4cpp.cpp b/src/api/cvc4cpp.cpp index ea70fc056..5d1f853e0 100644 --- a/src/api/cvc4cpp.cpp +++ b/src/api/cvc4cpp.cpp @@ -2531,21 +2531,6 @@ Term Solver::mkTerm(Kind kind) const } } -Term Solver::mkTerm(Kind kind, Sort sort) const -{ - try - { - CVC4_API_KIND_CHECK_EXPECTED(kind == SEP_NIL, kind) << "SEP_NIL"; - Term res = d_exprMgr->mkNullaryOperator(*sort.d_type, extToIntKind(kind)); - (void)res.d_expr->getType(true); /* kick off type checking */ - return res; - } - catch (const CVC4::TypeCheckingException& e) - { - throw CVC4ApiException(e.getMessage()); - } -} - Term Solver::mkTerm(Kind kind, Term child) const { try diff --git a/src/api/cvc4cpp.h b/src/api/cvc4cpp.h index 955aff21a..2ac762b3e 100644 --- a/src/api/cvc4cpp.h +++ b/src/api/cvc4cpp.h @@ -1702,14 +1702,6 @@ class CVC4_PUBLIC Solver */ Term mkTerm(Kind kind) const; - /** - * Create 0-ary term of given kind and sort. - * @param kind the kind of the term - * @param sort the sort argument to this kind - * @return the Term - */ - Term mkTerm(Kind kind, Sort sort) const; - /** * Create a unary term of given kind. * @param kind the kind of the term diff --git a/src/api/cvc4cppkind.h b/src/api/cvc4cppkind.h index 4e69ddfe1..3184da78e 100644 --- a/src/api/cvc4cppkind.h +++ b/src/api/cvc4cppkind.h @@ -1755,7 +1755,6 @@ enum CVC4_PUBLIC Kind : int32_t * Parameters: 0 * Create with: * mkSepNil(Sort sort) - * mkTerm(Kind kind, Sort sort) */ SEP_NIL, /** diff --git a/test/unit/api/solver_black.h b/test/unit/api/solver_black.h index 169a9948d..0a3eb46c3 100644 --- a/test/unit/api/solver_black.h +++ b/test/unit/api/solver_black.h @@ -550,11 +550,6 @@ void SolverBlack::testMkTerm() TS_ASSERT_THROWS_NOTHING(d_solver->mkTerm(REGEXP_SIGMA)); TS_ASSERT_THROWS(d_solver->mkTerm(CONST_BITVECTOR), CVC4ApiException&); - // mkTerm(Kind kind, Sort sort) const - TS_ASSERT_THROWS_NOTHING( - d_solver->mkTerm(SEP_NIL, d_solver->getBooleanSort())); - TS_ASSERT_THROWS_NOTHING(d_solver->mkTerm(SEP_NIL, Sort())); - // mkTerm(Kind kind, Term child) const TS_ASSERT_THROWS_NOTHING(d_solver->mkTerm(NOT, d_solver->mkTrue())); TS_ASSERT_THROWS(d_solver->mkTerm(NOT, Term()), CVC4ApiException&);