public static double dynamicallyEstimateInstanceOfGoalFanout(Proposition goal) {
    { Stella_Object instancevalue = Logic.argumentBoundTo((goal.arguments.theArray)[0]);
      Stella_Object collectionvalue = Logic.argumentBoundTo((goal.arguments.theArray)[1]);

      if (instancevalue != null) {
        return (((double)(Logic.allTypes(instancevalue).length())));
      }
      else if (collectionvalue != null) {
        { Surrogate testValue000 = Stella_Object.safePrimaryType(collectionvalue);

          if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_DESCRIPTION)) {
            { Description collectionvalue000 = ((Description)(collectionvalue));

              return ((Stella_Object.isaP(collectionvalue000, Logic.SGT_LOGIC_NAMED_DESCRIPTION) ? NamedDescription.dynamicallyEstimateExtensionSize(((NamedDescription)(collectionvalue000))) : Logic.ESTIMATED_CARDINALITY_OF_DESCRIPTION));
            }
          }
          else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_COLLECTION)) {
            { Collection collectionvalue000 = ((Collection)(collectionvalue));

              return (((double)(collectionvalue000.length())));
            }
          }
          else {
            return (Stella.NULL_FLOAT);
          }
        }
      }
      else {
        return (Stella.NULL_FLOAT);
      }
    }
  }