SMT-RAT
24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
|
An explanation is either a single clause or a chain of clauses, satisfying the following properties: More...
#include <ClauseChain.h>
Data Structures | |
struct | Link |
Public Types | |
using | const_iterator = typename std::vector< Link >::const_iterator |
Public Member Functions | |
ClauseChain () | |
FormulaT | createTseitinVar (const FormulaT &formula) |
Create a Tseitin variable for the given formula. More... | |
void | appendPropagating (const FormulaT &&clause, const FormulaT &&impliedTseitinLiteral) |
Append a clause that implies impliedTseitinLiteral under the current assignment. More... | |
void | appendConflicting (const FormulaT &&clause) |
Append a conflicting clause (regarding the current assignment). More... | |
void | appendOptional (const FormulaT &&clause) |
Append an additional clause which is neither propagating nor conflicting. More... | |
const std::vector< Link > & | chain () const |
const_iterator | begin () const |
const_iterator | end () const |
FormulaT | resolve () const |
Performs resolution on the chain. More... | |
FormulaT | to_formula () const |
Transforms the clause chain into a formula (containing Tseitin variables). More... | |
Static Public Member Functions | |
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, if the input formula is conflicting under the current assignment, after all clauses in "implications" have been propagated in the given order, the returned formula evaluates to false. More... | |
Private Member Functions | |
bool | isTseitinVar (const FormulaT &var) const |
Private Attributes | |
std::vector< Link > | mClauseChain |
std::unordered_set< FormulaT > | mTseitinVars |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const ClauseChain &chain) |
An explanation is either a single clause or a chain of clauses, satisfying the following properties:
Definition at line 16 of file ClauseChain.h.
using smtrat::mcsat::ClauseChain::const_iterator = typename std::vector<Link>::const_iterator |
Definition at line 54 of file ClauseChain.h.
|
inline |
Definition at line 67 of file ClauseChain.h.
|
inline |
Append a conflicting clause (regarding the current assignment).
Definition at line 90 of file ClauseChain.h.
|
inline |
Append an additional clause which is neither propagating nor conflicting.
Can be used to pass additional knowledge.
Definition at line 98 of file ClauseChain.h.
|
inline |
Append a clause that implies impliedTseitinLiteral under the current assignment.
Note that impliedTseitinLiteral = ~v for a Tseitin variable v obtained via createTseitinVar.
Definition at line 83 of file ClauseChain.h.
|
inline |
Definition at line 112 of file ClauseChain.h.
|
inline |
Definition at line 105 of file ClauseChain.h.
Create a Tseitin variable for the given formula.
The returned variable C should be used so that C <-> formula or at least ~formula -> ~C
Definition at line 73 of file ClauseChain.h.
|
inline |
Definition at line 119 of file ClauseChain.h.
|
static |
Transforms a given Boolean conjunction over AND and OR to CNF via Tseitin-Transformation so that, if the input formula is conflicting under the current assignment, after all clauses in "implications" have been propagated in the given order, the returned formula evaluates to false.
Definition at line 160 of file ClauseChain.cpp.
|
inlineprivate |
Definition at line 62 of file ClauseChain.h.
FormulaT smtrat::mcsat::ClauseChain::resolve | ( | ) | const |
Performs resolution on the chain.
Uses the last clause for resolution.
Definition at line 5 of file ClauseChain.cpp.
FormulaT smtrat::mcsat::ClauseChain::to_formula | ( | ) | const |
Transforms the clause chain into a formula (containing Tseitin variables).
Definition at line 62 of file ClauseChain.cpp.
|
friend |
Definition at line 153 of file ClauseChain.h.
|
private |
Definition at line 59 of file ClauseChain.h.
|
private |
Definition at line 60 of file ClauseChain.h.