A - Type of analysis resultsT - Value type for analysis items in the contextpublic abstract class AnalysisUtilVarContextDataFlow<A extends Ordered<A>,T extends AbstractValue<T>> extends AnalysisUtilVarContext<A,T>
trackErrorsextInfo, instanceInitializersChecked, workQueue| Constructor and Description |
|---|
AnalysisUtilVarContextDataFlow(WorkQueue<A> workQueue,
AnalysisUnit currentAnalysisUnit,
AccrueExtensionInfo extInfo)
Create a new utility class
|
| Modifier and Type | Method and Description |
|---|---|
abstract FinalVarContext<T> |
analyzeInitializersForDataFlow(VarContext<T> before)
Analyze the initializers for the current analysis unit given the current
analysis results
|
FinalVarContext<T> |
call(polyglot.types.ConstructorInstance ci,
VarContext<T> input,
T receiverAbsVal,
polyglot.ast.New n,
DataFlowNodeIdentifier callSiteNode)
Deprecated.
|
FinalVarContext<T> |
call(polyglot.types.MethodInstance mi,
VarContext<T> input,
polyglot.ast.Call n,
DataFlowNodeIdentifier callSiteNode)
Deprecated.
|
FinalVarContext<T> |
call(polyglot.types.MethodInstance mi,
VarContext<T> input,
DataFlowNodeIdentifier callSite)
|
FinalVarContext<T> |
callFromNew(polyglot.types.ConstructorInstance ci,
VarContext<T> input,
T receiverAbsVal,
DataFlowNodeIdentifier callSite)
|
FinalVarContext<T> |
callNonVirtual(polyglot.types.ProcedureInstance pi,
AnalysisContext calleeContext,
HContext receiver,
T receiverAbsVal,
VarContext<T> preCall,
DataFlowNodeIdentifier callSite,
boolean canTerminateNormally)
|
FinalVarContext<T> |
constructorCall(polyglot.types.ConstructorInstance ci,
VarContext<T> input,
polyglot.ast.ConstructorCall n,
DataFlowNodeIdentifier callSiteNode)
Deprecated.
|
FinalVarContext<T> |
constructorCallFromConstructor(polyglot.types.ConstructorInstance ci,
VarContext<T> input,
DataFlowNodeIdentifier callSite)
|
protected FinalVarContext<T> |
getAnalysisResultsFromWorkQueue(AnalysisUnit callee,
VarContext<T> beforeCall)
Deprecated.
|
protected abstract FinalVarContext<T> |
getAnalysisResultsFromWorkQueue(AnalysisUnit callee,
VarContext<T> beforeCall,
DataFlowNodeIdentifier callSite)
Get the analysis results for the given callee and variable context.
|
protected FinalVarContext<T> |
guessAnalysisForMissingCode(polyglot.types.ProcedureInstance pi,
AnalysisContext calleeContext,
HContext receiver,
VarContext<T> input,
T receiverAbsVal,
java.util.List<T> argAbsVals,
java.util.Set<ExitMap.Key> computeExpectedExits,
DataFlowNodeIdentifier callSite)
Get analysis results for procedures for which the source code is missing.
|
protected FinalVarContext<T> |
makeFinalVarContext(java.util.Set<ExitMap.Key> expectedExits,
VarContext<T> normal,
VarContext<T> exceptional)
Make a final var context for the given normal and exceptional var
contexts
|
protected FinalVarContext<T> |
mergeCallResults(java.util.Map<HContext,FinalVarContext<T>> resMap,
DataFlowNodeIdentifier callSite)
Merge the results of analyzing a virtual method call which may have
multiple targets
|
protected VarContext<T> |
prepareCalleeContext(AnalysisUnit callee,
T receiverAbsVal,
java.util.List<T> argAbsVals,
VarContext<T> callerPreCall,
DataFlowNodeIdentifier callSite)
Create a new context appropriate for analyzing the method instance
|
addLocations, analysisName, bottomAbstractValue, computeExpectedExits, createFinalVarContext, createInitContext, emptyFinalVarContext, getAnalysisForMissingReceiver, getLocationAbsVal, getSignatureForMissingCode, guessAnalysisForMissingCode, guessAnalysisForMissingReceiver, handleRecursiveCall, preCallNonVirtual, recordRead, recordReads, recordWrite, recordWrites, signatureAnalysisNamesabstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsImplicitTarget, analyze, analyzeInitializers, analyzeStaticInitializers, createExitMap, currentAnalysisUnit, currentClass, currentContext, extensionInfo, instanceInitializers, leq, maybeRecursiveCall, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsToGraph, pointsToThis, process, recordMissingCode, typeSystem, upperBound, workQueuepublic AnalysisUtilVarContextDataFlow(WorkQueue<A> workQueue, AnalysisUnit currentAnalysisUnit, AccrueExtensionInfo extInfo)
workQueue - Queue of analysis unitscurrentAnalysisUnit - Current analysis unit from the queueextInfo - compiler analysis unitpublic FinalVarContext<T> callFromNew(polyglot.types.ConstructorInstance ci, VarContext<T> input, T receiverAbsVal, DataFlowNodeIdentifier callSite) throws polyglot.types.SemanticException
ci - constructor to analyzeinput - variable context before analyzing the methodreceiverAbsVal - The abstract value to use for the newly created object, i.e.,
the abstract value that "this" will map to in the invoked constructor.callSite - the site of the call to the constructorpolyglot.types.SemanticException - if analysis failspublic FinalVarContext<T> call(polyglot.types.MethodInstance mi, VarContext<T> input, DataFlowNodeIdentifier callSite) throws polyglot.types.SemanticException
mi - method to analyzeinput - variable context before analyzing the methodcallSite - the call site of the method callpolyglot.types.SemanticException - if analysis failsprotected FinalVarContext<T> mergeCallResults(java.util.Map<HContext,FinalVarContext<T>> resMap, DataFlowNodeIdentifier callSite)
resMap - Map of heap contexts to analysis resultscallSite - DFI for the call site of the callgraph - Control flow graphpublic FinalVarContext<T> callNonVirtual(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, T receiverAbsVal, VarContext<T> preCall, DataFlowNodeIdentifier callSite, boolean canTerminateNormally) throws polyglot.types.SemanticException
pi - call to analyzecalleeContext - procedure analysis contextreceiver - abstract heap object for the calleepreCall - variable context before analyzing the methodcallSite - the call site for the procedure callcanTerminateNormally - true if the called procedure can terminate normallypolyglot.types.SemanticException - if analysis failsprotected FinalVarContext<T> guessAnalysisForMissingCode(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, VarContext<T> input, T receiverAbsVal, java.util.List<T> argAbsVals, java.util.Set<ExitMap.Key> computeExpectedExits, DataFlowNodeIdentifier callSite)
pi - procedure instance for which the code is missingcalleeContext - context for the procedure missing source codereceiver - Abstract heap object for the receiver of the missing procedureinput - context before analyzing the missing procedurereceiverAbsVal - abstract value for the receiver of the missing procedureargAbsVals - abstract values for the arguments to the missing procedurecomputeExpectedExits - expected exit keys for the missing procedure (for many analyses
the FinalVarContext must have an entry for each exit key)callSite - AST node and analysis context for the call siteFinalVarContext estimating the results of analyzing the
missing codeprotected VarContext<T> prepareCalleeContext(AnalysisUnit callee, T receiverAbsVal, java.util.List<T> argAbsVals, VarContext<T> callerPreCall, DataFlowNodeIdentifier callSite)
callee - Analysis unit for the calleereceiverAbsVal - value for the recieverargAbsVals - list of values for the procedure argumentscallerPreCall - variable context before the procedure callcallSite - procedure call sitepublic FinalVarContext<T> constructorCallFromConstructor(polyglot.types.ConstructorInstance ci, VarContext<T> input, DataFlowNodeIdentifier callSite) throws polyglot.types.SemanticException
ci with VarContext
input. This is different from call(ConstructorInstance ci,
VarContextci - constructor to analyzeinput - variable context before analyzing the methodcallSite - the site of the call to the constructorpolyglot.types.SemanticException - if analysis fails@Deprecated public final FinalVarContext<T> call(polyglot.types.ConstructorInstance ci, VarContext<T> input, T receiverAbsVal, polyglot.ast.New n, DataFlowNodeIdentifier callSiteNode) throws polyglot.types.SemanticException
#call(ConstructorInstance, VarContext, DataFlowNodeIdentifier)call in class AnalysisUtilVarContext<A extends Ordered<A>,T extends AbstractValue<T>>ci - constructor to analyzeinput - variable context before analyzing the methodreceiverAbsVal - The abstract value to use for the newly created object, i.e.,
the abstract value that "this" will map to in the invoked constructor.n - the call to the constructorpolyglot.types.SemanticException - if analysis fails@Deprecated public final FinalVarContext<T> call(polyglot.types.MethodInstance mi, VarContext<T> input, polyglot.ast.Call n, DataFlowNodeIdentifier callSiteNode) throws polyglot.types.SemanticException
call in class AnalysisUtilVarContext<A extends Ordered<A>,T extends AbstractValue<T>>mi - method to analyzeinput - variable context before analyzing the methodn - the call to the methodpolyglot.types.SemanticException - if analysis fails@Deprecated public final FinalVarContext<T> constructorCall(polyglot.types.ConstructorInstance ci, VarContext<T> input, polyglot.ast.ConstructorCall n, DataFlowNodeIdentifier callSiteNode) throws polyglot.types.SemanticException
#constructorCall(ConstructorInstance, VarContext, DataFlowNodeIdentifier)constructorCall in class AnalysisUtilVarContext<A extends Ordered<A>,T extends AbstractValue<T>>ci - constructor to analyzeinput - variable context before analyzing the methodn - the call to the constructorpolyglot.types.SemanticException - if analysis fails@Deprecated protected final FinalVarContext<T> getAnalysisResultsFromWorkQueue(AnalysisUnit callee, VarContext<T> beforeCall) throws polyglot.types.SemanticException
getAnalysisResultsFromWorkQueue in class AnalysisUtilVarContext<A extends Ordered<A>,T extends AbstractValue<T>>callee - Code for a callee that is to be analyzedbeforeCall - variable context before the call to the calleepolyglot.types.SemanticException - thrown for an analysis errorprotected abstract FinalVarContext<T> getAnalysisResultsFromWorkQueue(AnalysisUnit callee, VarContext<T> beforeCall, DataFlowNodeIdentifier callSite) throws polyglot.types.SemanticException
callee - Code for a callee that is to be analyzedbeforeCall - variable context before the call to the calleepolyglot.types.SemanticException - thrown for an analysis errorpublic abstract FinalVarContext<T> analyzeInitializersForDataFlow(VarContext<T> before) throws polyglot.types.SemanticException
input - current analysis resultspolyglot.types.SemanticException - thrown if the analysis failsprotected FinalVarContext<T> makeFinalVarContext(java.util.Set<ExitMap.Key> expectedExits, VarContext<T> normal, VarContext<T> exceptional)
expectedExits - Exit keysnormal - var context for normal terminationexceptional - var context for an exception path