public static double generateSlotApproximation(Symbol instName, Surrogate slot) {
    { Stella_Object probe = Logic.getInstance(instName);
      Surrogate renamed_Class = ((LogicObject)(LogicObject.getMostSpecificClasses(((LogicObject)(probe))).last())).surrogateValueInverse;
      Symbol ruleName = Symbol.internSymbol(slot.symbolName + "-Classification");
      List instances = Logic.allClassInstances(renamed_Class).listify();
      double max = 0.0;
      double score = 0.0;
      double min = 999999.0;
      double range = 0.0;
      Cons prop = Cons.cons(ruleName, Cons.cons(instName, Stella.NIL));

      { Stella_Object instance = null;
        Cons iter000 = instances.theConsList;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          instance = iter000.value;
          { Stella_Object value = LogicObject.getSlotValue(((LogicObject)(instance)), slot);

            if (!(value == null)) {
              { double flValue = ((FloatWrapper)(value)).wrapperValue;

                if (flValue > max) {
                  max = ((FloatWrapper)(value)).wrapperValue;
                }
                if (flValue < min) {
                  min = flValue;
                }
              }
            }
          }
        }
      }
      range = max - min;
      score = QueryIterator.returnPartialTruth(Logic.makeQuery(Stella.NIL, Logic.coerceToTree(prop), Stella.NIL, Stella.NIL), true);
      return ((score * range) + min);
    }
  }