Gymbo
|
Classes | |
class | Expr |
Base class for representing logical expressions. More... | |
class | Var |
Class representing a variable in a logical expression. More... | |
class | And |
Class representing the logical AND operation. More... | |
class | Or |
Class representing the logical OR operation. More... | |
class | Not |
Class representing the logical NOT operation. More... | |
class | Const |
Class representing a boolean constant in a logical expression. More... | |
Enumerations | |
enum | OpCode { VAR , AND , OR , NOT , CONST } |
Enum representing different logical operation codes. More... | |
enum | Polarity { Positive , Negative , Mixed } |
Enum representing different polarities in logical expressions. More... | |
Functions | |
std::shared_ptr< Expr > | cnf (std::shared_ptr< Expr > expr) |
Convert a logical expression to conjunctive normal form (CNF). More... | |
std::shared_ptr< Expr > | literalElimination (std::shared_ptr< Expr > expr, std::unordered_map< std::string, bool > &assignments_map) |
Eliminate literals in a logical expression based on assignments. More... | |
std::vector< std::pair< std::string, bool > > | allUnitClauses (std::shared_ptr< Expr > expr) |
Extract all unit clauses from a logical expression. More... | |
std::shared_ptr< Expr > | unitPropagation (std::shared_ptr< Expr > expr, std::unordered_map< std::string, bool > &assignments_map) |
Perform unit propagation on a logical expression based on assignments. More... | |
bool | satisfiableDPLL (std::shared_ptr< Expr > expr, std::unordered_map< std::string, bool > &assignments_map) |
Check satisfiability of a logical expression using the DPLL algorithm. More... | |
std::shared_ptr< Expr > | sym2expr (gymbo::Sym *sym, std::unordered_map< std::string, gymbo::Sym * > &unique_sym_map) |
Convert a symbolic expression to a logical expression. More... | |
std::shared_ptr< Expr > | pathconstraints2expr (std::vector< gymbo::Sym > &constraints, std::unordered_map< std::string, gymbo::Sym * > &unique_sym_map) |
Convert a vector of symbolic path constraints to a logical expression. More... | |
enum gymbosat::OpCode |
enum gymbosat::Polarity |
|
inline |
Extract all unit clauses from a logical expression.
expr | Shared pointer to the logical expression. |
Convert a logical expression to conjunctive normal form (CNF).
expr | Shared pointer to the logical expression. |
|
inline |
Eliminate literals in a logical expression based on assignments.
expr | Shared pointer to the logical expression. |
assignments_map | Reference to an unordered map of variable assignments. |
|
inline |
Convert a vector of symbolic path constraints to a logical expression.
constraints | Vector of symbolic path constraints. |
unique_sym_map | Reference to an unordered map of unique symbolic expressions. |
|
inline |
Check satisfiability of a logical expression using the DPLL algorithm.
expr | Shared pointer to the logical expression. |
assignments_map | Reference to an unordered map of variable assignments. |
|
inline |
Convert a symbolic expression to a logical expression.
sym | Pointer to the symbolic expression. |
unique_sym_map | Reference to an unordered map of unique symbolic expressions. |
|
inline |
Perform unit propagation on a logical expression based on assignments.
expr | Shared pointer to the logical expression. |
assignments_map | Reference to an unordered map of variable assignments. |