Painless
A framework to ease parallelization of sequential CDCL SAT solvers
Loading...
Searching...
No Matches
ClauseDatabase.hpp
1#pragma once
2
3#include "containers/ClauseExchange.hpp"
4
5#include <atomic>
6#include <memory>
7#include <numeric>
8#include <sstream>
9#include <vector>
10
27{
28 public:
31
33 virtual ~ClauseDatabase() {}
34
40 virtual bool addClause(ClauseExchangePtr clause) = 0;
41
48 virtual size_t giveSelection(std::vector<ClauseExchangePtr>& selectedCls, unsigned int literalCountLimit ) = 0;
49
54 virtual void getClauses(std::vector<ClauseExchangePtr>& v_cls) = 0;
55
61 virtual bool getOneClause(ClauseExchangePtr& cls) = 0;
62
67 virtual size_t getSize() const = 0;
68
73 virtual size_t shrinkDatabase() = 0;
74
78 virtual void clearDatabase() = 0;
79};
80
Abstract base class defining the interface for clause storage and management.
Definition ClauseDatabase.hpp:27
virtual bool addClause(ClauseExchangePtr clause)=0
Add a clause to the database.
virtual void getClauses(std::vector< ClauseExchangePtr > &v_cls)=0
Retrieve all clauses from the database.
ClauseDatabase()
Default Constructor.
Definition ClauseDatabase.hpp:30
virtual ~ClauseDatabase()
Virtual destructor to ensure proper cleanup of derived classes.
Definition ClauseDatabase.hpp:33
virtual size_t shrinkDatabase()=0
Reduce the size of the database by removing some clauses.
virtual void clearDatabase()=0
Remove all clauses from the database.
virtual size_t getSize() const =0
Get the current number of clauses in the database.
virtual bool getOneClause(ClauseExchangePtr &cls)=0
Retrieve a single clause from the database.
virtual size_t giveSelection(std::vector< ClauseExchangePtr > &selectedCls, unsigned int literalCountLimit)=0
Fill the given buffer with a selection of clauses.