Package soot.jimple

Examples of soot.jimple.IfStmt


            System.out.println("whilePredecessor = " + whilePredecessor);

            // How many times do we unroll the loop?
            // Look through the conditional, and find the jump back to the
            // start of the block. It should be the only jump in the block.
            IfStmt jumpStmt = null;

            for (Iterator stmts = conditional.iterator(); stmts.hasNext();) {
                Stmt stmt = (Stmt) stmts.next();

                if (stmt instanceof IfStmt) {
                    IfStmt ifStmt = (IfStmt) stmt;

                    if (ifStmt.getTarget() == block.getHead()) {
                        if (jumpStmt == null) {
                            jumpStmt = ifStmt;
                        } else {
                            throw new RuntimeException(
                                    "Two jumps in conditional!");
View Full Code Here


    }
  }

  UnitBox getTarget(Unit input){
    if(input instanceof IfStmt){
      IfStmt if_stmt = (IfStmt) input;
      return if_stmt.getTargetBox();
    } else if(input instanceof GotoStmt){
      GotoStmt goto_stmt = (GotoStmt) input;
      return goto_stmt.getTargetBox();
    }
    return null;
View Full Code Here

  private void determineLabels() {
    Iterator<Unit> iter = bodyIterator();
    while(iter.hasNext()){
      Unit curr = iter.next();
      if(curr instanceof IfStmt){
        IfStmt ifstmt = (IfStmt) curr;
        m_labels.add(ifstmt.getTarget());
      } else if(curr instanceof GotoStmt){
        GotoStmt gotostmt = (GotoStmt) curr;
        m_labels.add(gotostmt.getTarget());
      } else if(curr instanceof LookupSwitchStmt){
        LookupSwitchStmt lookup = (LookupSwitchStmt) curr;
View Full Code Here

        for (Unit stmt : body.getUnits()) {
            Statement tail = translations.get(stmt).getLast();
           
            if (stmt instanceof IfStmt) {
                // branching statement: link assertion in-between its successors
                IfStmt ifstmt = (IfStmt)stmt;
               
                Stmt trueSuccessor = ifstmt.getTarget();
                Stmt falseSuccessor = (Stmt)body.getUnits().getSuccOf(ifstmt);
                AssertionBranches assertions = assertionCreator.createAssertions(ifstmt, assertionContext);
               
                tail.addSucc(assertions.getWhenFalse().getFirst());
                tail.addSucc(assertions.getWhenTrue().getFirst());
View Full Code Here

TOP

Related Classes of soot.jimple.IfStmt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.