|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectic.dfa.DataFlowAnalysis<Boolean>
ic.dfa.ReachableAnalysisWithVisitor
public class ReachableAnalysisWithVisitor
Same as ReachableAnalysis, but illustrates how to leverage the TAC visitor pattern (if you have one) to implement the transfer functions in a relatively elegant way.
| Field Summary |
|---|
| Fields inherited from class ic.dfa.DataFlowAnalysis |
|---|
cfg, in, out |
| Constructor Summary | |
|---|---|
ReachableAnalysisWithVisitor(ControlFlowGraph cfg)
|
|
| Method Summary | |
|---|---|
Boolean |
boundary()
Initial value for out[enter] or in[exit], depending on direction. |
boolean |
equals(Boolean t1,
Boolean t2)
Return true if t1 and t2 are equivalent. |
boolean |
isForward()
Return true iff the analysis is a forward analysis. |
Boolean |
meet(Boolean t1,
Boolean t2)
Return the meet of t1 and t2 in the lattice. |
Boolean |
top()
Top value in the lattice of T elements. |
Boolean |
transfer(TInstr instr,
Boolean t)
Return the result of applying the transfer function for instr to t. |
Boolean |
visit(TBinary x,
Boolean t)
|
Boolean |
visit(TCopy x,
Boolean t)
|
| Methods inherited from class ic.dfa.DataFlowAnalysis |
|---|
in, out, solve, solveBackward, solveForward, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReachableAnalysisWithVisitor(ControlFlowGraph cfg)
| Method Detail |
|---|
public Boolean boundary()
DataFlowAnalysis
boundary in class DataFlowAnalysis<Boolean>public Boolean top()
DataFlowAnalysis
top in class DataFlowAnalysis<Boolean>
public boolean equals(Boolean t1,
Boolean t2)
DataFlowAnalysis
equals in class DataFlowAnalysis<Boolean>public boolean isForward()
DataFlowAnalysis
isForward in class DataFlowAnalysis<Boolean>
public Boolean meet(Boolean t1,
Boolean t2)
DataFlowAnalysis
meet in class DataFlowAnalysis<Boolean>
public Boolean transfer(TInstr instr,
Boolean t)
DataFlowAnalysis
transfer in class DataFlowAnalysis<Boolean>
public Boolean visit(TBinary x,
Boolean t)
public Boolean visit(TCopy x,
Boolean t)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||