|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.flow.concur.ConcurrentFlowAnalysis<LE>
LE
- public class ConcurrentFlowAnalysis<LE>
An implementation of IFlowAnalysis that analyzes methods in concurrently. Creates a thread pool, and when analyzedPreemtively is called (or the constructor that takes a list of methods) we generate a future for each method declaration, force its analysis in a brand new FlowAnalysis object, and store that in a mapping from method declarations to IFlowAnalysis objects. Later, we can delegate the standard flow analysis methods on the future, forcing its completion. This class is EXPERIMENTAL because certain shared classes, most notably EclipseTAC, are not yet thought to be thread-safe. The biggest worry is that there is no memory barrier between different analyses.
Constructor Summary | |
---|---|
ConcurrentFlowAnalysis(ITransferFunction<LE> transferFunction,
Crystal crystal)
Creates a new concurrent flow analysis but does not analyze any methods immediately. |
|
ConcurrentFlowAnalysis(ITransferFunction<LE> transferFunction,
List<MethodDeclaration> methods,
Crystal crystal)
Creates a new concurrent flow analysis and begins to analyze the given method bodies immediately. |
Method Summary | |
---|---|
void |
analyzePreemitively(List<MethodDeclaration> methods)
Perform dataflow analysis asynchronously on the list of methods given. |
LE |
getEndResults(MethodDeclaration d)
Gets the lattice results at the end of a method. |
IResult<LE> |
getLabeledEndResult(MethodDeclaration d)
Gets the lattice results at the end of a method. |
IResult<LE> |
getLabeledResultsAfter(ASTNode node)
Retrieves the analysis state that exists after analyzing the node in the control flow graph. |
IResult<LE> |
getLabeledResultsBefore(ASTNode node)
Retrieves the analysis state that exists before analyzing the node in the control flow graph. |
IResult<LE> |
getLabeledStartResult(MethodDeclaration d)
Gets the lattice results at the start of a method. |
LE |
getResultsAfter(ASTNode node)
Deprecated. |
LE |
getResultsAfterAST(ASTNode node)
Retrieves the analysis state that exists after analyzing the node in the abstract syntax tree. |
LE |
getResultsAfterCFG(ASTNode node)
Retrieves the analysis state that exists after analyzing the node in the control flow graph. |
LE |
getResultsBefore(ASTNode node)
Deprecated. |
LE |
getResultsBeforeAST(ASTNode node)
Retrieves the analysis state that exists before analyzing the node in the abstract syntax tree. |
LE |
getResultsBeforeCFG(ASTNode node)
Retrieves the analysis state that exists before analyzing the node in the control flow graph. |
LE |
getStartResults(MethodDeclaration d)
Gets the lattice results at the start of a method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentFlowAnalysis(ITransferFunction<LE> transferFunction, List<MethodDeclaration> methods, Crystal crystal)
transferFunction
- The transfer function defining the analysis.methods
- Starts analyzing these methods immediately in background threads.crystal
- public ConcurrentFlowAnalysis(ITransferFunction<LE> transferFunction, Crystal crystal)
transferFunction
- crystal
- analyzePreemitively(java.util.List)
Method Detail |
---|
public void analyzePreemitively(List<MethodDeclaration> methods)
methods
- public IResult<LE> getLabeledResultsAfter(ASTNode node)
IFlowAnalysis
IFlowAnalysis.getResultsAfterCFG(ASTNode)
, except it keeps all the labels
separated in an IResult
getLabeledResultsAfter
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsAfterCFG(ASTNode)
public IResult<LE> getLabeledResultsBefore(ASTNode node)
IFlowAnalysis
IFlowAnalysis.getResultsBeforeCFG(ASTNode)
, except it keeps all the labels
separated in an IResult
getLabeledResultsBefore
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsBeforeCFG(ASTNode)
@Deprecated public LE getResultsAfter(ASTNode node)
IFlowAnalysis
getResultsAfter
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
@Deprecated public LE getResultsBefore(ASTNode node)
IFlowAnalysis
getResultsBefore
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsBeforeCFG(ASTNode)
public LE getResultsAfterCFG(ASTNode node)
IFlowAnalysis
IFlowAnalysis.getResultsAfterAST(ASTNode)
If there are multiple before lattices for this node, they are joined and returned.
getResultsAfterCFG
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsAfterAST(ASTNode)
,
IFlowAnalysis.getLabeledResultsAfter(ASTNode)
public LE getResultsBeforeCFG(ASTNode node)
IFlowAnalysis
getResultsBeforeCFG
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsBeforeAST(ASTNode)
,
IFlowAnalysis.getLabeledResultsBefore(ASTNode)
public LE getResultsBeforeAST(ASTNode node)
IFlowAnalysis
getResultsBeforeAST
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsBeforeCFG(ASTNode)
public LE getResultsAfterAST(ASTNode node)
IFlowAnalysis
IFlowAnalysis.getResultsAfterCFG(ASTNode)
If there are multiple before lattices for this node, they are joined and returned.
getResultsAfterAST
in interface IFlowAnalysis<LE>
node
- the ASTNode
of interest
IFlowAnalysis.getResultsAfterCFG(ASTNode)
public LE getEndResults(MethodDeclaration d)
IFlowAnalysis
getEndResults
in interface IFlowAnalysis<LE>
d
- The method declaration to get results for
public IResult<LE> getLabeledEndResult(MethodDeclaration d)
IFlowAnalysis
getLabeledEndResult
in interface IFlowAnalysis<LE>
IFlowAnalysis.getEndResults(MethodDeclaration)
public IResult<LE> getLabeledStartResult(MethodDeclaration d)
IFlowAnalysis
IFlowAnalysis.getStartResults(MethodDeclaration)
and
IFlowAnalysisDefinition.createEntryValue(MethodDeclaration)
. However, it might be different
for a system which keeps multiple possible contexts in which the method could be called from based
on some specifications.
getLabeledStartResult
in interface IFlowAnalysis<LE>
IFlowAnalysisDefinition.createEntryValue(MethodDeclaration)
,
IFlowAnalysis.getStartResults(MethodDeclaration)
public LE getStartResults(MethodDeclaration d)
IFlowAnalysis
IFlowAnalysisDefinition.createEntryValue(MethodDeclaration)
getStartResults
in interface IFlowAnalysis<LE>
d
- The method declaration to get results for
IFlowAnalysisDefinition.createEntryValue(MethodDeclaration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |