public static List parseRelationParametersTree(Cons parameters, Object [] MV_returnarray) {
    if (parameters == null) {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

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

          try {
            Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
            stream000.nativeStream.println("ERROR: Missing concept or relation parameters.");
            Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

          } finally {
            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
          }
        }
        throw ((PropositionError)(PropositionError.newPropositionError(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    { Symbol name = null;
      Stella_Object type = null;
      List parameternames = List.newList();
      List parametertypes = List.newList();
      boolean variablearityP = false;

      { Stella_Object p = null;
        Cons iter000 = parameters;

        loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          p = iter000.value;
          { Surrogate testValue000 = Stella_Object.safePrimaryType(p);

            if (testValue000 == Logic.SGT_STELLA_CONS) {
              { Cons p000 = ((Cons)(p));

                if (!((p000.length() == 2) &&
                    (Stella_Object.symbolP(p000.value) &&
                     Stella_Object.symbolP(p000.rest.value)))) {
                  { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

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

                      try {
                        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                        stream001.nativeStream.println("ERROR: Illegal parameter: `" + p000 + "'.");
                        Logic.helpSignalPropositionError(stream001, Logic.KWD_ERROR);

                      } finally {
                        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
                      }
                    }
                    throw ((PropositionError)(PropositionError.newPropositionError(stream001.theStringReader()).fillInStackTrace()));
                  }
                }
                name = ((Symbol)(p000.value));
                if (!Logic.questionMarkSymbolP(name)) {
                  { OutputStringStream stream002 = OutputStringStream.newOutputStringStream();

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

                      try {
                        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                        stream002.nativeStream.println("ERROR: Expected a question mark variable: `" + name + "'.");
                        Logic.helpSignalPropositionError(stream002, Logic.KWD_ERROR);

                      } finally {
                        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$002);
                      }
                    }
                    throw ((PropositionError)(PropositionError.newPropositionError(stream002.theStringReader()).fillInStackTrace()));
                  }
                }
                type = p000.rest.value;
              }
            }
            else if (Surrogate.subtypeOfSymbolP(testValue000)) {
              { Symbol p000 = ((Symbol)(p));

                name = p000;
                if (!Logic.questionMarkSymbolP(name)) {
                  { OutputStringStream stream003 = OutputStringStream.newOutputStringStream();

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

                      try {
                        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                        stream003.nativeStream.println("ERROR: Expected a question mark variable: `" + name + "'.");
                        Logic.helpSignalPropositionError(stream003, Logic.KWD_ERROR);

                      } finally {
                        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$003);
                      }
                    }
                    throw ((PropositionError)(PropositionError.newPropositionError(stream003.theStringReader()).fillInStackTrace()));
                  }
                }
                type = Logic.SGT_STELLA_THING;
              }
            }
            else {
              { OutputStringStream stream004 = OutputStringStream.newOutputStringStream();

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

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    stream004.nativeStream.println("ERROR: Illegal parameter: `" + p + "'.");
                    Logic.helpSignalPropositionError(stream004, Logic.KWD_ERROR);

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$004);
                  }
                }
                throw ((PropositionError)(PropositionError.newPropositionError(stream004.theStringReader()).fillInStackTrace()));
              }
            }
          }
          if (Logic.sequenceVariableSymbolP(name)) {
            variablearityP = true;
          }
          if (parameternames.memberP(name)) {
            { OutputStringStream stream005 = OutputStringStream.newOutputStringStream();

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

                try {
                  Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                  stream005.nativeStream.println("ERROR: Duplicate relation parameter name: `" + name + "'.");
                  Logic.helpSignalPropositionError(stream005, Logic.KWD_ERROR);

                } finally {
                  Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$005);
                }
              }
              throw ((PropositionError)(PropositionError.newPropositionError(stream005.theStringReader()).fillInStackTrace()));
            }
          }
          parameternames.push(name);
          parametertypes.push(Logic.coerceToBoundOrLocalSurrogate(((GeneralizedSymbol)(type))));
          if (variablearityP) {
            break loop000;
          }
        }
      }
      if (parametertypes == null) {
        { OutputStringStream stream006 = OutputStringStream.newOutputStringStream();

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

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              stream006.nativeStream.println("ERROR: Missing relation parameter list.");
              Logic.helpSignalPropositionError(stream006, Logic.KWD_ERROR);

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$006);
            }
          }
          throw ((PropositionError)(PropositionError.newPropositionError(stream006.theStringReader()).fillInStackTrace()));
        }
      }
      if (parametertypes.emptyP()) {
        { OutputStringStream stream007 = OutputStringStream.newOutputStringStream();

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

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              stream007.nativeStream.println("ERROR: Empty relation parameter list.");
              Logic.helpSignalPropositionError(stream007, Logic.KWD_ERROR);

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$007);
            }
          }
          throw ((PropositionError)(PropositionError.newPropositionError(stream007.theStringReader()).fillInStackTrace()));
        }
      }
      { List _return_temp = parameternames.reverse();

        MV_returnarray[0] = parametertypes.reverse();
        MV_returnarray[1] = BooleanWrapper.wrapBoolean(variablearityP);
        return (_return_temp);
      }
    }
  }