Package soot.jimple.infoflow.data
Class SourceContextAndPath
java.lang.Object
soot.jimple.infoflow.data.SourceContext
soot.jimple.infoflow.data.SourceContextAndPath
- All Implemented Interfaces:
Cloneable
Extension of
SourceContext that also allows a paths from the source
to the current statement to be stored- Author:
- Steven Arzt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExtensibleList<soot.jimple.Stmt>protected InfoflowConfigurationprotected intprotected ExtensibleList<Abstraction>Fields inherited from class soot.jimple.infoflow.data.SourceContext
accessPath, definitions, stmt, userData -
Constructor Summary
ConstructorsConstructorDescriptionSourceContextAndPath(InfoflowConfiguration config, Collection<ISourceSinkDefinition> definitions, AccessPath value, soot.jimple.Stmt stmt) SourceContextAndPath(InfoflowConfiguration config, Collection<ISourceSinkDefinition> definitions, AccessPath value, soot.jimple.Stmt stmt, Object userData) -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanextendPath(Abstraction abs) Extends the taint propagation path with the given abstractionextendPath(Abstraction abs, InfoflowConfiguration config) Extends the taint propagation path with the given abstractionextendPath(SourceContextAndPath other) Extends the taint propagation path of THIS with the additional abstractions from OTHERReturn the last abstraction on the taint propagation pathintList<soot.jimple.Stmt>getPath()inthashCode()booleanGets whether the current call stack is empty, i.e., the path is in the method from which it originatedheros.solver.Pair<SourceContextAndPath,soot.jimple.Stmt> Pops the top item off the call stack.voidsetNeighborCounter(int counter) toString()Methods inherited from class soot.jimple.infoflow.data.SourceContext
getAccessPath, getDefinitions, getStmt, getUserData
-
Field Details
-
path
-
callStack
-
neighborCounter
protected int neighborCounter -
config
-
-
Constructor Details
-
SourceContextAndPath
public SourceContextAndPath(InfoflowConfiguration config, Collection<ISourceSinkDefinition> definitions, AccessPath value, soot.jimple.Stmt stmt) -
SourceContextAndPath
public SourceContextAndPath(InfoflowConfiguration config, Collection<ISourceSinkDefinition> definitions, AccessPath value, soot.jimple.Stmt stmt, Object userData)
-
-
Method Details
-
getPath
-
getFirstAbstractionSlow
-
getAbstractionPath
-
getLastAbstraction
Return the last abstraction on the taint propagation path- Returns:
- the last abstraction
-
extendPath
Extends the taint propagation path of THIS with the additional abstractions from OTHER- Parameters:
other- longer taint propagation path- Returns:
- The new taint propagation path
-
extendPath
Extends the taint propagation path with the given abstraction- Parameters:
abs- The abstraction to put on the taint propagation path- Returns:
- The new taint propagation path If this path would contain a loop, null is returned instead of the looping path.
-
extendPath
Extends the taint propagation path with the given abstraction- Parameters:
abs- The abstraction to put on the taint propagation pathconfig- The configuration for constructing taint propagation paths- Returns:
- The new taint propagation path. If this path would contain a loop, null is returned instead of the looping path.
-
popTopCallStackItem
Pops the top item off the call stack.- Returns:
- The new
SourceContextAndPathobject as the first element of the pair and the call stack item that was popped off as the second element. If there is no call stack, null is returned.
-
isCallStackEmpty
public boolean isCallStackEmpty()Gets whether the current call stack is empty, i.e., the path is in the method from which it originated- Returns:
- True if the call stack is empty, otherwise false
-
setNeighborCounter
public void setNeighborCounter(int counter) -
getNeighborCounter
public int getNeighborCounter() -
equals
- Overrides:
equalsin classSourceContext
-
hashCode
public int hashCode()- Overrides:
hashCodein classSourceContext
-
clone
- Overrides:
clonein classSourceContext
-
toString
- Overrides:
toStringin classSourceContext
-