public static Stella_Object loomArgumentDescriptionToKif(Stella_Object tree, Keyword arity) {
    if (Stella_Object.safePrimaryType(tree) == Logic.SGT_STELLA_CONS) {
      { Cons tree000 = ((Cons)(tree));

        if ((tree000.value == Logic.SYM_STELLA_INVERSE) ||
            (tree000.value == Logic.SYM_PL_KERNEL_KB_INVERSE)) {
          return (Cons.list$(Cons.cons(Logic.SYM_PL_KERNEL_KB_INVERSE, Cons.cons(Logic.loomArgumentDescriptionToKif(tree000.rest.value, Logic.KWD_BINARY), Cons.cons(Stella.NIL, Stella.NIL)))));
        }
        { Symbol x = ((Symbol)(Logic.SYSTEM_DEFINED_ARGUMENT_NAMES.nth(0)));
          Symbol y = ((Symbol)(Logic.SYSTEM_DEFINED_ARGUMENT_NAMES.nth(1)));
          Cons kappaargs = ((arity == Logic.KWD_UNARY) ? Cons.consList(Cons.cons(x, Stella.NIL)) : Cons.consList(Cons.cons(x, Cons.cons(y, Stella.NIL))));
          Cons implicitargs = Cons.copyConsList(kappaargs);

          return (Cons.list$(Cons.cons(Logic.SYM_LOGIC_KAPPA, Cons.cons(kappaargs, Cons.cons(Cons.cons(Logic.loomDescriptionToKif(tree000, implicitargs), Stella.NIL), Stella.NIL)))));
        }
      }
    }
    else {
      return (tree);
    }
  }