public static BacklinksIndex getBacklinksIndex(Stella_Object self) {
    if (self == null) {
      return (null);
    }
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject self000 = ((LogicObject)(self));

          { BacklinksIndex index = self000.dependentPropositionsIndex;

            if (index != null) {
              return (index);
            }
            index = Logic.createBacklinksIndex(self000);
            self000.dependentPropositionsIndex = index;
            return (index);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_THING)) {
        { Thing self000 = ((Thing)(self));

          { BacklinksIndex index = ((BacklinksIndex)(KeyValueList.dynamicSlotValue(self000.dynamicSlots, Logic.SYM_LOGIC_DEPENDENT_PROPOSITIONS_INDEX, null)));

            if (index != null) {
              return (index);
            }
            index = Logic.createBacklinksIndex(self000);
            KeyValueList.setDynamicSlotValue(self000.dynamicSlots, Logic.SYM_LOGIC_DEPENDENT_PROPOSITIONS_INDEX, index, null);
            return (index);
          }
        }
      }
      else if (Surrogate.subtypeOfWrapperP(testValue000)) {
        { Wrapper self000 = ((Wrapper)(self));

          { Surrogate testValue001 = Stella_Object.safePrimaryType(self000);

            if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_INTEGER_LOGIC_WRAPPER)) {
              { IntegerLogicWrapper self001 = ((IntegerLogicWrapper)(self000));

                { BacklinksIndex index = self001.dependentPropositionsIndex;

                  if (index != null) {
                    return (index);
                  }
                  index = Logic.createBacklinksIndex(self001);
                  self001.dependentPropositionsIndex = index;
                  return (index);
                }
              }
            }
            else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_FLOAT_LOGIC_WRAPPER)) {
              { FloatLogicWrapper self001 = ((FloatLogicWrapper)(self000));

                { BacklinksIndex index = self001.dependentPropositionsIndex;

                  if (index != null) {
                    return (index);
                  }
                  index = Logic.createBacklinksIndex(self001);
                  self001.dependentPropositionsIndex = index;
                  return (index);
                }
              }
            }
            else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_STRING_LOGIC_WRAPPER)) {
              { StringLogicWrapper self001 = ((StringLogicWrapper)(self000));

                { BacklinksIndex index = self001.dependentPropositionsIndex;

                  if (index != null) {
                    return (index);
                  }
                  index = Logic.createBacklinksIndex(self001);
                  self001.dependentPropositionsIndex = index;
                  return (index);
                }
              }
            }
            else {
            }
          }
        }
      }
      else {
      }
    }
    return (null);
  }