diff options
Diffstat (limited to 'src/api/cpp/cvc5.cpp')
-rw-r--r-- | src/api/cpp/cvc5.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index a32ff4caa..aafc5331a 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -350,6 +350,9 @@ const static std::unordered_map<Kind, cvc5::Kind, KindHashFunction> s_kinds{ {BOUND_VAR_LIST, cvc5::Kind::BOUND_VAR_LIST}, {INST_PATTERN, cvc5::Kind::INST_PATTERN}, {INST_NO_PATTERN, cvc5::Kind::INST_NO_PATTERN}, + {INST_POOL, cvc5::Kind::INST_POOL}, + {INST_ADD_TO_POOL, cvc5::Kind::INST_ADD_TO_POOL}, + {SKOLEM_ADD_TO_POOL, cvc5::Kind::SKOLEM_ADD_TO_POOL}, {INST_ATTRIBUTE, cvc5::Kind::INST_ATTRIBUTE}, {INST_PATTERN_LIST, cvc5::Kind::INST_PATTERN_LIST}, {LAST_KIND, cvc5::Kind::LAST_KIND}, @@ -644,6 +647,9 @@ const static std::unordered_map<cvc5::Kind, Kind, cvc5::kind::KindHashFunction> {cvc5::Kind::BOUND_VAR_LIST, BOUND_VAR_LIST}, {cvc5::Kind::INST_PATTERN, INST_PATTERN}, {cvc5::Kind::INST_NO_PATTERN, INST_NO_PATTERN}, + {cvc5::Kind::INST_POOL, INST_POOL}, + {cvc5::Kind::INST_ADD_TO_POOL, INST_ADD_TO_POOL}, + {cvc5::Kind::SKOLEM_ADD_TO_POOL, SKOLEM_ADD_TO_POOL}, {cvc5::Kind::INST_ATTRIBUTE, INST_ATTRIBUTE}, {cvc5::Kind::INST_PATTERN_LIST, INST_PATTERN_LIST}, /* ----------------------------------------------------------------- */ @@ -6596,6 +6602,24 @@ Term Solver::getSeparationNilTerm() const CVC5_API_TRY_CATCH_END; } +Term Solver::declarePool(const std::string& symbol, + const Sort& sort, + const std::vector<Term>& initValue) const +{ + NodeManagerScope scope(getNodeManager()); + CVC5_API_TRY_CATCH_BEGIN; + CVC5_API_SOLVER_CHECK_SORT(sort); + CVC5_API_SOLVER_CHECK_TERMS(initValue); + //////// all checks before this line + TypeNode setType = getNodeManager()->mkSetType(*sort.d_type); + Node pool = getNodeManager()->mkBoundVar(symbol, setType); + std::vector<Node> initv = Term::termVectorToNodes(initValue); + d_smtEngine->declarePool(pool, initv); + return Term(this, pool); + //////// + CVC5_API_TRY_CATCH_END; +} + void Solver::pop(uint32_t nscopes) const { NodeManagerScope scope(getNodeManager()); |