public static String createSqlQueryFromProposition(Proposition proposition, LogicObject database, Stella_Object arguments) {
    database = database;
    { NamedDescription relation = Logic.getDescription(((Surrogate)(proposition.operator)));
      String template = ((StringWrapper)(arguments)).wrapperValue;
      KeyValueList bindings = KeyValueList.newKeyValueList();
      String sql = null;

      { Symbol var = null;
        Cons iter000 = relation.ioVariableNames.theConsList;
        Stella_Object arg = null;
        Vector vector000 = proposition.arguments;
        int index000 = 0;
        int length000 = vector000.length();
        int i = Stella.NULL_INTEGER;
        int iter001 = 1;

        for (;(!(iter000 == Stella.NIL)) &&
                  (index000 < length000); 
              iter000 = iter000.rest,
              index000 = index000 + 1,
              iter001 = iter001 + 1) {
          var = ((Symbol)(iter000.value));
          arg = (vector000.theArray)[index000];
          i = iter001;
          RDBMS.collectVariableBinding(var.symbolName, edu.isi.powerloom.PLI.getNthDomain(relation, i), Logic.safeArgumentBoundTo(arg), bindings);
        }
      }
      sql = edu.isi.sdbc.Sdbc.instantiateSqlCmdTemplate(template, bindings);
      sql = RDBMS.sqlQueryInstantiateConstraints(sql, bindings);
      return (sql);
    }
  }