Class CSVar
java.lang.Object
pascal.taie.analysis.pta.core.cs.element.CSVar
Represents context-sensitive variables.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds filter to filter out objects pointed to by this pointer.int
getIndex()
Safely retrieves context-sensitive objects pointed to by this pointer.getOrAddEdge
(FlowKind kind, Pointer source, Pointer target) Adds a pointer flow edgesource
->target
, and returns the edge.int
Retrieves the points-to set associated with this pointer.getType()
getVar()
objects()
Safely retrieves context-sensitive objects pointed to by this pointer.void
setPointsToSet
(PointsToSet pointsToSet) Sets the associated points-to set of this pointer.toString()
-
Method Details
-
getContext
- Specified by:
getContext
in interfaceCSElement
- Returns:
- the context of the context-sensitive element.
-
getVar
- Returns:
- the variable (without context).
-
getType
-
toString
-
getIndex
public int getIndex() -
getPointsToSet
Description copied from interface:Pointer
Retrieves the points-to set associated with this pointer.This method may return
null
. We recommend usePointer.getObjects()
andPointer.objects()
for accessing the objects pointed by this pointer after the pointer analysis finishes.- Specified by:
getPointsToSet
in interfacePointer
- Returns:
- the points-to set associated with this pointer.
-
setPointsToSet
Description copied from interface:Pointer
Sets the associated points-to set of this pointer.- Specified by:
setPointsToSet
in interfacePointer
-
addFilter
Description copied from interface:Pointer
Adds filter to filter out objects pointed to by this pointer. -
getFilters
- Specified by:
getFilters
in interfacePointer
- Returns:
- all filters added to this pointer.
-
getObjects
Description copied from interface:Pointer
Safely retrieves context-sensitive objects pointed to by this pointer.- Specified by:
getObjects
in interfacePointer
- Returns:
- an empty set if
pointer
has not been associated aPointsToSet
; otherwise, returns set of objects in thePointsToSet
.
-
objects
Description copied from interface:Pointer
Safely retrieves context-sensitive objects pointed to by this pointer. -
getOrAddEdge
Description copied from interface:Pointer
Adds a pointer flow edgesource
->target
, and returns the edge. If the edge already exists andkind
is notFlowKind.OTHER
,null
is returned.- Specified by:
getOrAddEdge
in interfacePointer
-
getOutEdges
- Specified by:
getOutEdges
in interfacePointer
- Returns:
- out edges of this pointer in pointer flow graph.
-
getOutDegree
public int getOutDegree()- Specified by:
getOutDegree
in interfacePointer
- Returns:
- out degree of this pointer in pointer flow graph.
-