public static void collectVariableBinding(String name, Stella_Object type, Stella_Object binding, KeyValueList bindings) {
    if (binding != null) {
      if (type != null) {
        type = Logic.getDescription(type);
      }
      if (RDBMS.collectionValuedConstraintP(binding)) {
        { Cons args = Stella.NIL;

          { Stella_Object elt = null;
            Cons iter000 = RDBMS.collectionValuedConstraintElements(binding);
            Cons collect000 = null;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              elt = iter000.value;
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(StringWrapper.wrapString(RDBMS.coercePowerloomObjectToString(elt, ((NamedDescription)(type)))), Stella.NIL);
                  if (args == Stella.NIL) {
                    args = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(args, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(StringWrapper.wrapString(RDBMS.coercePowerloomObjectToString(elt, ((NamedDescription)(type)))), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          binding = args;
        }
      }
      else {
        binding = StringWrapper.wrapString(RDBMS.coercePowerloomObjectToString(binding, ((NamedDescription)(type))));
      }
    }
    bindings.insertAt(StringWrapper.wrapString(name), binding);
  }