public static Cons kifExistsToStellaExists(Cons tree) {
    if ((tree.length() < 3) ||
        (tree.length() > 4)) {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

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

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

          } finally {
            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
          }
        }
        throw ((ParsingError)(ParsingError.newParsingError(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    { Stella_Object sentence1 = Logic.kifSentenceToUntypedStellaSentence(tree.rest.rest.value);
      Stella_Object sentence2 = Logic.kifSentenceToUntypedStellaSentence(tree.fourth());

      tree.secondSetter(Logic.kifVariableDeclarationsToStella(tree.rest.value, true));
      if (sentence2 != null) {
        return (Cons.list$(Cons.cons(Logic.SYM_STELLA_EXISTS, Cons.cons(tree.rest.value, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_AND, Cons.cons(sentence1, Cons.cons(Cons.cons(sentence2, Stella.NIL), Stella.NIL)))), Stella.NIL), Stella.NIL)))));
      }
      tree.thirdSetter(sentence1);
      return (tree);
    }
  }