8#include "../solvers/SolverInterface.hpp"
9#include "containers/ClauseUtils.hpp"
10#include "containers/Formula.hpp"
37 virtual bool initMembers(
unsigned int varCount,
unsigned int clauseCount) = 0;
63 bool initMembers(
unsigned int varCount,
unsigned int clauseCount)
override;
77 mutable std::unordered_set<simpleClause, ClauseUtils::ClauseHash> clauseCache;
95 bool initMembers(
unsigned int varCount,
unsigned int clauseCount)
override;
119 std::vector<simpleClause>& clauses,
120 unsigned int* varCount,
121 const std::vector<std::unique_ptr<ClauseProcessor>>& processors = {});
132parseCNF(
const char* filename,
Formula& formula,
const std::vector<std::unique_ptr<ClauseProcessor>>& processors = {});
Abstract base class for clause processors.
Definition Parsers.hpp:27
virtual bool operator()(simpleClause &clause)=0
Process a clause.
virtual bool initMembers(unsigned int varCount, unsigned int clauseCount)=0
Initialize the processor with problem parameters.
Filter for removing redundant clauses.
Definition Parsers.hpp:55
bool initMembers(unsigned int varCount, unsigned int clauseCount) override
Initialize the redundancy filter.
bool operator()(simpleClause &clause) override
Check if a clause is redundant.
Filter for removing tautological clauses. A tautological clause or simple a tautology is a clause tha...
Definition Parsers.hpp:87
bool initMembers(unsigned int varCount, unsigned int clauseCount) override
Initialize the tautology filter.
bool operator()(simpleClause &clause) override
Check if a clause is a tautology.
A set of helper functions for CNF file parsing.
Definition StructuredBva.hpp:286
bool parseCNFParameters(FILE *f, unsigned int &varCount, unsigned int &clauseCount)
Parse the CNF parameters (variable count and clause count) from a file.
bool parseCNF(const char *filename, std::vector< simpleClause > &clauses, unsigned int *varCount, const std::vector< std::unique_ptr< ClauseProcessor > > &processors={})
Parse a CNF formula from a file into a vector of clauses.