public class TogglableMonitor extends java.lang.Object implements IAnalysisMonitoring
Modifier and Type | Class and Description |
---|---|
class |
TogglableMonitor.Toggler |
Constructor and Description |
---|
TogglableMonitor(IAnalysisMonitoring togglable) |
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.
|
boolean |
allowNextIteration()
Returns true if the fixpoint solver should continue with its next iteration or abort early and unsoundly.
|
TogglableMonitor.Toggler |
getController() |
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 c)
Sets the solver interface which will be used by the analysis.
|
void |
visitBlockTransferPost(BasicBlock b,
State s)
Invoked immediately after processing a block transfer.
|
void |
visitBlockTransferPre(BasicBlock b,
State s)
Invoked immediately before processing a block transfer.
|
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 |
visitFunction(Function f,
java.util.Collection<State> entry_states)
Invoked when a function is encountered in the scan phase.
|
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 |
visitIterationDone(java.lang.String terminatedEarlyMsg)
Invoked when dataflow solver iteration is done (not necessarily with success).
|
void |
visitJoin(long ms)
Invoked when a state join operation is performed.
|
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 |
visitNewFlow(BasicBlock b,
Context c,
State s,
java.lang.String diff,
java.lang.String info)
Invoked when new dataflow is being propagated.
|
void |
visitNewObject(AbstractNode node,
ObjectLabel label,
State s)
Invoked when a new abstract object is allocated.
|
void |
visitNodeTransferPost(AbstractNode n,
State s)
Invoked immediately after processing a node transfer.
|
void |
visitNodeTransferPre(AbstractNode n,
State s)
Invoked immediately before processing a node transfer.
|
void |
visitPhasePost(AnalysisPhase phase)
Invoked at the end of a phase.
|
void |
visitPhasePre(AnalysisPhase phase)
Invoked at the beginning of a phase.
|
void |
visitPropagationPost(BlockAndContext<Context> from,
BlockAndContext<Context> to,
boolean changed)
Invoked immediately after propagating dataflow from one location to another.
|
void |
visitPropagationPre(BlockAndContext<Context> from,
BlockAndContext<Context> to)
Invoked immediately before propagating dataflow from one location to another.
|
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_objv)
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 |
visitRecoveryGraph(AbstractNode node,
int size)
Invoked when a recovery graph has been built.
|
void |
visitRenameObject(AbstractNode node,
ObjectLabel from,
ObjectLabel to,
State s)
Invoked when an abstract object changes name (from singleton to summary for recency abstraction).
|
void |
visitUnknownValueResolve(AbstractNode node,
boolean partial,
boolean scanning)
Invoked when an unknown value is resolved.
|
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.
|
public TogglableMonitor(IAnalysisMonitoring togglable)
public void addMessage(AbstractNode n, Message.Severity severity, java.lang.String msg)
IAnalysisMonitoring
addMessage
in interface IAnalysisMonitoring
public void addMessage(AbstractNode n, Message.Severity severity, java.lang.String key, java.lang.String msg)
IAnalysisMonitoring
addMessage
in interface IAnalysisMonitoring
public void addMessageInfo(AbstractNode n, Message.Severity severity, java.lang.String msg)
IAnalysisMonitoring
addMessageInfo
in interface IAnalysisMonitoring
public boolean allowNextIteration()
ISolverMonitoring
allowNextIteration
in interface ISolverMonitoring<State,Context>
public TogglableMonitor.Toggler getController()
public java.util.Set<Message> getMessages()
IAnalysisMonitoring
getMessages
in interface IAnalysisMonitoring
public java.util.Map<TypeCollector.VariableSummary,Value> getTypeInformation()
IAnalysisMonitoring
getTypeInformation
in interface IAnalysisMonitoring
public void setSolverInterface(GenericSolver.SolverInterface c)
IAnalysisMonitoring
setSolverInterface
in interface IAnalysisMonitoring
public void visitBlockTransferPost(BasicBlock b, State s)
ISolverMonitoring
visitBlockTransferPost
in interface ISolverMonitoring<State,Context>
public void visitBlockTransferPre(BasicBlock b, State s)
ISolverMonitoring
visitBlockTransferPre
in interface ISolverMonitoring<State,Context>
public void visitCall(AbstractNode n, Value funval)
IAnalysisMonitoring
visitCall
in interface IAnalysisMonitoring
n
- node responsible for the callfunval
- the function valuepublic void visitEvalCall(AbstractNode n, Value v)
IAnalysisMonitoring
visitEvalCall
in interface IAnalysisMonitoring
n
- node that may call evalv
- value being eval'edpublic void visitEventHandlerRegistration(AbstractNode node, Context context, Value handler)
IAnalysisMonitoring
visitEventHandlerRegistration
in interface IAnalysisMonitoring
public void visitFunction(Function f, java.util.Collection<State> entry_states)
ISolverMonitoring
visitFunction
in interface ISolverMonitoring<State,Context>
public void visitIf(IfNode n, Value v)
IAnalysisMonitoring
visitIf
in interface IAnalysisMonitoring
n
- if nodev
- the boolean valuepublic void visitIn(AbstractNode n, boolean maybe_v2_object, boolean maybe_v2_nonobject)
IAnalysisMonitoring
visitIn
in interface IAnalysisMonitoring
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 valuepublic void visitInnerHTMLWrite(Node n, Value v)
IAnalysisMonitoring
visitInnerHTMLWrite
in interface IAnalysisMonitoring
n
- node where the write occursv
- value being writtenpublic void visitInstanceof(AbstractNode n, boolean maybe_v2_non_function, boolean maybe_v2_function, boolean maybe_v2_prototype_primitive, boolean maybe_v2_prototype_nonprimitive)
IAnalysisMonitoring
visitInstanceof
in interface IAnalysisMonitoring
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 valuepublic void visitIterationDone(java.lang.String terminatedEarlyMsg)
ISolverMonitoring
visitIterationDone
in interface ISolverMonitoring<State,Context>
terminatedEarlyMsg
- message about premature termination, if non-nullpublic void visitJoin(long ms)
ILatticeMonitoring
visitJoin
in interface ILatticeMonitoring
ms
- time used by the join operationpublic void visitNativeFunctionCall(AbstractNode n, HostObject hostobject, boolean num_actuals_unknown, int num_actuals, int min, int max)
IAnalysisMonitoring
visitNativeFunctionCall
in interface IAnalysisMonitoring
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)public void visitNativeFunctionReturn(AbstractNode node, HostObject hostObject, Value result)
IAnalysisMonitoring
visitNativeFunctionReturn
in interface IAnalysisMonitoring
public void visitNewFlow(BasicBlock b, Context c, State s, java.lang.String diff, java.lang.String info)
ISolverMonitoring
visitNewFlow
in interface ISolverMonitoring<State,Context>
public void visitNewObject(AbstractNode node, ObjectLabel label, State s)
ILatticeMonitoring
visitNewObject
in interface ILatticeMonitoring
public void visitNodeTransferPost(AbstractNode n, State s)
ISolverMonitoring
visitNodeTransferPost
in interface ISolverMonitoring<State,Context>
public void visitNodeTransferPre(AbstractNode n, State s)
ISolverMonitoring
visitNodeTransferPre
in interface ISolverMonitoring<State,Context>
public void visitPhasePost(AnalysisPhase phase)
IAnalysisMonitoring
visitPhasePost
in interface IAnalysisMonitoring
public void visitPhasePre(AnalysisPhase phase)
IAnalysisMonitoring
visitPhasePre
in interface IAnalysisMonitoring
public void visitPropagationPost(BlockAndContext<Context> from, BlockAndContext<Context> to, boolean changed)
ISolverMonitoring
visitPropagationPost
in interface ISolverMonitoring<State,Context>
changed
- true if the destination state was changedISolverMonitoring.visitPropagationPre(BlockAndContext, BlockAndContext)
public void visitPropagationPre(BlockAndContext<Context> from, BlockAndContext<Context> to)
ISolverMonitoring
ParallelTransfer
.)visitPropagationPre
in interface ISolverMonitoring<State,Context>
public void visitPropertyAccess(Node n, Value baseval)
IAnalysisMonitoring
visitPropertyAccess
in interface IAnalysisMonitoring
n
- operation that accesses a propertybaseval
- base value for the accesspublic void visitPropertyRead(AbstractNode n, java.util.Set<ObjectLabel> objs, PKeys propertyname, State state, boolean check_unknown)
IAnalysisMonitoring
visitPropertyRead
in interface IAnalysisMonitoring
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 propertiespublic void visitPropertyWrite(Node n, java.util.Set<ObjectLabel> objs, PKeys propertyname)
IAnalysisMonitoring
visitPropertyWrite
in interface IAnalysisMonitoring
n
- the node responsible for the writeobjs
- the objects being written topropertyname
- description of the property namepublic void visitRead(Node n, Value v, State state)
IAnalysisMonitoring
visitRead
in interface IAnalysisMonitoring
public void visitReadNonThisVariable(ReadVariableNode n, Value v)
IAnalysisMonitoring
visitReadNonThisVariable
in interface IAnalysisMonitoring
n
- (non-this) read variable operationv
- the value being readpublic void visitReadProperty(ReadPropertyNode n, java.util.Set<ObjectLabel> objlabels, PKeys propertyname, boolean maybe, State state, Value v, ObjectLabel global_objv)
IAnalysisMonitoring
visitReadProperty
in interface IAnalysisMonitoring
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_objv
- the global objectpublic void visitReadThis(ReadVariableNode n, Value v, State state, ObjectLabel global_obj)
IAnalysisMonitoring
visitReadThis
in interface IAnalysisMonitoring
n
- (this) read variable operationv
- the value being readstate
- current abstract statepublic void visitReadVariable(ReadVariableNode n, Value v, State state)
IAnalysisMonitoring
visitReadVariable
in interface IAnalysisMonitoring
n
- read variable operationv
- the value being readpublic void visitRecoveryGraph(AbstractNode node, int size)
ILatticeMonitoring
visitRecoveryGraph
in interface ILatticeMonitoring
public void visitRenameObject(AbstractNode node, ObjectLabel from, ObjectLabel to, State s)
ILatticeMonitoring
visitRenameObject
in interface ILatticeMonitoring
public void visitUnknownValueResolve(AbstractNode node, boolean partial, boolean scanning)
ILatticeMonitoring
visitUnknownValueResolve
in interface ILatticeMonitoring
public void visitUserFunctionCall(Function f, AbstractNode call, boolean constructor)
IAnalysisMonitoring
visitUserFunctionCall
in interface IAnalysisMonitoring
f
- function being calledcall
- node responsible for the callconstructor
- if set, the call uses 'new'public void visitVariableAsRead(AbstractNode n, java.lang.String varname, Value v, State state)
IAnalysisMonitoring
visitVariableAsRead
in interface IAnalysisMonitoring
n
- (non-this) read variable operationvarname
- the name of the variablev
- value being readpublic void visitVariableOrProperty(AbstractNode node, java.lang.String var, SourceLocation loc, Value value, Context context, State state)
IAnalysisMonitoring
visitVariableOrProperty
in interface IAnalysisMonitoring
Copyright © 2009-2019 Aarhus University