From d282676a095cbcf3e9c879253bafd1b169089424 Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Tue, 3 May 2022 20:07:29 -0700 Subject: [PATCH] Remove obsolete private methods from API (#8716) This PR removes two private utilities from the API: Sort::sortSetToTypeNodes and one DatatypeDecl constructor. --- src/api/cpp/cvc5.cpp | 21 --------------------- src/api/cpp/cvc5.h | 16 ---------------- 2 files changed, 37 deletions(-) diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index d1146649b..115ecddc9 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -1063,17 +1063,6 @@ Sort::~Sort() } } -std::set Sort::sortSetToTypeNodes( - const std::set& sorts) -{ - std::set types; - for (const Sort& s : sorts) - { - types.insert(s.getTypeNode()); - } - return types; -} - std::vector Sort::sortVectorToTypeNodes( const std::vector& sorts) { @@ -3474,16 +3463,6 @@ DatatypeDecl::DatatypeDecl(const Solver* slv, { } -DatatypeDecl::DatatypeDecl(const Solver* slv, - const std::string& name, - const Sort& param, - bool isCoDatatype) - : d_solver(slv), - d_dtype(new internal::DType( - name, std::vector{*param.d_type}, isCoDatatype)) -{ -} - DatatypeDecl::DatatypeDecl(const Solver* slv, const std::string& name, const std::vector& params, diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h index ae50e80ad..6be6831d7 100644 --- a/src/api/cpp/cvc5.h +++ b/src/api/cpp/cvc5.h @@ -826,9 +826,6 @@ class CVC5_EXPORT Sort /** @return The internal wrapped TypeNode of this sort. */ const internal::TypeNode& getTypeNode(void) const; - /** Helper to convert a set of Sorts to internal TypeNodes. */ - std::set static sortSetToTypeNodes( - const std::set& sorts); /** Helper to convert a vector of Sorts to internal TypeNodes. */ std::vector static sortVectorToTypeNodes( const std::vector& sorts); @@ -1973,19 +1970,6 @@ class CVC5_EXPORT DatatypeDecl const std::string& name, bool isCoDatatype = false); - /** - * Constructor for parameterized datatype declaration. - * Create sorts parameter with Solver::mkParamSort(). - * @param slv The associated solver object. - * @param name The name of the datatype. - * @param param The sort parameter. - * @param isCoDatatype True if a codatatype is to be constructed. - */ - DatatypeDecl(const Solver* slv, - const std::string& name, - const Sort& param, - bool isCoDatatype = false); - /** * Constructor for parameterized datatype declaration. * Create sorts parameter with Solver::mkParamSort(). -- 2.30.2