public class DefaultAnalysisMonitoring extends java.lang.Object implements IAnalysisMonitoring
IAnalysisMonitoring.
 Enables easy creation of classes that only needs to implement a few methods.| Constructor and Description | 
|---|
DefaultAnalysisMonitoring()  | 
| 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. 
 | 
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 state)
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_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 | 
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 void addMessage(AbstractNode n, Message.Severity severity, java.lang.String msg)
IAnalysisMonitoringaddMessage in interface IAnalysisMonitoringpublic void addMessage(AbstractNode n, Message.Severity severity, java.lang.String key, java.lang.String msg)
IAnalysisMonitoringaddMessage in interface IAnalysisMonitoringpublic void addMessageInfo(AbstractNode n, Message.Severity severity, java.lang.String msg)
IAnalysisMonitoringaddMessageInfo in interface IAnalysisMonitoringpublic boolean allowNextIteration()
ISolverMonitoringallowNextIteration in interface ISolverMonitoring<State,Context>public java.util.Set<Message> getMessages()
IAnalysisMonitoringgetMessages in interface IAnalysisMonitoringpublic java.util.Map<TypeCollector.VariableSummary,Value> getTypeInformation()
IAnalysisMonitoringgetTypeInformation in interface IAnalysisMonitoringpublic void setSolverInterface(GenericSolver.SolverInterface c)
IAnalysisMonitoringsetSolverInterface in interface IAnalysisMonitoringpublic void visitBlockTransferPost(BasicBlock b, State state)
ISolverMonitoringvisitBlockTransferPost in interface ISolverMonitoring<State,Context>public void visitBlockTransferPre(BasicBlock b, State s)
ISolverMonitoringvisitBlockTransferPre in interface ISolverMonitoring<State,Context>public void visitCall(AbstractNode n, Value funval)
IAnalysisMonitoringvisitCall in interface IAnalysisMonitoringn - node responsible for the callfunval - the function valuepublic void visitEvalCall(AbstractNode n, Value v)
IAnalysisMonitoringvisitEvalCall in interface IAnalysisMonitoringn - node that may call evalv - value being eval'edpublic void visitEventHandlerRegistration(AbstractNode node, Context context, Value handler)
IAnalysisMonitoringvisitEventHandlerRegistration in interface IAnalysisMonitoringpublic void visitFunction(Function f, java.util.Collection<State> entry_states)
ISolverMonitoringvisitFunction in interface ISolverMonitoring<State,Context>public void visitIf(IfNode n, Value v)
IAnalysisMonitoringvisitIf in interface IAnalysisMonitoringn - if nodev - the boolean valuepublic void visitIn(AbstractNode n, boolean maybe_v2_object, boolean maybe_v2_nonobject)
IAnalysisMonitoringvisitIn in interface IAnalysisMonitoringn - 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)
IAnalysisMonitoringvisitInnerHTMLWrite in interface IAnalysisMonitoringn - 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)
IAnalysisMonitoringvisitInstanceof in interface IAnalysisMonitoringn - 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)
ISolverMonitoringvisitIterationDone in interface ISolverMonitoring<State,Context>terminatedEarlyMsg - message about premature termination, if non-nullpublic void visitJoin(long ms)
ILatticeMonitoringvisitJoin in interface ILatticeMonitoringms - time used by the join operationpublic void visitNativeFunctionCall(AbstractNode n, HostObject hostobject, boolean num_actuals_unknown, int num_actuals, int min, int max)
IAnalysisMonitoringvisitNativeFunctionCall in interface IAnalysisMonitoringn - 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)
IAnalysisMonitoringvisitNativeFunctionReturn in interface IAnalysisMonitoringpublic void visitNewFlow(BasicBlock b, Context c, State s, java.lang.String diff, java.lang.String info)
ISolverMonitoringvisitNewFlow in interface ISolverMonitoring<State,Context>public void visitNewObject(AbstractNode node, ObjectLabel label, State s)
ILatticeMonitoringvisitNewObject in interface ILatticeMonitoringpublic void visitNodeTransferPost(AbstractNode n, State s)
ISolverMonitoringvisitNodeTransferPost in interface ISolverMonitoring<State,Context>public void visitNodeTransferPre(AbstractNode n, State s)
ISolverMonitoringvisitNodeTransferPre in interface ISolverMonitoring<State,Context>public void visitPhasePost(AnalysisPhase phase)
IAnalysisMonitoringvisitPhasePost in interface IAnalysisMonitoringpublic void visitPhasePre(AnalysisPhase phase)
IAnalysisMonitoringvisitPhasePre in interface IAnalysisMonitoringpublic void visitPropagationPost(BlockAndContext<Context> from, BlockAndContext<Context> to, boolean changed)
ISolverMonitoringvisitPropagationPost 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)
ISolverMonitoringParallelTransfer.)visitPropagationPre in interface ISolverMonitoring<State,Context>public void visitPropertyAccess(Node n, Value baseval)
IAnalysisMonitoringvisitPropertyAccess in interface IAnalysisMonitoringn - 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)
IAnalysisMonitoringvisitPropertyRead in interface IAnalysisMonitoringn - 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)
IAnalysisMonitoringvisitPropertyWrite in interface IAnalysisMonitoringn - the node responsible for the writeobjs - the objects being written topropertyname - description of the property namepublic void visitRead(Node n, Value v, State state)
IAnalysisMonitoringvisitRead in interface IAnalysisMonitoringpublic void visitReadNonThisVariable(ReadVariableNode n, Value v)
IAnalysisMonitoringvisitReadNonThisVariable in interface IAnalysisMonitoringn - (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_obj)
IAnalysisMonitoringvisitReadProperty in interface IAnalysisMonitoringn - 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 objectpublic void visitReadThis(ReadVariableNode n, Value v, State state, ObjectLabel global_obj)
IAnalysisMonitoringvisitReadThis in interface IAnalysisMonitoringn - (this) read variable operationv - the value being readstate - current abstract statepublic void visitReadVariable(ReadVariableNode n, Value v, State state)
IAnalysisMonitoringvisitReadVariable in interface IAnalysisMonitoringn - read variable operationv - the value being readpublic void visitRecoveryGraph(AbstractNode node, int size)
ILatticeMonitoringvisitRecoveryGraph in interface ILatticeMonitoringpublic void visitRenameObject(AbstractNode node, ObjectLabel from, ObjectLabel to, State s)
ILatticeMonitoringvisitRenameObject in interface ILatticeMonitoringpublic void visitUnknownValueResolve(AbstractNode node, boolean partial, boolean scanning)
ILatticeMonitoringvisitUnknownValueResolve in interface ILatticeMonitoringpublic void visitUserFunctionCall(Function f, AbstractNode call, boolean constructor)
IAnalysisMonitoringvisitUserFunctionCall in interface IAnalysisMonitoringf - 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)
IAnalysisMonitoringvisitVariableAsRead in interface IAnalysisMonitoringn - (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)
IAnalysisMonitoringvisitVariableOrProperty in interface IAnalysisMonitoringCopyright © 2009-2019 Aarhus University