class documentation

class LastAccessAnalysis(Analysis): (source)

View In Hierarchy

Computes for each variable its possible last reads and last writes.

Method __init__ Undocumented
Method aggregate_previous_after_values Computes the before value for a node from the previous after values.
Method compute_after_value Computes the after value for a node from the node and the before value.

Inherited from Analysis:

Method visit Visit the nodes of the control flow graph, performing the analysis.
Instance Variable after_label Either the in_label or out_label depending on the direction of the analysis. Marks the after_value on a node during an analysis.
Instance Variable before_label Either the in_label or out_label depending on the direction of the analysis. Marks the before_value on a node during an analysis.
Instance Variable forward (bool) True for forward analyses, False for backward analyses.
Instance Variable in_label The name of the analysis, suffixed with _in.
Instance Variable label The name of the analysis.
Instance Variable out_label The name of the analysis, suffixed with _out.
def __init__(self): (source)
def aggregate_previous_after_values(self, previous_after_values): (source)

Computes the before value for a node from the previous after values.

This is the 'meet' or 'join' function of the analysis. TODO(dbieber): Update terminology to match standard textbook notation.

Parameters
previous_after_valuesThe after values of all before nodes.
Returns
The before value for the current node.
def compute_after_value(self, node, before_value): (source)

Computes the after value for a node from the node and the before value.

This is the 'transfer' function of the analysis. TODO(dbieber): Update terminology to match standard textbook notation.

Parameters
nodeThe node or block for which to compute the after value.
before_valueThe before value of the node.
Returns
The computed after value for the node.