Пример #1
0
  // The generic handler calls the specific handlers
  public ATerm handler(ATerm term) {
    List result;

    result = term.match(PrecMonitor0);
    if (result != null) {
      return recMonitor((ATerm) result.get(0));
      // return null;

    }
    result = term.match(PrecTerminate0);
    if (result != null) {
      recTerminate((ATerm) result.get(0));
      return null;
    }

    notInInputSignature(term);
    return null;
  }
Пример #2
0
  @Override
  // XXX(Leo_Roos;Nov 18, 2011) leads to many recursive calls, a possible
  // reason why there has to be such a big stack size in order to run
  // Tigerseye
  public Visitable visitList(ATermList arg) throws VisitFailure {
    // save annotations
    ATermList annotations = arg.getAnnotations();

    int childCount = arg.getChildCount();
    for (int i = 0; i < childCount; i++) {
      ATerm currentAterm = arg.elementAt(i);
      ATerm t = (ATerm) currentAterm.accept(this);

      if (t != currentAterm) {
        arg = arg.replace(t, i);
      }
    }

    // restore annotations
    arg = (ATermList) arg.setAnnotations(annotations);

    return arg;
  }