Data structures and algorithms for boolean equations.
Class |
|
Base class for boolean terms. |
Class |
|
Class for representing "FALSE". |
Class |
|
Solver for boolean equations. |
Class |
|
Class for representing "TRUE". |
Function |
|
Create a conjunction or its simplified equivalent. |
Function |
|
Create an equality or its simplified equivalent. |
Function |
|
Create a disjunction or its simplified equivalent. |
Function | simplify |
Simplify a set of subexpressions for a conjunction or disjunction. |
Constant | FALSE |
Undocumented |
Constant | TRUE |
Undocumented |
Class | _ |
A conjunction of equalities and disjunctions. |
Class | _ |
An equality constraint. |
Class | _ |
A disjunction of equalities and conjunctions. |
Function | _expr |
Undocumented |
Create a conjunction or its simplified equivalent. This will ensure that, when an _And is returned, none of its immediate subterms is TRUE, FALSE, or another conjunction. Args: exprs: An iterable. The subterms. Returns: A BooleanTerm.
Create an equality or its simplified equivalent. This will ensure that left > right. (For left == right, it'll just return TRUE). Args: left: A string. Left side of the equality. This will get sorted, so it might end up on the right. right: A string. Right side of the equality. This will get sorted, so it might end up on the left. Returns: A BooleanTerm.
Create a disjunction or its simplified equivalent. This will ensure that, when an _Or is returned, none of its immediate subterms is TRUE, FALSE, or another disjunction. Args: exprs: An iterable. The subterms. Returns: A BooleanTerm.
Simplify a set of subexpressions for a conjunction or disjunction. Args: exprs: An iterable. The subexpressions. result_type: _And or _Or. The type of result (unless it simplifies down to something simpler). stop_term: FALSE for _And, TRUE for _Or. If this term is encountered, it will be immediately returned. skip_term: TRUE for _And, FALSE for _Or. If this term is encountered, it will be ignored. Returns: A BooleanTerm.