|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.flow.MotherFlowAnalysis<LE>
edu.cmu.cs.crystal.tac.TACFlowAnalysis<LE>
LE
- The type that represents the analysis knowledgepublic class TACFlowAnalysis<LE>
This class implements flow analyses over 3-address code instructions
(TACInstruction
). To define a specific analysis, implement
ITACTransferFunction
for conventional or
ITACBranchSensitiveTransferFunction
for branch-sensitive flow analyses.
Field Summary |
---|
Fields inherited from class edu.cmu.cs.crystal.flow.MotherFlowAnalysis |
---|
log |
Constructor Summary | |
---|---|
TACFlowAnalysis(ITACBranchSensitiveTransferFunction<LE> transferFunction,
CompilationUnitTACs eclipseTAC)
Creates a branch sensitive flow analysis object. |
|
TACFlowAnalysis(ITACBranchSensitiveTransferFunction<LE> transferFunction,
IAnalysisInput analysisInput)
Creates a branch sensitive flow analysis object. |
|
TACFlowAnalysis(ITACTransferFunction<LE> transferFunction,
CompilationUnitTACs eclipseTAC)
Creates a branch insensitive flow analysis object. |
|
TACFlowAnalysis(ITACTransferFunction<LE> transferFunction,
IAnalysisInput analysisInput)
Creates a branch insensitive flow analysis object |
Method Summary | |
---|---|
ThisVariable |
getImplicitThisVariable(IBinding accessedElement)
Returns the implicit this variable for accessing a given method or field after previously analyzing the method surrounding the access. It is the caller's responsibility to make sure to call this method only when analysis results for the method surrounding the access are available. |
IResult<LE> |
getLabeledResultsAfter(TACInstruction instr)
Retrieves the analysis state that exists after analyzing the instruction. |
IResult<LE> |
getLabeledResultsBefore(TACInstruction instr)
Retrieves the analysis state that exists before analyzing the instruction. |
ASTNode |
getNode(Variable x,
TACInstruction instruction)
Returns for error-reporting purposes a AST node that surrounds or is represented by a variable mentioned in a given instruction. |
LE |
getResultsAfter(TACInstruction instr)
Retrieves the analysis state that exists after analyzing the instruction. |
LE |
getResultsBefore(TACInstruction instr)
Retrieves the analysis state that exists before analyzing the instruction. |
SourceVariable |
getSourceVariable(IVariableBinding varBinding)
Returns the variable for a given parameter or local after previously analyzing the method declaring the parameter or local. It is the caller's responsibility to make sure to call this method only when analysis results for the declaring method are available. |
ThisVariable |
getThisVariable(MethodDeclaration methodDecl)
Returns the this variable for a given method after previously analyzing that method. It is the caller's responsibility to make sure to call this method only when analysis results for the given method are available. |
Variable |
getVariable(ASTNode node)
Returns the TAC variable for a given ASTNode after previously analyzing the method surrounding the given node. It is the caller's responsibility to make sure to call this method only when analysis results for the surrounding method are available. |
Methods inherited from class edu.cmu.cs.crystal.flow.MotherFlowAnalysis |
---|
getEndResults, getLabeledEndResult, getLabeledResultsAfter, getLabeledResultsBefore, getLabeledStartResult, getResultsAfter, getResultsAfterAST, getResultsAfterCFG, getResultsBefore, getResultsBeforeAST, getResultsBeforeCFG, getStartResults, setMonitor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.cs.crystal.flow.IFlowAnalysis |
---|
getEndResults, getLabeledEndResult, getLabeledResultsAfter, getLabeledResultsBefore, getLabeledStartResult, getResultsAfter, getResultsAfterAST, getResultsAfterCFG, getResultsBefore, getResultsBeforeAST, getResultsBeforeCFG, getStartResults |
Constructor Detail |
---|
public TACFlowAnalysis(ITACTransferFunction<LE> transferFunction, IAnalysisInput analysisInput)
transferFunction
- analysisInput
- public TACFlowAnalysis(ITACTransferFunction<LE> transferFunction, CompilationUnitTACs eclipseTAC)
transferFunction
- eclipseTAC
- public TACFlowAnalysis(ITACBranchSensitiveTransferFunction<LE> transferFunction, IAnalysisInput analysisInput)
transferFunction
- analysisInput
- public TACFlowAnalysis(ITACBranchSensitiveTransferFunction<LE> transferFunction, CompilationUnitTACs eclipseTAC)
transferFunction
- eclipseTAC
- Method Detail |
---|
public LE getResultsAfter(TACInstruction instr)
ITACFlowAnalysis
getResultsAfter
in interface ITACFlowAnalysis<LE>
instr
- the TACInstruction
of interest
public LE getResultsBefore(TACInstruction instr)
ITACFlowAnalysis
getResultsBefore
in interface ITACFlowAnalysis<LE>
instr
- the TACInstruction
of interest
public IResult<LE> getLabeledResultsAfter(TACInstruction instr)
ITACFlowAnalysis
getLabeledResultsAfter
in interface ITACFlowAnalysis<LE>
instr
- the TACInstruction
of interest
public IResult<LE> getLabeledResultsBefore(TACInstruction instr)
ITACFlowAnalysis
getLabeledResultsBefore
in interface ITACFlowAnalysis<LE>
instr
- the TACInstruction
of interest
public ASTNode getNode(Variable x, TACInstruction instruction)
ITACFlowAnalysis
getNode
in interface ITACFlowAnalysis<LE>
x
- A variable.instruction
- Instruction that mentions x
public Variable getVariable(ASTNode node)
ITACFlowAnalysis
getVariable
in interface ITACFlowAnalysis<LE>
node
- AST node in the previously analyzed method.
public ThisVariable getThisVariable(MethodDeclaration methodDecl)
ITACFlowAnalysis
getThisVariable
in interface ITACFlowAnalysis<LE>
methodDecl
- The method for which this is requested.
public SourceVariable getSourceVariable(IVariableBinding varBinding)
ITACFlowAnalysis
getSourceVariable
in interface ITACFlowAnalysis<LE>
varBinding
- Binding of a local or parameter.
public ThisVariable getImplicitThisVariable(IBinding accessedElement)
ITACFlowAnalysis
getImplicitThisVariable
in interface ITACFlowAnalysis<LE>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |