class documentation
class State: (source)
A state needs to "solve" a list of goals to succeed. Attributes: pos: Our current position in the CFG. goals: A list of bindings we'd like to be valid at this position.
Method | __eq__ |
Undocumented |
Method | __hash__ |
Compute hash for this State. We use States as keys when memoizing. |
Method | __init__ |
Initialize a state that starts at the given cfg node. |
Method | __ne__ |
Undocumented |
Method |
|
Remove all goals that can be fulfilled at the current CFG node. |
Class Variable | __slots__ |
Undocumented |
Instance Variable | goals |
Undocumented |
Instance Variable | pos |
Undocumented |
Remove all goals that can be fulfilled at the current CFG node. Generates all possible sets of new goals obtained by replacing a goal that originates at the current node with one of its source sets, iteratively, until there are no more such goals. Generating these possibilities here allows every _FindSolution() call to completely process its input state, avoiding bugs related to transmitting state information across calls. Yields: (removed_goals, new_goals) tuples.