Exemplo n.º 1
0
  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("({");

    int count = 0;

    for (Iterator<Stmt> i = statements.iterator(); i.hasNext(); ) {
      if (count++ > 2) {
        sb.append(" ...");
        break;
      }

      Stmt n = i.next();
      sb.append(" ");
      sb.append(n.toString());
    }

    if (result != null) {
      sb.append(" ");
      sb.append(result.toString());
    }

    sb.append(" })");
    return sb.toString();
  }
Exemplo n.º 2
0
  public List acceptCFG(CFGBuilder v, List succs) {
    v.visitCFGList(inits, (cond != null ? cond.entry() : body.entry()));

    if (cond != null) {
      if (condIsConstantTrue()) {
        v.visitCFG(cond, body.entry());
      } else {
        v.visitCFG(cond, FlowGraph.EDGE_KEY_TRUE, body.entry(), FlowGraph.EDGE_KEY_FALSE, this);
      }
    }

    v.push(this).visitCFG(body, continueTarget());
    v.visitCFGList(iters, (cond != null ? cond.entry() : body.entry()));

    return succs;
  }
Exemplo n.º 3
0
 public Term continueTarget() {
   return listEntry(iters, (cond != null ? cond.entry() : body.entry()));
 }
Exemplo n.º 4
0
 public Term entry() {
   return listEntry(inits, (cond != null ? cond.entry() : body.entry()));
 }