Class SolarModel
java.lang.Object
pascal.taie.analysis.pta.plugin.util.SolverHolder
pascal.taie.analysis.pta.plugin.util.AbstractModel
pascal.taie.analysis.pta.plugin.reflection.SolarModel
- All Implemented Interfaces:
Model
Implementation of Solar, a powerful static reflection analysis.
The technique was presented in paper:
Yue Li, Tian Tan, and Jingling Xue.
Understanding and Analyzing Java Reflection.
In TOSEM 2019.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final pascal.taie.analysis.pta.plugin.reflection.MetaObjHelper
Fields inherited from class pascal.taie.analysis.pta.plugin.util.AbstractModel
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
classForName
(CSVar csVar, PointsToSet pts, Invoke invoke) protected void
classForNameKnown
(Context context, Invoke forName, String className) void
classGetConstructor
(CSVar csVar, PointsToSet pts, Invoke invoke) protected void
classGetConstructorKnown
(Context context, Invoke invoke, JClass clazz) void
classGetMethod
(CSVar csVar, PointsToSet pts, Invoke invoke) protected void
classGetMethodKnown
(Context context, Invoke invoke, JClass clazz, String name) void
classGetMethods
(CSVar csVar, PointsToSet pts, Invoke invoke) void
classNewInstance
(CSVar csVar, PointsToSet pts, Invoke invoke) void
collectUnsoundArrayNewInstance
(CSVar csVar, PointsToSet pts, Invoke invoke) protected void
handleNewNonInvokeStmt
(Stmt stmt) void
handleNewPointsToSet
(CSVar csVar, PointsToSet pts) boolean
isRelevantVar
(Var var) void
methodInvoke
(CSVar csVar, PointsToSet pts, Invoke invoke) Methods inherited from class pascal.taie.analysis.pta.plugin.util.AbstractModel
getArgs, handleNewInvoke, registerAPIHandler, registerRelevantVarIndexes, registerVarAndHandlers
-
Field Details
-
helper
protected final pascal.taie.analysis.pta.plugin.reflection.MetaObjHelper helper -
invokesWithLog
-
-
Method Details
-
classForName
@InvokeHandler(signature="<java.lang.Class: java.lang.Class forName(java.lang.String)>",argIndexes=0) @InvokeHandler(signature="<java.lang.Class: java.lang.Class forName(java.lang.String,boolean,java.lang.ClassLoader)>",argIndexes=0) public void classForName(CSVar csVar, PointsToSet pts, Invoke invoke) -
classGetConstructor
@InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Constructor getConstructor(java.lang.Class[])>",argIndexes=-1) @InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Constructor getDeclaredConstructor(java.lang.Class[])>",argIndexes=-1) public void classGetConstructor(CSVar csVar, PointsToSet pts, Invoke invoke) -
classGetMethod
@InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Method getMethod(java.lang.String,java.lang.Class[])>",argIndexes={-1,0}) @InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Method getDeclaredMethod(java.lang.String,java.lang.Class[])>",argIndexes={-1,0}) public void classGetMethod(CSVar csVar, PointsToSet pts, Invoke invoke) -
classGetMethods
@InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Method[] getMethods()>",argIndexes=-1) @InvokeHandler(signature="<java.lang.Class: java.lang.reflect.Method[] getDeclaredMethods()>",argIndexes=-1) public void classGetMethods(CSVar csVar, PointsToSet pts, Invoke invoke) -
methodInvoke
@InvokeHandler(signature="<java.lang.reflect.Method: java.lang.Object invoke(java.lang.Object,java.lang.Object[])>", argIndexes={-1,0}) public void methodInvoke(CSVar csVar, PointsToSet pts, Invoke invoke) -
classNewInstance
@InvokeHandler(signature="<java.lang.Class: java.lang.Object newInstance()>", argIndexes=-1) public void classNewInstance(CSVar csVar, PointsToSet pts, Invoke invoke) -
handleNewNonInvokeStmt
-
isRelevantVar
- Specified by:
isRelevantVar
in interfaceModel
- Overrides:
isRelevantVar
in classAbstractModel
-
handleNewPointsToSet
- Specified by:
handleNewPointsToSet
in interfaceModel
- Overrides:
handleNewPointsToSet
in classAbstractModel
-
collectUnsoundArrayNewInstance
@InvokeHandler(signature="<java.lang.reflect.Array: java.lang.Object newInstance(java.lang.Class,int)>", argIndexes=0) public void collectUnsoundArrayNewInstance(CSVar csVar, PointsToSet pts, Invoke invoke) -
classForNameKnown
-
classGetConstructorKnown
-
classGetMethodKnown
-