Class DefaultSolver
java.lang.Object
pascal.taie.analysis.pta.core.solver.DefaultSolver
- All Implemented Interfaces:
Solver
-
Constructor Summary
ConstructorDescriptionDefaultSolver
(AnalysisOptions options, HeapModel heapModel, ContextSelector contextSelector, CSManager csManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallEdge
(Edge<CSCallSite, CSMethod> edge) Adds a call edge.void
addCSMethod
(CSMethod csMethod) Adds a context-sensitive method.void
addEntryPoint
(EntryPoint entryPoint) Adds an entry point.void
addIgnoredMethod
(JMethod method) If a plugin takes over the analysis of a method, and wants this solver to ignore the method (for precision and/or efficiency reasons), then it could call this API with the method.void
addPFGEdge
(Pointer source, Pointer target, FlowKind kind, Transfer transfer) Adds an edge "source -> target" (with edge transfer) to the PFG.void
addPointerFilter
(Pointer pointer, Predicate<CSObj> filter) Adds an object filter to given pointer.void
addPointsTo
(Pointer pointer, Context heapContext, Obj obj) void
addPointsTo
(Pointer pointer, CSObj csObj) void
addPointsTo
(Pointer pointer, PointsToSet pts) void
addStmts
(CSMethod csMethod, Collection<Stmt> stmts) Adds stmts to the analyzed program.void
addVarPointsTo
(Context context, Var var, Context heapContext, Obj obj) void
addVarPointsTo
(Context context, Var var, CSObj csObj) void
addVarPointsTo
(Context context, Var var, PointsToSet pts) getPointsToSetOf
(Pointer pointer) Returns the points-to set of given pointer.void
initializeClass
(JClass cls) Analyzes the static initializer (i.e., <clinit>) of given class.Creates a new empty points-to set.void
Sets plugin to this solver.void
solve()
Runs pointer analysis algorithm.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.core.solver.Solver
addPFGEdge, addPFGEdge, addPointsTo, addVarPointsTo
-
Constructor Details
-
DefaultSolver
public DefaultSolver(AnalysisOptions options, HeapModel heapModel, ContextSelector contextSelector, CSManager csManager)
-
-
Method Details
-
getOptions
- Specified by:
getOptions
in interfaceSolver
-
getHeapModel
- Specified by:
getHeapModel
in interfaceSolver
-
getContextSelector
- Specified by:
getContextSelector
in interfaceSolver
-
getCSManager
- Specified by:
getCSManager
in interfaceSolver
-
getHierarchy
- Specified by:
getHierarchy
in interfaceSolver
-
getTypeSystem
- Specified by:
getTypeSystem
in interfaceSolver
-
getCallGraph
- Specified by:
getCallGraph
in interfaceSolver
-
getPointsToSetOf
Description copied from interface:Solver
Returns the points-to set of given pointer. If the pointer has not been associated with a points-to set, this method will create a new set and associate it with the pointer.- Specified by:
getPointsToSetOf
in interfaceSolver
-
makePointsToSet
Description copied from interface:Solver
Creates a new empty points-to set.- Specified by:
makePointsToSet
in interfaceSolver
-
setPlugin
Description copied from interface:Solver
Sets plugin to this solver. -
solve
public void solve()Runs pointer analysis algorithm. -
addPointsTo
- Specified by:
addPointsTo
in interfaceSolver
-
addPointsTo
- Specified by:
addPointsTo
in interfaceSolver
-
addPointsTo
- Specified by:
addPointsTo
in interfaceSolver
-
addVarPointsTo
- Specified by:
addVarPointsTo
in interfaceSolver
-
addVarPointsTo
- Specified by:
addVarPointsTo
in interfaceSolver
-
addVarPointsTo
- Specified by:
addVarPointsTo
in interfaceSolver
-
addPointerFilter
Description copied from interface:Solver
Adds an object filter to given pointer. Note that the filter works only after it is added to the pointer, and it cannot filter out the objects pointed to by the pointer before it is added.- Specified by:
addPointerFilter
in interfaceSolver
-
addPFGEdge
Description copied from interface:Solver
Adds an edge "source -> target" (with edge transfer) to the PFG.- Specified by:
addPFGEdge
in interfaceSolver
-
addEntryPoint
Description copied from interface:Solver
Adds an entry point. Notes that the method in entry point will be set as an entry inCallGraph
- Specified by:
addEntryPoint
in interfaceSolver
-
addCallEdge
Description copied from interface:Solver
Adds a call edge.- Specified by:
addCallEdge
in interfaceSolver
- Parameters:
edge
- the added edge.
-
addCSMethod
Description copied from interface:Solver
Adds a context-sensitive method.- Specified by:
addCSMethod
in interfaceSolver
- Parameters:
csMethod
- the added context-sensitive method.
-
addStmts
Description copied from interface:Solver
Adds stmts to the analyzed program. Solver will process given stmts. -
addIgnoredMethod
Description copied from interface:Solver
If a plugin takes over the analysis of a method, and wants this solver to ignore the method (for precision and/or efficiency reasons), then it could call this API with the method. After that, this solver will not process the method body.Typically, this API should be called at the initial stage of pointer analysis, i.e., in
Plugin.onStart()
.- Specified by:
addIgnoredMethod
in interfaceSolver
- Parameters:
method
- the method to be ignored.
-
initializeClass
Description copied from interface:Solver
Analyzes the static initializer (i.e., <clinit>) of given class.- Specified by:
initializeClass
in interfaceSolver
- Parameters:
cls
- the class to be initialized.
-
getResult
-