class documentation

An equality constraint. This declares an equality between a variable and a value, or a variable and a variable. External code should use Eq rather than creating an _Eq instance directly. Attributes: left: A string; left side of the equality. This is expected to be the string with the higher ascii value, so e.g. strings starting with "~" (ascii 0x7e) should be on the left. right: A string; right side of the equality. This is the lower ascii value.

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Initialize an equality.
Method __ne__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method extract_equalities Find all equalities that appear in this term.
Method extract_pivots Extract the pivots. See BooleanTerm.extract_pivots().
Method simplify Simplify this equality.
Class Variable __slots__ Undocumented
Instance Variable left Undocumented
Instance Variable right Undocumented
def __eq__(self, other): (source)

Undocumented

def __hash__(self): (source)

Undocumented

def __init__(self, left, right): (source)

Initialize an equality. Args: left: A string. Left side of the equality. right: A string. Right side of the equality.

def __ne__(self, other): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def __str__(self): (source)

Undocumented

def extract_equalities(self): (source)

Find all equalities that appear in this term. Returns: A sequence of tuples of a string (variable name) and a string (value or variable name).

def extract_pivots(self, assignments): (source)

Extract the pivots. See BooleanTerm.extract_pivots().

def simplify(self, assignments): (source)

Simplify this equality. This will try to look up the values, and return FALSE if they're no longer possible. Also, when comparing two variables, it will compute the intersection, and return a disjunction of variable=value equalities instead. Args: assignments: Variable assignments (dict mapping strings to sets of strings). Used to determine whether this equality is still possible, and to compute intersections between two variables. Returns: A new BooleanTerm.

Undocumented

Undocumented