public static Cons kifLambdaToStellaKappa(Cons tree) {
    { Symbol valuevariable = Stella.gensym("?v");
      Cons variables = ((Cons)(tree.rest.value));
      Stella_Object term = tree.rest.rest.value;
      boolean openquantifierP = (variables.length() == 2) &&
          (!Logic.questionMarkSymbolP(variables.rest.value));

      if (openquantifierP) {
        variables = Cons.cons(variables, Stella.NIL);
      }
      return (Cons.list$(Cons.cons(Logic.SYM_LOGIC_KAPPA, Cons.cons(variables.concatenate(Cons.cons(valuevariable, Stella.NIL), Stella.NIL), Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_e, Cons.cons(valuevariable, Cons.cons(Cons.cons(term, Stella.NIL), Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))))));
    }
  }