public static NamedDescription surrogateToDescription(Surrogate self) {
    { Stella_Object surrogatevalue = self.surrogateValue;

      if (surrogatevalue == null) {
        return (null);
      }
      if (Stella_Object.isaP(surrogatevalue, Logic.SGT_LOGIC_NAMED_DESCRIPTION)) {
        return (((NamedDescription)(surrogatevalue)));
      }
      else {
        return (Logic.getDescription(self));
      }
    }
  }