public Cons consifyCurrentSolutions() {
    { QueryIterator self = this;

      { QuerySolutionTable solutions = self.solutions;
        Cons listifiedsolutions = Stella.NIL;
        int arity = self.queryDescription().arity();
        boolean atomicsingletonsP = ((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_ATOMIC_SINGLETONSp, Stella.FALSE_WRAPPER))).wrapperValue;

        { QuerySolution solution = null;
          DictionaryIterator iter000 = ((DictionaryIterator)(solutions.allocateIterator()));
          Cons collect000 = null;

          while (iter000.nextP()) {
            solution = ((QuerySolution)(iter000.value));
            if (collect000 == null) {
              {
                collect000 = Cons.cons(((atomicsingletonsP &&
                    (arity == 1)) ? (solution.bindings.theArray)[0] : solution.bindings.consify()), Stella.NIL);
                if (listifiedsolutions == Stella.NIL) {
                  listifiedsolutions = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(listifiedsolutions, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons(((atomicsingletonsP &&
                    (arity == 1)) ? (solution.bindings.theArray)[0] : solution.bindings.consify()), Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
        return (listifiedsolutions);
      }
    }
  }