public interface IAnalysisMonitoring extends ILatticeMonitoring
This interface contains callbacks for solver-specific, lattice-specific, and analysis-specific operations.
Implementations of the interface should not have side effects on the analysis state before the scan phase begins. In particular, UnknownValueResolver.getRealValue(v, state) should not be used before the scan phase.
Modifier and Type | Method and Description |
---|---|
void |
addMessage(AbstractNode n,
Message.Severity severity,
java.lang.String msg)
Adds a message for the given node.
|
void |
addMessage(AbstractNode n,
Message.Severity severity,
java.lang.String key,
java.lang.String msg)
Adds a message for the given node.
|
void |
addMessageInfo(AbstractNode n,
Message.Severity severity,
java.lang.String msg)
Adds a message for the given node.
|
java.util.Set<Message> |
getMessages()
Returns the collected messages.
|
java.util.Map<TypeCollector.VariableSummary,Value> |
getTypeInformation()
Returns the collected type information.
|
void |
setSolverInterface(GenericSolver.SolverInterface s)
Sets the solver interface which will be used by the analysis.
|
void |
visitCall(AbstractNode n,
Value funval)
Invoked when a function call occurs.
|
void |
visitEvalCall(AbstractNode n,
Value v)
Invoked when a call to eval occurs.
|
void |
visitEventHandlerRegistration(AbstractNode node,
Context context,
Value handler)
Invoked when an event handler is registered.
|
void |
visitIf(IfNode n,
Value v)
Invoked when a IfNode is processed.
|
void |
visitIn(AbstractNode n,
boolean maybe_v2_object,
boolean maybe_v2_nonobject)
Invoked when an 'in' operation is processed.
|
void |
visitInnerHTMLWrite(Node n,
Value v)
Invoked when a write to innerHTML occurs.
|
void |
visitInstanceof(AbstractNode n,
boolean maybe_v2_non_function,
boolean maybe_v2_function,
boolean maybe_v2_prototype_primitive,
boolean maybe_v2_prototype_nonprimitive)
Invoked when an 'instanceof' operation is processed.
|
void |
visitNativeFunctionCall(AbstractNode n,
HostObject hostobject,
boolean num_actuals_unknown,
int num_actuals,
int min,
int max)
Invoked when a call to a native function occurs.
|
void |
visitNativeFunctionReturn(AbstractNode node,
HostObject hostObject,
Value result)
Invoked when returning from a native function call.
|
void |
visitPhasePost(AnalysisPhase phase)
Invoked at the end of a phase.
|
void |
visitPhasePre(AnalysisPhase phase)
Invoked at the beginning of a phase.
|
void |
visitPropertyAccess(Node n,
Value baseval)
Invoked when a property access occurs.
|
void |
visitPropertyRead(AbstractNode n,
java.util.Set<ObjectLabel> objs,
PKeys propertyname,
State state,
boolean check_unknown)
Invoked when a property read operation cccurs.
|
void |
visitPropertyWrite(Node n,
java.util.Set<ObjectLabel> objs,
PKeys propertyname)
Invoked when a property write operation cccurs.
|
void |
visitRead(Node n,
Value v,
State state)
Invoked when a variable or property read operation cccurs.
|
void |
visitReadNonThisVariable(ReadVariableNode n,
Value v)
Invoked when a non-this variable read operation cccurs.
|
void |
visitReadProperty(ReadPropertyNode n,
java.util.Set<ObjectLabel> objlabels,
PKeys propertyname,
boolean maybe,
State state,
Value v,
ObjectLabel global_obj)
Invoked when a property read operation cccurs.
|
void |
visitReadThis(ReadVariableNode n,
Value v,
State state,
ObjectLabel global_obj)
Invoked when 'this' is read.
|
void |
visitReadVariable(ReadVariableNode n,
Value v,
State state)
Invoked when a variable read operation occurs.
|
void |
visitUserFunctionCall(Function f,
AbstractNode call,
boolean constructor)
Invoked when a user-function call occurs.
|
void |
visitVariableAsRead(AbstractNode n,
java.lang.String varname,
Value v,
State state)
Invoked when a variable read operation occurs.
|
void |
visitVariableOrProperty(AbstractNode node,
java.lang.String var,
SourceLocation loc,
Value value,
Context context,
State state)
Invoked when a variable or property is read or written.
|
visitJoin, visitNewObject, visitRecoveryGraph, visitRenameObject, visitUnknownValueResolve
allowNextIteration, visitBlockTransferPost, visitBlockTransferPre, visitFunction, visitIterationDone, visitNewFlow, visitNodeTransferPost, visitNodeTransferPre, visitPropagationPost, visitPropagationPre
void addMessage(AbstractNode n, Message.Severity severity, java.lang.String msg)
void addMessage(AbstractNode n, Message.Severity severity, java.lang.String key, java.lang.String msg)
void addMessageInfo(AbstractNode n, Message.Severity severity, java.lang.String msg)
java.util.Set<Message> getMessages()
java.util.Map<TypeCollector.VariableSummary,Value> getTypeInformation()
void setSolverInterface(GenericSolver.SolverInterface s)
void visitCall(AbstractNode n, Value funval)
n
- node responsible for the callfunval
- the function valuevoid visitEvalCall(AbstractNode n, Value v)
n
- node that may call evalv
- value being eval'edvoid visitEventHandlerRegistration(AbstractNode node, Context context, Value handler)
void visitIf(IfNode n, Value v)
n
- if nodev
- the boolean valuevoid visitIn(AbstractNode n, boolean maybe_v2_object, boolean maybe_v2_nonobject)
n
- node performing the operationmaybe_v2_object
- if the second parameter may be an object valuemaybe_v2_nonobject
- if the second parameter may be a non-object valuevoid visitInnerHTMLWrite(Node n, Value v)
n
- node where the write occursv
- value being writtenvoid visitInstanceof(AbstractNode n, boolean maybe_v2_non_function, boolean maybe_v2_function, boolean maybe_v2_prototype_primitive, boolean maybe_v2_prototype_nonprimitive)
n
- node performing the operationmaybe_v2_non_function
- set if the second parameter may be a non-function valuemaybe_v2_function
- set if the second parameter may be a function valuemaybe_v2_prototype_primitive
- set if the prototype property of the second parameter may be a primitive valuemaybe_v2_prototype_nonprimitive
- set if the prototype property of the second parameter may be an object valuevoid visitNativeFunctionCall(AbstractNode n, HostObject hostobject, boolean num_actuals_unknown, int num_actuals, int min, int max)
n
- node responsible for the callhostobject
- the native function being callednum_actuals_unknown
- if set, the number of actuals is unknownnum_actuals
- number of actuals (if num_actuals_unknown is not set)min
- minimum number of parameters expectedmax
- maximum number of paramaters expected (-1 for any number)void visitNativeFunctionReturn(AbstractNode node, HostObject hostObject, Value result)
void visitPhasePost(AnalysisPhase phase)
void visitPhasePre(AnalysisPhase phase)
void visitPropertyAccess(Node n, Value baseval)
n
- operation that accesses a propertybaseval
- base value for the accessvoid visitPropertyRead(AbstractNode n, java.util.Set<ObjectLabel> objs, PKeys propertyname, State state, boolean check_unknown)
n
- the node responsible for the readobjs
- the objects being read frompropertyname
- description of the property namecheck_unknown
- if set, warn about reads from unknown propertiesvoid visitPropertyWrite(Node n, java.util.Set<ObjectLabel> objs, PKeys propertyname)
n
- the node responsible for the writeobjs
- the objects being written topropertyname
- description of the property namevoid visitRead(Node n, Value v, State state)
void visitReadNonThisVariable(ReadVariableNode n, Value v)
n
- (non-this) read variable operationv
- the value being readvoid visitReadProperty(ReadPropertyNode n, java.util.Set<ObjectLabel> objlabels, PKeys propertyname, boolean maybe, State state, Value v, ObjectLabel global_obj)
n
- read property operationobjlabels
- objects being read frompropertyname
- description of the property namemaybe
- if there may be more than one valuestate
- current abstract statev
- property value with attributesglobal_obj
- the global objectvoid visitReadThis(ReadVariableNode n, Value v, State state, ObjectLabel global_obj)
n
- (this) read variable operationv
- the value being readstate
- current abstract statevoid visitReadVariable(ReadVariableNode n, Value v, State state)
n
- read variable operationv
- the value being readvoid visitUserFunctionCall(Function f, AbstractNode call, boolean constructor)
f
- function being calledcall
- node responsible for the callconstructor
- if set, the call uses 'new'void visitVariableAsRead(AbstractNode n, java.lang.String varname, Value v, State state)
n
- (non-this) read variable operationvarname
- the name of the variablev
- value being readvoid visitVariableOrProperty(AbstractNode node, java.lang.String var, SourceLocation loc, Value value, Context context, State state)
Copyright © 2009-2019 Aarhus University