Class SourceContextAndPath

java.lang.Object
soot.jimple.infoflow.data.SourceContext
soot.jimple.infoflow.data.SourceContextAndPath
All Implemented Interfaces:
Cloneable

public class SourceContextAndPath extends SourceContext implements Cloneable
Extension of SourceContext that also allows a paths from the source to the current statement to be stored
Author:
Steven Arzt
  • Field Details

  • Constructor Details

  • Method Details

    • getPath

      public List<soot.jimple.Stmt> getPath()
    • getFirstAbstractionSlow

      public Abstraction getFirstAbstractionSlow()
    • getAbstractionPath

      public List<Abstraction> getAbstractionPath()
    • getLastAbstraction

      public Abstraction getLastAbstraction()
      Return the last abstraction on the taint propagation path
      Returns:
      the last abstraction
    • extendPath

      public SourceContextAndPath extendPath(SourceContextAndPath other)
      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

      public SourceContextAndPath extendPath(Abstraction abs)
      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

      public SourceContextAndPath extendPath(Abstraction abs, InfoflowConfiguration config)
      Extends the taint propagation path with the given abstraction
      Parameters:
      abs - The abstraction to put on the taint propagation path
      config - 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

      public heros.solver.Pair<SourceContextAndPath,soot.jimple.Stmt> popTopCallStackItem()
      Pops the top item off the call stack.
      Returns:
      The new SourceContextAndPath object 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

      public boolean equals(Object other)
      Overrides:
      equals in class SourceContext
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SourceContext
    • clone

      public SourceContextAndPath clone()
      Overrides:
      clone in class SourceContext
    • toString

      public String toString()
      Overrides:
      toString in class SourceContext