carl  24.04
Computer ARithmetic Library
BVTermPool.h
Go to the documentation of this file.
1 /*
2  * File: BVTermPool.h
3  * Author: Andreas Krueger <andreas.krueger@rwth-aachen.de>
4  */
5 
6 #pragma once
7 
8 #include "Pool.h"
9 #include "BVTerm.h"
10 
11 namespace carl
12 {
13  class BVTermPool : public Singleton<BVTermPool>, public Pool<BVTermContent>
14  {
16  public:
17 
19  using TermPtr = Term*;
20  using ConstTermPtr = const Term*;
21  private:
22 
24 
25  public:
26 
27  BVTermPool();
28  BVTermPool(const BVTermPool&) = delete;
29  BVTermPool& operator=(const BVTermPool&) = delete;
30 
32 
33  ConstTermPtr create(BVTermType _type, BVValue&& _value);
34 
35  ConstTermPtr create(BVTermType _type, const BVVariable& _variable);
36 
37  ConstTermPtr create(BVTermType _type, const BVTerm& _operand, std::size_t _index = 0);
38 
39  ConstTermPtr create(BVTermType _type, const BVTerm& _first, const BVTerm& _second);
40 
41  ConstTermPtr create(BVTermType _type, const BVTerm& _operand, std::size_t _first, std::size_t _last);
42 
43  void assignId(TermPtr _term, std::size_t _id) override;
44  };
45 }
46 
47 #define BV_TERM_POOL BVTermPool::getInstance()
carl is the main namespace for the library.
BVTermType
Definition: BVTermType.h:10
Base class that implements a singleton.
Definition: Singleton.h:24
ConstTermPtr mpInvalid
Definition: BVTermPool.h:23
ConstTermPtr create()
Definition: BVTermPool.cpp:16
BVTermPool & operator=(const BVTermPool &)=delete
BVTermPool(const BVTermPool &)=delete
void assignId(TermPtr _term, std::size_t _id) override
Assigns a unique id to the generated element.
Definition: BVTermPool.cpp:176
Represent a BitVector-Variable.
Definition: BVVariable.h:13