13 #include "../sort/Sort.h"
58 const std::string&
name()
const {
65 const std::vector<Sort>&
domain()
const {
123 std::vector<std::unique_ptr<UFContent>>
mUFs;
129 mUFs.emplace_back(
nullptr);
142 assert(uf.
id() != 0);
143 assert(uf.
id() <
mUFs.size());
160 return getUF(uf)->name();
168 return getUF(uf)->domain();
176 return getUF(uf)->codomain();
187 return newUF(std::make_unique<UFContent>(std::move(name), std::move(domain), codomain));
carl is the main namespace for the library.
bool operator<(const BasicConstraint< P > &lhs, const BasicConstraint< P > &rhs)
UninterpretedFunction newUninterpretedFunction(std::string name, std::vector< Sort > domain, Sort codomain)
Gets the uninterpreted function with the given name, domain, arguments and codomain.
bool operator==(const BasicConstraint< P > &lhs, const BasicConstraint< P > &rhs)
std::size_t hash_all(Args &&... args)
Hashes an arbitrary number of values.
std::unordered_map< const T1 *, T2, pointerHash< T1 >, pointerEqual< T1 > > FastPointerMap
Base class that implements a singleton.
static UFManager & getInstance()
Returns the single instance of this class by reference.
Implements a sort (for defining types of variables and functions).
The actual content of an uninterpreted function instance.
std::string mName
The uninterpreted function's name.
UFContent(UFContent &&)=delete
const std::vector< Sort > & domain() const
UFContent(const UFContent &)=delete
UFContent(std::string &&name, std::vector< Sort > &&domain, Sort codomain)
Constructs the content of an uninterpreted function.
const std::string & name() const
std::vector< Sort > mDomain
The uninterpreted function's domain.
Sort mCodomain
The uninterpreted function's codomain.
std::size_t operator()(const carl::UFContent &ufun) const
Implements a manager for uninterpreted functions, containing their actual contents and allocating the...
const auto & getUF(const UninterpretedFunction &uf) const
UninterpretedFunction newUninterpretedFunction(std::string &&name, std::vector< Sort > &&domain, Sort codomain)
Gets the uninterpreted function with the given name, domain, arguments and codomain.
Sort getCodomain(const UninterpretedFunction &uf) const
const auto & ufContents() const
FastPointerMap< UFContent, std::size_t > mUFIdMap
Stores all instantiated uninterpreted function's contents and maps them to their unique id.
const std::string & get_name(const UninterpretedFunction &uf) const
const auto & ufIDMap() const
const std::vector< Sort > & getDomain(const UninterpretedFunction &uf) const
std::vector< std::unique_ptr< UFContent > > mUFs
Maps the unique ids to the instantiated uninterpreted function's content.
UninterpretedFunction newUF(std::unique_ptr< UFContent > &&sc)
Tries to add the given uninterpreted function's content to the so far stored uninterpreted function's...
UFManager()
Constructs an uninterpreted functions manager.
Implements an uninterpreted function.