public class AntiDepAnalysisUtil extends AnalysisUtilVarContextDataFlow<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
Modifier and Type | Field and Description |
---|---|
protected polyglot.types.TypeSystem |
ts |
trackErrors
extInfo, instanceInitializersChecked, workQueue
Constructor and Description |
---|
AntiDepAnalysisUtil(WorkQueue<VarContext<AntiDepAbsVal>> wq,
AnalysisUnit currentAnalysisUnit,
AccrueExtensionInfo extInfo) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<AbstractLocation> |
abstractLocations(AntiDepAbsVal arrayDFI,
polyglot.ast.ArrayAccess aa) |
protected java.util.Set<AbstractLocation> |
abstractLocations(AntiDepAbsVal targetDFI,
polyglot.ast.Field f) |
FinalVarContext<AntiDepAbsVal> |
analyze(polyglot.ast.CodeNode n,
VarContext<AntiDepAbsVal> input)
Analyze the given code with the given current analysis results
|
FinalVarContext<AntiDepAbsVal> |
analyzeInitializersForDataFlow(VarContext<AntiDepAbsVal> before)
Analyze the initializers for the current analysis unit given the current
analysis results
|
AntiDepAbsVal |
bottomAbstractValue() |
FinalVarContext<AntiDepAbsVal> |
callNonVirtual(polyglot.types.ProcedureInstance pi,
AnalysisContext calleeContext,
HContext receiver,
AntiDepAbsVal receiverAbsVal,
VarContext<AntiDepAbsVal> input,
DataFlowNodeIdentifier callSite,
boolean canTerminateNormally)
|
VarContext<AntiDepAbsVal> |
createInitContext()
Create an initial variable context
|
protected FinalVarContext<AntiDepAbsVal> |
getAnalysisResultsFromWorkQueue(AnalysisUnit callee,
VarContext<AntiDepAbsVal> beforeCall,
DataFlowNodeIdentifier callSite)
Get the analysis results for the given callee and variable context.
|
protected FinalVarContext<AntiDepAbsVal> |
guessAnalysisForMissingReceiver(polyglot.types.ProcedureInstance pi,
VarContext<AntiDepAbsVal> input,
AntiDepAbsVal receiverAbsVal,
java.util.List<AntiDepAbsVal> argAbsVals,
java.util.Set<ExitMap.Key> expectedExits,
DataFlowNodeIdentifier callSiteNode)
Subclasses should override as a stop gap measure if the receiver is missing,
i.e., if the points to set of the receiver expression is empty.
|
protected static java.util.List<java.lang.String> |
List(java.lang.String s1) |
protected boolean |
mayBeNull(AntiDepAbsVal exprDFI,
polyglot.ast.Expr e,
polyglot.visit.FlowGraph.Peer<VarContext<AntiDepAbsVal>> peer) |
protected boolean |
mayThrowClassCastException(AntiDepAbsVal exprDFI,
polyglot.ast.Cast cast,
polyglot.visit.FlowGraph.Peer<VarContext<AntiDepAbsVal>> peer) |
protected java.util.Set<HContext> |
pointsTo(AntiDepAbsVal exprDFI,
polyglot.ast.Expr e) |
call, call, call, callFromNew, constructorCall, constructorCallFromConstructor, getAnalysisResultsFromWorkQueue, guessAnalysisForMissingCode, makeFinalVarContext, mergeCallResults, prepareCalleeContext
addLocations, analysisName, computeExpectedExits, createFinalVarContext, emptyFinalVarContext, getAnalysisForMissingReceiver, getLocationAbsVal, getSignatureForMissingCode, guessAnalysisForMissingCode, handleRecursiveCall, preCallNonVirtual, recordRead, recordReads, recordWrite, recordWrites, signatureAnalysisNames
abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsImplicitTarget, 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, workQueue
public AntiDepAnalysisUtil(WorkQueue<VarContext<AntiDepAbsVal>> wq, AnalysisUnit currentAnalysisUnit, AccrueExtensionInfo extInfo)
public FinalVarContext<AntiDepAbsVal> analyze(polyglot.ast.CodeNode n, VarContext<AntiDepAbsVal> input) throws polyglot.types.SemanticException
AnalysisUtil
analyze
in class AnalysisUtil<VarContext<AntiDepAbsVal>>
n
- Code to analyzeinput
- analysis result before analyzing the given codepolyglot.types.SemanticException
- thrown if the analysis failspublic VarContext<AntiDepAbsVal> createInitContext()
AnalysisUtilVarContext
createInitContext
in class AnalysisUtilVarContext<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
public FinalVarContext<AntiDepAbsVal> callNonVirtual(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, AntiDepAbsVal receiverAbsVal, VarContext<AntiDepAbsVal> input, DataFlowNodeIdentifier callSite, boolean canTerminateNormally) throws polyglot.types.SemanticException
AnalysisUtilVarContextDataFlow
callNonVirtual
in class AnalysisUtilVarContextDataFlow<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
pi
- call to analyzecalleeContext
- procedure analysis contextreceiver
- abstract heap object for the calleeinput
- 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 boolean mayBeNull(AntiDepAbsVal exprDFI, polyglot.ast.Expr e, polyglot.visit.FlowGraph.Peer<VarContext<AntiDepAbsVal>> peer)
protected boolean mayThrowClassCastException(AntiDepAbsVal exprDFI, polyglot.ast.Cast cast, polyglot.visit.FlowGraph.Peer<VarContext<AntiDepAbsVal>> peer)
protected java.util.Set<AbstractLocation> abstractLocations(AntiDepAbsVal targetDFI, polyglot.ast.Field f)
protected java.util.Set<AbstractLocation> abstractLocations(AntiDepAbsVal arrayDFI, polyglot.ast.ArrayAccess aa)
protected java.util.Set<HContext> pointsTo(AntiDepAbsVal exprDFI, polyglot.ast.Expr e)
public FinalVarContext<AntiDepAbsVal> analyzeInitializersForDataFlow(VarContext<AntiDepAbsVal> before) throws polyglot.types.SemanticException
AnalysisUtilVarContextDataFlow
analyzeInitializersForDataFlow
in class AnalysisUtilVarContextDataFlow<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
polyglot.types.SemanticException
- thrown if the analysis failsprotected FinalVarContext<AntiDepAbsVal> getAnalysisResultsFromWorkQueue(AnalysisUnit callee, VarContext<AntiDepAbsVal> beforeCall, DataFlowNodeIdentifier callSite) throws polyglot.types.SemanticException
AnalysisUtilVarContextDataFlow
getAnalysisResultsFromWorkQueue
in class AnalysisUtilVarContextDataFlow<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
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 AntiDepAbsVal bottomAbstractValue()
bottomAbstractValue
in class AnalysisUtilVarContext<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
protected FinalVarContext<AntiDepAbsVal> guessAnalysisForMissingReceiver(polyglot.types.ProcedureInstance pi, VarContext<AntiDepAbsVal> input, AntiDepAbsVal receiverAbsVal, java.util.List<AntiDepAbsVal> argAbsVals, java.util.Set<ExitMap.Key> expectedExits, DataFlowNodeIdentifier callSiteNode)
AnalysisUtilVarContext
guessAnalysisForMissingReceiver
in class AnalysisUtilVarContext<VarContext<AntiDepAbsVal>,AntiDepAbsVal>
pi
- missing procedureinput
- variable context before analysisreceiverAbsVal
- abstract value for the receiverargAbsVals
- list of abstract values for the procedure argumentsexpectedExits
- set of expected exit keysprotected static java.util.List<java.lang.String> List(java.lang.String s1)