dk.brics.xact.analysis.dataflow
Class VariableAnalysisElement<VariableElementType>

java.lang.Object
  extended by dk.brics.xact.analysis.dataflow.VariableAnalysisElement<VariableElementType>

public class VariableAnalysisElement<VariableElementType>
extends Object

Lattice element for VariableAnalysis. Consists of a map from variables to analysis-specific value flow elements.


Constructor Summary
VariableAnalysisElement()
          Constructs a new empty lattice element.
 
Method Summary
 boolean copyFrom(VariableAnalysisElement<VariableElementType> other)
          Copies everything from the given lattice point.
 VariableElementType get(Variable var)
          Gets the element associated with the given variable.
 Set<Variable> getVariables()
          Returns the variables for which explicit mappings exist.
 void put(Variable var, VariableElementType elem)
          Adds or updates a mapping.
 String toString()
          Returns a string description of this lattice element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableAnalysisElement

public VariableAnalysisElement()
Constructs a new empty lattice element.

Method Detail

copyFrom

public boolean copyFrom(VariableAnalysisElement<VariableElementType> other)
Copies everything from the given lattice point. Note that the return value depends on the variable type element's Object.equals(Object) method to be implemented.

Parameters:
other - a lattice point
Returns:
true if this changed; false if they were already equal

get

public VariableElementType get(Variable var)
Gets the element associated with the given variable. Returns null if no explicit mapping exists.


getVariables

public Set<Variable> getVariables()
Returns the variables for which explicit mappings exist.


put

public void put(Variable var,
                VariableElementType elem)
Adds or updates a mapping.


toString

public String toString()
Returns a string description of this lattice element.

Overrides:
toString in class Object


Copyright © 2005-2011 Aarhus University.