private boolean _checkPrivate0(BasicOperator _op) {
    if (_op.getClass() != lupos.engine.operators.singleinput.Filter.class) {
      return false;
    }

    this.f = (lupos.engine.operators.singleinput.Filter) _op;

    List<BasicOperator> _precedingOperators_1_0 = _op.getPrecedingOperators();

    this._dim_0 = -1;
    this.o1 = new lupos.engine.operators.BasicOperator[_precedingOperators_1_0.size()];

    for (BasicOperator _precOp_1_0 : _precedingOperators_1_0) {
      this._dim_0 += 1;

      if (!this._checkPrivate1(_precOp_1_0)) {
        return false;
      }
    }

    List<OperatorIDTuple> _succedingOperators_1_0 = _op.getSucceedingOperators();

    this._dim_0 = -1;
    this.o2 = new lupos.engine.operators.BasicOperator[_succedingOperators_1_0.size()];

    for (OperatorIDTuple _sucOpIDTup_1_0 : _succedingOperators_1_0) {
      this._dim_0 += 1;

      if (!this._checkPrivate2(_sucOpIDTup_1_0.getOperator())) {
        return false;
      }
    }

    return true;
  }
 public void logDeletedOperatorsBelow(
     final BasicOperator parent, final Collection<BasicOperator> deleted) {
   if (parent.getPrecedingOperators().size() < 2) {
     deleted.add(parent);
     final OperatorIDTuple[] opIDTuples =
         parent.getSucceedingOperators().toArray(new OperatorIDTuple[0]);
     for (final OperatorIDTuple opIDTuple : opIDTuples) {
       logDeletedOperatorsBelow(opIDTuple.getOperator(), deleted);
     }
   }
 }
 public void deleteAllBelow(
     final BasicOperator parent,
     final BasicOperator child,
     final Collection<BasicOperator> deleted) {
   if (child.getPrecedingOperators().size() > 1) {
     parent.removeSucceedingOperator(child);
     child.removePrecedingOperator(parent);
   } else {
     deleted.add(parent);
     final OperatorIDTuple[] opIDTuples =
         child.getSucceedingOperators().toArray(new OperatorIDTuple[0]);
     for (final OperatorIDTuple opIDTuple : opIDTuples) {
       deleteAllBelow(child, opIDTuple.getOperator(), deleted);
     }
   }
 }
  private boolean _checkPrivate0(BasicOperator _op) {
    if (_op.getClass() != lupos.rif.operator.PredicatePattern.class) {
      return false;
    }

    this.p = (lupos.rif.operator.PredicatePattern) _op;

    List<BasicOperator> _precedingOperators_1_0 = _op.getPrecedingOperators();

    this._dim_0 = -1;
    this.o1 = new lupos.engine.operators.BasicOperator[_precedingOperators_1_0.size()];

    for (BasicOperator _precOp_1_0 : _precedingOperators_1_0) {
      this._dim_0 += 1;

      if (!this._checkPrivate1(_precOp_1_0)) {
        return false;
      }
    }

    List<OperatorIDTuple> _succedingOperators_1_0 = _op.getSucceedingOperators();

    if (_succedingOperators_1_0.size() != 1) {
      return false;
    }

    for (OperatorIDTuple _sucOpIDTup_1_0 : _succedingOperators_1_0) {
      if (!(_sucOpIDTup_1_0.getOperator() instanceof lupos.engine.operators.BasicOperator)) {
        continue;
      }

      this.o2 = (lupos.engine.operators.BasicOperator) _sucOpIDTup_1_0.getOperator();

      return true;
    }

    return false;
  }
  public void deleteAllAbove(
      final BasicOperator parent,
      final BasicOperator child,
      final Collection<BasicOperator> deleted) {
    parent.removeSucceedingOperator(child);
    if (!(parent instanceof PatternMatcher)) {

      // log parent as deleted operator
      deleted.add(parent);

      // in addition, log all operators (other than child) below parent, that became unrechable
      if (parent.getSucceedingOperators().size() > 0) {
        final OperatorIDTuple[] opIDTuples =
            parent.getSucceedingOperators().toArray(new OperatorIDTuple[0]);
        for (final OperatorIDTuple opIDTuple : opIDTuples) {
          logDeletedOperatorsBelow(opIDTuple.getOperator(), deleted);
        }
      }

      for (final BasicOperator parentparent : parent.getPrecedingOperators()) {
        deleteAllAbove(parentparent, parent, deleted);
      }
    }
  }