Class ReflectiveActionModel
java.lang.Object
pascal.taie.analysis.pta.plugin.util.SolverHolder
pascal.taie.analysis.pta.plugin.util.AnalysisModelPlugin
pascal.taie.analysis.pta.plugin.reflection.ReflectiveActionModel
- All Implemented Interfaces:
Plugin
Models reflective-action methods, currently supports
- Class.newInstance()
- Constructor.newInstance(Object[])
- Method.invoke(Object,Object[])
- Field.get(Object)
- Field.set(Object,Object)
- Array.newInstance(Class,int)
-
Field Summary
Fields inherited from class pascal.taie.analysis.pta.plugin.util.AnalysisModelPlugin
handlers, relevantVarIndexes, relevantVars
Fields inherited from class pascal.taie.analysis.pta.plugin.util.SolverHolder
csManager, emptyContext, heapModel, hierarchy, selector, solver, typeSystem
-
Method Summary
Modifier and TypeMethodDescriptionvoid
arrayNewInstance
(Context context, Invoke invoke, PointsToSet pts) void
classNewInstance
(Context context, Invoke invoke, PointsToSet classes) void
constructorNewInstance
(Context context, Invoke invoke, PointsToSet constructors) void
fieldGet
(Context context, Invoke invoke, PointsToSet fldObjs, PointsToSet baseObjs) void
fieldSet
(Context context, Invoke invoke, PointsToSet fldObjs, PointsToSet baseObjs) void
methodInvoke
(Context context, Invoke invoke, PointsToSet mtdObjs, PointsToSet recvObjs) void
onNewCallEdge
(Edge<CSCallSite, CSMethod> edge) Invoked when a new call graph edge is discovered.void
onNewPointsToSet
(CSVar csVar, PointsToSet pts) Invoked when set of new objects flow to a context-sensitive variable.protected void
Methods inherited from class pascal.taie.analysis.pta.plugin.util.AnalysisModelPlugin
onNewStmt, registerHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pascal.taie.analysis.pta.plugin.Plugin
onFinish, onNewCSMethod, onNewMethod, onPhaseFinish, onStart, onUnresolvedCall, setSolver
-
Method Details
-
classNewInstance
@InvokeHandler(signature="<java.lang.Class: java.lang.Object newInstance()>", argIndexes=-1) public void classNewInstance(Context context, Invoke invoke, PointsToSet classes) -
constructorNewInstance
@InvokeHandler(signature="<java.lang.reflect.Constructor: java.lang.Object newInstance(java.lang.Object[])>", argIndexes=-1) public void constructorNewInstance(Context context, Invoke invoke, PointsToSet constructors) -
methodInvoke
@InvokeHandler(signature="<java.lang.reflect.Method: java.lang.Object invoke(java.lang.Object,java.lang.Object[])>", argIndexes={-1,0}) public void methodInvoke(Context context, Invoke invoke, PointsToSet mtdObjs, PointsToSet recvObjs) -
fieldGet
@InvokeHandler(signature="<java.lang.reflect.Field: java.lang.Object get(java.lang.Object)>", argIndexes={-1,0}) public void fieldGet(Context context, Invoke invoke, PointsToSet fldObjs, PointsToSet baseObjs) -
fieldSet
@InvokeHandler(signature="<java.lang.reflect.Field: void set(java.lang.Object,java.lang.Object)>", argIndexes={-1,0}) public void fieldSet(Context context, Invoke invoke, PointsToSet fldObjs, PointsToSet baseObjs) -
arrayNewInstance
@InvokeHandler(signature="<java.lang.reflect.Array: java.lang.Object newInstance(java.lang.Class,int)>", argIndexes=0) public void arrayNewInstance(Context context, Invoke invoke, PointsToSet pts) -
onNewCallEdge
Description copied from interface:Plugin
Invoked when a new call graph edge is discovered.- Parameters:
edge
- new call graph edge
-
onNewPointsToSet
Description copied from interface:Plugin
Invoked when set of new objects flow to a context-sensitive variable.- Specified by:
onNewPointsToSet
in interfacePlugin
- Overrides:
onNewPointsToSet
in classAnalysisModelPlugin
- Parameters:
csVar
- variable whose points-to set changespts
- set of new objects
-
registerHandlers
protected void registerHandlers()
-