![]() |
mutable
A Database System for Research and Fast Prototyping
|
Data Structures | |
| struct | Clause |
A cnf::Clause represents a disjunction of Predicates. More... | |
| struct | CNF |
A CNF represents a conjunction of cnf::Clauses. More... | |
| struct | Predicate |
A Predicate contains a Expr of Boolean type in either positive or negative form. More... | |
Functions | |
| Clause M_EXPORT | operator|| (const Clause &lhs, const Clause &rhs) |
Returns the logical or of two cnf::Clauses, i.e. the disjunction of the Predicates of lhs and rhs. | |
| CNF M_EXPORT | operator&& (const Clause &lhs, const Clause &rhs) |
Returns the logical and of two cnf::Clauses, i.e. a CNF with the two cnf::Clauses lhs and rhs. | |
| CNF M_EXPORT | operator&& (const CNF &lhs, const CNF &rhs) |
Returns the logical and of two CNFs, i.e. the conjunction of the cnf::Clauses of lhs and rhs. | |
| CNF M_EXPORT | operator|| (const CNF &lhs, const CNF &rhs) |
Returns the logical or of two CNFs. | |
| CNF M_EXPORT | operator! (const Clause &clause) |
Returns the logical negation of a cnf::Clause. | |
| CNF M_EXPORT | operator! (const CNF &cnf) |
Returns the logical negation of a CNF. | |
| CNF M_EXPORT | to_CNF (const ast::Expr &e) |
Converts the Boolean Expr e to a CNF. | |
| CNF M_EXPORT | get_CNF (const ast::Clause &c) |
Converts the Boolean Expr of c to a CNF. | |
| CNF M_EXPORT m::cnf::get_CNF | ( | const ast::Clause & | c | ) |
Returns the logical negation of a cnf::Clause.
It is computed using [De Morgan's laws] (https://en.wikipedia.org/wiki/De_Morgan%27s_laws): ¬(P ∨ Q) ↔ ¬P ∧ ¬Q.
Returns the logical negation of a CNF.
It is computed using [De Morgan's laws] (https://en.wikipedia.org/wiki/De_Morgan%27s_laws): ¬(P ∧ Q) ↔ ¬P ∨ ¬Q.
Returns the logical and of two cnf::Clauses, i.e. a CNF with the two cnf::Clauses lhs and rhs.
Returns the logical and of two CNFs, i.e. the conjunction of the cnf::Clauses of lhs and rhs.
| cnf::Clause m::cnf::operator|| | ( | const Clause & | lhs, |
| const Clause & | rhs | ||
| ) |
Returns the logical or of two cnf::Clauses, i.e. the disjunction of the Predicates of lhs and rhs.
Returns the logical or of two CNFs.
It is computed using the distributive law from Boolean algebra: P ∨ (Q ∧ R) ↔ ((P ∨ Q) ∧ (P ∨ R))