51 friend std::ostream&
operator<< (std::ostream& stream,
const Link& link);
74 FormulaT var = carl::FormulaPool<smtrat::Poly>::getInstance().createTseitinVar(formula);
84 mClauseChain.emplace_back(std::move(clause), std::move(impliedTseitinLiteral));
105 const std::vector<Link>&
chain()
const {
148 stream << link.
clause() <<
" -> CONFLICT";
155 for (
auto iter = chain.
begin(); iter != chain.
end(); iter++) {
157 if (iter != chain.
end()-1)
160 stream <<
"]" << std::endl;
An explanation is either a single clause or a chain of clauses, satisfying the following properties:
std::unordered_set< FormulaT > mTseitinVars
static ClauseChain from_formula(const FormulaT &f, const Model &model, bool with_equivalence)
Transforms a given Boolean conjunction over AND and OR to CNF via Tseitin-Transformation so that,...
FormulaT to_formula() const
Transforms the clause chain into a formula (containing Tseitin variables).
FormulaT resolve() const
Performs resolution on the chain.
void appendConflicting(const FormulaT &&clause)
Append a conflicting clause (regarding the current assignment).
FormulaT createTseitinVar(const FormulaT &formula)
Create a Tseitin variable for the given formula.
bool isTseitinVar(const FormulaT &var) const
void appendPropagating(const FormulaT &&clause, const FormulaT &&impliedTseitinLiteral)
Append a clause that implies impliedTseitinLiteral under the current assignment.
const_iterator end() const
typename std::vector< Link >::const_iterator const_iterator
std::vector< Link > mClauseChain
const std::vector< Link > & chain() const
const_iterator begin() const
friend std::ostream & operator<<(std::ostream &stream, const ClauseChain &chain)
void appendOptional(const FormulaT &&clause)
Append an additional clause which is neither propagating nor conflicting.
std::ostream & operator<<(std::ostream &os, const Bookkeeping &bk)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Model< Rational, Poly > Model
std::optional< FormulaT > mImpliedTseitinLiteral
bool isPropagating() const
friend std::ostream & operator<<(std::ostream &stream, const Link &link)
bool isConflicting() const
Link(const FormulaT &&clause, const FormulaT &&impliedTseitinLiteral)
const FormulaT & impliedTseitinLiteral() const
Link(const FormulaT &&clause)
const FormulaT & clause() const