class Binding: (source)
A Binding assigns a binding to a (specific) variable. Bindings will therefore be stored in a dictionary in the Variable class, mapping strings to Binding instances. Depending on context, a Binding might also be called a "Source" (if it's used for creating another binding) or a "goal" (if we want to find a solution for a path through the program that assigns it). A binding has history ("origins"): It knows where the binding was originally retrieved from, before being assigned to something else here. Origins contain, through source_sets, "sources", which are other bindings.
Method | __init__ |
Initialize a new Binding. Usually called through Variable.AddBinding. |
Method | __repr__ |
Undocumented |
Method |
|
Add another possible origin to this binding. |
Method |
|
Assign this binding to a new variable. |
Method |
|
Copy the origins from another binding. |
Method |
|
Return an Origin instance for a CFGNode, or None. |
Method |
|
Does this binding depend on a given source? |
Method |
|
Can we "see" this binding from the current cfg node? |
Class Variable | __slots__ |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | id |
Undocumented |
Instance Variable | origins |
Undocumented |
Instance Variable | program |
Undocumented |
Instance Variable | variable |
Undocumented |
Method | _ |
Undocumented |
Instance Variable | _cfgnode |
Undocumented |
Can we "see" this binding from the current cfg node? This will run a solver to determine whether there's a path through the program that makes our variable have this binding at the given CFG node. Arguments: viewpoint: The CFG node at which this binding is possible / not possible. Returns: True if there is at least one path through the program in which the binding was assigned (and not overwritten afterwards), and all the bindings it depends on were assigned (and not overwritten) before that, etc.