public static Cons kifSetofallToStellaSetofall(Cons tree) {
    if (!((tree.length() == 3) ||
        (tree.length() == 2))) {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

          try {
            Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
            stream000.nativeStream.println("PARSING ERROR: Illegal `" + tree.value + "' tree: `" + tree + "'.");
            Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

          } finally {
            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
          }
        }
        throw ((ParsingError)(ParsingError.newParsingError(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    { Cons declarations = Logic.kifVariableDeclarationsToStella(tree.rest.value, false);

      if (declarations == null) {
        declarations = ((Cons)(Logic.kifTermToUntypedStellaTerm(tree.rest.value)));
      }
      else if (declarations.length() > 1) {
        { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

          { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              stream001.nativeStream.println("PARSING ERROR: Too many declarations in SETOFALL expression.");
              Logic.helpSignalPropositionError(stream001, Logic.KWD_ERROR);

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
            }
          }
          throw ((ParsingError)(ParsingError.newParsingError(stream001.theStringReader()).fillInStackTrace()));
        }
      }
      tree.secondSetter(declarations);
    }
    if (tree.rest.rest.value != null) {
      tree.thirdSetter(Logic.kifSentenceToUntypedStellaSentence(tree.rest.rest.value));
    }
    return (tree);
  }