|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.xact.analysis.dataflow.VariableAnalysis<VariableElementType>
public class VariableAnalysis<VariableElementType>
Lattice and transfer functions for a dataflow analysis that tracks values for program variables.
Constructor Summary | |
---|---|
VariableAnalysis(VariableAnalysisInterface<VariableElementType> val)
Constructs a new variable analysis using the given lattice. |
Method Summary | |
---|---|
Set<Statement> |
getInitial(FlowGraph g)
Returns the set of statements to start the analysis at. |
boolean |
isForward()
Returns true if this is a forwards analysis, and false if it is a backwards analysis. |
boolean |
merge(VariableAnalysisElement<VariableElementType> source,
VariableFilter filter,
VariableAnalysisElement<VariableElementType> dest)
Computes the least upper bound of two lattice elements. |
VariableAnalysisElement<VariableElementType> |
newBottomElement()
Constructs a new lattice bottom element. |
boolean |
transfer(VariableAnalysisElement<VariableElementType> in,
Statement s,
VariableAnalysisElement<VariableElementType> out)
Computes the lattice element resulting from flowing through the given statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VariableAnalysis(VariableAnalysisInterface<VariableElementType> val)
Method Detail |
---|
public Set<Statement> getInitial(FlowGraph g)
AnalysisInterface
getInitial
in interface AnalysisInterface<VariableAnalysisElement<VariableElementType>>
g
- the flow graph about to be analyzed
public boolean isForward()
AnalysisInterface
isForward
in interface AnalysisInterface<VariableAnalysisElement<VariableElementType>>
public boolean merge(VariableAnalysisElement<VariableElementType> source, VariableFilter filter, VariableAnalysisElement<VariableElementType> dest)
AnalysisInterface
merge
in interface AnalysisInterface<VariableAnalysisElement<VariableElementType>>
source
- the first elementfilter
- the filter to merge throughdest
- the second element and destination for the result
true
if the new value of dest
is changedpublic VariableAnalysisElement<VariableElementType> newBottomElement()
AnalysisInterface
newBottomElement
in interface AnalysisInterface<VariableAnalysisElement<VariableElementType>>
public boolean transfer(VariableAnalysisElement<VariableElementType> in, Statement s, VariableAnalysisElement<VariableElementType> out)
AnalysisInterface
transfer
in interface AnalysisInterface<VariableAnalysisElement<VariableElementType>>
in
- the flow before the statementout
- destination for the result
true
if the new value of out
is changed
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |