public static Proposition surrogateDbuildProposition(Surrogate self) {
    { Stella_Object value = self.surrogateValue;
      Proposition proposition = null;

      if (value != null) {
        if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(value), Logic.SGT_LOGIC_PROPOSITION)) {
          { Proposition value000 = ((Proposition)(value));

            proposition = value000;
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

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

              try {
                Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                stream000.nativeStream.println("ERROR: Expected `" + self.symbolName + "' to have type proposition.");
                Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

              } finally {
                Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
              }
            }
            throw ((PropositionError)(PropositionError.newPropositionError(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
      else {
        {
          proposition = Logic.createProposition(Logic.SYM_LOGIC_CONSTANT, 0);
          proposition.operator = self;
          self.surrogateValue = proposition;
          KeyValueList.setDynamicSlotValue(proposition.dynamicSlots, Logic.SYM_STELLA_SURROGATE_VALUE_INVERSE, self, null);
        }
      }
      return (proposition);
    }
  }