Class LabeledStmtPrinter

Direct Known Subclasses:
BriefStmtPrinter, NormalStmtPrinter

public abstract class LabeledStmtPrinter extends AbstractStmtPrinter
  • Field Details

    • labels

      protected Map<Stmt,String> labels
      branch targets *
    • references

      protected Map<Stmt,String> references
      for stmt references in Phi nodes (ms: and other occurences TODO: check and improve comment) *
  • Constructor Details

    • LabeledStmtPrinter

      public LabeledStmtPrinter()
  • Method Details

    • getLabels

      public Map<Stmt,String> getLabels()
    • getReferences

      public Map<Stmt,String> getReferences()
    • literal

      public abstract void literal(String s)
      Specified by:
      literal in class StmtPrinter
    • method

      public abstract void method(SootMethod m)
      Specified by:
      method in class StmtPrinter
    • field

      public abstract void field(SootField f)
      Specified by:
      field in class StmtPrinter
    • identityRef

      public abstract void identityRef(IdentityRef r)
      Specified by:
      identityRef in class StmtPrinter
    • stmtRef

      public void stmtRef(Stmt stmt, boolean branchTarget)
      Specified by:
      stmtRef in class StmtPrinter
    • initializeSootMethod

      public Iterable<Stmt> initializeSootMethod(@Nonnull StmtGraph<?> stmtGraph)
      createLabelMaps
      Returns:
      the linearized StmtGraph
    • methodSignature

      public void methodSignature(MethodSignature methodSig)
      Specified by:
      methodSignature in class StmtPrinter
    • fieldSignature

      public void fieldSignature(FieldSignature fieldSig)
      Specified by:
      fieldSignature in class StmtPrinter
    • buildTraps

      public JNopStmt buildTraps(StmtGraph stmtGraph)
      hint: little expensive getter - its more of a build/create - currently no overlaps
    • getTrapComparator

      public Comparator<Trap> getTrapComparator(@Nonnull Map<Stmt,Integer> stmtsBlockIdx)
      Comparator which sorts the trap output in getTraps()
    • getLabeledStmts

      @Nonnull public Collection<Stmt> getLabeledStmts(StmtGraph stmtGraph, List<Trap> traps)
      Returns the result of iterating through all Stmts in this body. All Stmts thus found are returned. Branching Stmts and statements which use PhiExpr will have Stmts; a Stmt contains a Stmt that is either a target of a branch or is being used as a pointer to the end of a CFG block.

      This method was typically used for pointer patching, e.g. when the unit chain is cloned.

      Returns:
      A collection of all the Stmts that are targets of a BranchingStmt
    • getTraps

      public List<Trap> getTraps()