public static String factToSentence(Proposition self, boolean periodP) {
    { Keyword testValue000 = self.kind;

      if ((testValue000 == Logic.KWD_PREDICATE) ||
          ((testValue000 == Logic.KWD_FUNCTION) ||
           (testValue000 == Logic.KWD_ISA))) {
        { NamedDescription relation = ((NamedDescription)(((Surrogate)(self.operator)).surrogateValue));
          Stella_Object phrase = Logic.accessBinaryValue(relation, Logic.SGT_PL_KERNEL_KB_PHRASE);
          List explodedstring = ((phrase != null) ? Logic.explodeVariablizedString(((StringWrapper)(phrase)).wrapperValue) : ((List)(null)));

          if (explodedstring != null) {
            { KeyValueList table = KeyValueList.newKeyValueList();
              String sentence = "";

              { Symbol vbl = null;
                Cons iter000 = relation.ioVariableNames.theConsList;
                Stella_Object arg = null;
                Vector vector000 = self.arguments;
                int index000 = 0;
                int length000 = vector000.length();

                for (;(!(iter000 == Stella.NIL)) &&
                          (index000 < length000); iter000 = iter000.rest, index000 = index000 + 1) {
                  vbl = ((Symbol)(iter000.value));
                  arg = (vector000.theArray)[index000];
                  table.insertAt(vbl, arg);
                }
              }
              { Stella_Object item = null;
                Cons iter001 = explodedstring.theConsList;

                for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                  item = iter001.value;
                  { Stella_Object value = null;
                    String stringvalue = null;

                    { Surrogate testValue001 = Stella_Object.safePrimaryType(item);

                      if (Surrogate.subtypeOfSymbolP(testValue001)) {
                        { Symbol item000 = ((Symbol)(item));

                          value = table.lookup(item000);
                          if (value != null) {
                            { Surrogate testValue002 = Stella_Object.safePrimaryType(value);

                              if (Surrogate.subtypeOfP(testValue002, Logic.SGT_LOGIC_SKOLEM)) {
                                { Skolem value000 = ((Skolem)(value));

                                  { Surrogate surrogate = ((LogicObject)(value000)).surrogateValueInverse;
                                    Proposition definingproposition = value000.definingProposition;

                                    if (definingproposition != null) {
                                      stringvalue = Proposition.factToSentence(definingproposition, false);
                                    }
                                    else if (surrogate != null) {
                                      stringvalue = surrogate.symbolName;
                                    }
                                    else {
                                      stringvalue = ((Skolem)(value000)).skolemName.symbolName;
                                    }
                                  }
                                }
                              }
                              else if (Surrogate.subtypeOfP(testValue002, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
                                { LogicObject value000 = ((LogicObject)(value));

                                  { Surrogate surrogate = ((LogicObject)(value000)).surrogateValueInverse;

                                    if (surrogate != null) {
                                      stringvalue = surrogate.symbolName;
                                    }
                                  }
                                }
                              }
                              else if (Surrogate.subtypeOfStringP(testValue002)) {
                                { StringWrapper value000 = ((StringWrapper)(value));

                                  stringvalue = "'" + value000.wrapperValue + "'";
                                }
                              }
                              else if (Surrogate.subtypeOfIntegerP(testValue002)) {
                                { IntegerWrapper value000 = ((IntegerWrapper)(value));

                                  stringvalue = Native.integerToString(((long)(value000.wrapperValue)));
                                }
                              }
                              else if (Surrogate.subtypeOfFloatP(testValue002)) {
                                { FloatWrapper value000 = ((FloatWrapper)(value));

                                  stringvalue = Native.floatToString(value000.wrapperValue);
                                }
                              }
                              else {
                              }
                            }
                          }
                          if (stringvalue != null) {
                            sentence = sentence + stringvalue;
                          }
                          else {
                            sentence = sentence + item000.symbolName;
                          }
                        }
                      }
                      else if (Surrogate.subtypeOfStringP(testValue001)) {
                        { StringWrapper item000 = ((StringWrapper)(item));

                          sentence = sentence + item000.wrapperValue;
                        }
                      }
                      else {
                        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                          stream000.nativeStream.print("`" + testValue001 + "' is not a valid case option");
                          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
                        }
                      }
                    }
                  }
                }
              }
              if (periodP) {
                sentence = sentence + ".";
              }
              return (sentence);
            }
          }
          return (null);
        }
      }
      else if (testValue000 == Logic.KWD_IMPLIES) {
        return ("rules not yet implemented");
      }
      else {
        return ("???");
      }
    }
  }