Class AbstractModel
java.lang.Object
pascal.taie.analysis.pta.plugin.util.SolverHolder
pascal.taie.analysis.pta.plugin.util.AbstractModel
- All Implemented Interfaces:
Model
- Direct Known Subclasses:
LookupModel
,MethodTypeModel
,OthersModel
,ReflectiveActionModel
,SolarModel
,StringBasedModel
Provides common functionalities for implementing API models.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<JMethod,
TriConsumer<CSVar, PointsToSet, Invoke>> Fields inherited from class pascal.taie.analysis.pta.plugin.util.SolverHolder
csManager, emptyContext, heapModel, hierarchy, selector, solver, typeSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<PointsToSet>
getArgs
(CSVar csVar, PointsToSet pts, Invoke invoke, int... indexes) For invocation r = v.foo(a0, a1, ..., an); when points-to set of v or any ai (0 ≤ i ≤ n) changes, this convenient method returns points-to sets relevant arguments.void
handleNewInvoke
(Invoke invoke) void
handleNewPointsToSet
(CSVar csVar, PointsToSet pts) boolean
isRelevantVar
(Var var) protected void
registerAPIHandler
(JMethod api, TriConsumer<CSVar, PointsToSet, Invoke> handler) protected void
registerRelevantVarIndexes
(JMethod api, int... indexes) protected void
-
Field Details
-
relevantVarIndexes
-
relevantVars
-
handlers
-
-
Constructor Details
-
AbstractModel
-
-
Method Details
-
registerVarAndHandlers
protected void registerVarAndHandlers() -
registerRelevantVarIndexes
-
registerAPIHandler
-
handleNewInvoke
- Specified by:
handleNewInvoke
in interfaceModel
-
isRelevantVar
- Specified by:
isRelevantVar
in interfaceModel
-
handleNewPointsToSet
- Specified by:
handleNewPointsToSet
in interfaceModel
-
getArgs
For invocation r = v.foo(a0, a1, ..., an); when points-to set of v or any ai (0 ≤ i ≤ n) changes, this convenient method returns points-to sets relevant arguments. For case v/ai == csVar.getVar(), this method returns pts, otherwise, it just returns current points-to set of v/ai.- Parameters:
csVar
- may be v or any ai.pts
- changed part of csVarinvoke
- the call site which contain csVarindexes
- indexes of the relevant arguments
-