module documentation

Data structures and algorithms for boolean equations.

Class BooleanTerm Base class for boolean terms.
Class FalseValue Class for representing "FALSE".
Class Solver Solver for boolean equations.
Class TrueValue Class for representing "TRUE".
Function And Create a conjunction or its simplified equivalent.
Function Eq Create an equality or its simplified equivalent.
Function Or Create a disjunction or its simplified equivalent.
Function simplify_exprs Simplify a set of subexpressions for a conjunction or disjunction.
Constant FALSE Undocumented
Constant TRUE Undocumented
Class _And A conjunction of equalities and disjunctions.
Class _Eq An equality constraint.
Class _Or A disjunction of equalities and conjunctions.
Function _expr_set_hash Undocumented
def And(exprs): (source)

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.

def Eq(left: str, right: str) -> BooleanTerm: (source)

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.

def Or(exprs): (source)

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.

def simplify_exprs(exprs, result_type, stop_term, skip_term): (source)

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.

Undocumented

Value
FalseValue()

Undocumented

Value
TrueValue()
def _expr_set_hash(expr_set): (source)

Undocumented