Examples of addSucc()


Examples of dk.brics.string.intermediate.Call.addSucc()

                if (target == null)
                    continue;
                Call call = new Call(var, target, new Variable[0]);
                m.addStatement(call);
                m.getEntry().addSucc(call);
                call.addSucc(spot);
            }
           
            /*for (SootClass ac2 : getApplicationClasses()) {
                if (ac2.isInterface()) // skip interfaces here
                    continue;
View Full Code Here

Examples of dk.brics.string.intermediate.Catch.addSucc()

     
      // remember the Catch statement associated with the trap
      catchers.put(trap, ct);
     
      // add the catch block as successor
      ct.addSucc(translations.get(trap.getHandlerUnit()).getFirst());
    }
       
        // connect according to normal flow
        AssertionContext assertionContext = new AssertionContext(jt, definitions, translations, sootMethod);
        BriefUnitGraph normalFlow = new BriefUnitGraph(body);
View Full Code Here

Examples of dk.brics.string.intermediate.FieldAssignment.addSucc()

          for (FieldAssignment assign : assigns) {
            FieldAssignment copiedAssign = new FieldAssignment(assign.getField(), assign.getFrom());
            m.addStatement(copiedAssign);
            if (!copiedAssigns.isEmpty()) {
              FieldAssignment pred = copiedAssigns.getLast();
              pred.addSucc(copiedAssign);
            }
            copiedAssigns.add(copiedAssign);
          }
          if (!copiedAssigns.isEmpty()) {
            HashMap<Integer,Statement> predsMap = new HashMap<Integer,Statement>();
View Full Code Here

Examples of dk.brics.string.intermediate.FieldAssignment.addSucc()

            }
            Statement first = copiedAssigns.getFirst();
            for (int i=0; i<predsMap.size(); i++) {
              Statement pred = predsMap.get(i);
              pred.getSuccs().remove(r);
              pred.addSucc(first);
              r.getPreds().remove(pred);
            }
            copiedAssigns.getLast().addSucc(r);
          }
        }
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

            }
            Statement first = copiedAssigns.getFirst();
            for (int i=0; i<predsMap.size(); i++) {
              Statement pred = predsMap.get(i);
              pred.getSuccs().remove(r);
              pred.addSucc(first);
              r.getPreds().remove(pred);
            }
            copiedAssigns.getLast().addSucc(r);
          }
        }
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

               
                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());
               
                assertions.getWhenFalse().getLast().addSucc(translations.get(falseSuccessor).getFirst());
                assertions.getWhenTrue().getLast().addSucc(translations.get(trueSuccessor).getFirst());
            }
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

                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());
               
                assertions.getWhenFalse().getLast().addSucc(translations.get(falseSuccessor).getFirst());
                assertions.getWhenTrue().getLast().addSucc(translations.get(trueSuccessor).getFirst());
            }
            else if (stmt instanceof LookupSwitchStmt) {
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

              List<Integer> values = new ArrayList<Integer>();
              for (int i=0; i<sw.getTargetCount(); i++) {
                Stmt succ = (Stmt)sw.getTarget(i);
                AssertionBranch assertion = assertionCreator.createSwitchAssertions(sw.getKeyBox(), sw.getLookupValue(i), sw, assertionContext);
               
                tail.addSucc(assertion.getFirst());
                assertion.getLast().addSucc(translations.get(succ).getFirst());
               
                values.add(sw.getLookupValue(i));
              }
             
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

                values.add(sw.getLookupValue(i));
              }
             
              // add default case
              AssertionBranch assertion = assertionCreator.createSwitchDefaultAssertions(sw.getKeyBox(), values, sw, assertionContext);
              tail.addSucc(assertion.getFirst());
              assertion.getLast().addSucc(translations.get(sw.getDefaultTarget()).getFirst());
            }
            else {
                // normal statement
              for (Unit succ : normalFlow.getSuccsOf(stmt)) {
View Full Code Here

Examples of dk.brics.string.intermediate.Statement.addSucc()

              assertion.getLast().addSucc(translations.get(sw.getDefaultTarget()).getFirst());
            }
            else {
                // normal statement
              for (Unit succ : normalFlow.getSuccsOf(stmt)) {
                  tail.addSucc(translations.get(succ).getFirst());
              }
            }
        }
       
        // connect first statements to the head
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.