public static int generateRegressionTrainingExamples(Vector instances, Surrogate slot) {
    { int numInstances = instances.length();
      Symbol predName = Symbol.internSymbol(slot.symbolName + "-Classification");
      Vector slotValues = Vector.newVector(numInstances);

      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = numInstances - 1;
        LogicObject inst = null;
        Vector vector000 = instances;
        int index000 = 0;
        int length000 = vector000.length();

        for (;(iter000 <= upperBound000) &&
                  (index000 < length000); iter000 = iter000 + 1, index000 = index000 + 1) {
          i = iter000;
          inst = ((LogicObject)((vector000.theArray)[index000]));
          (slotValues.theArray)[i] = (((FloatWrapper)(LogicObject.getSlotValue(inst, slot))));
        }
      }
      Logic.normalizeNumbers(slotValues);
      { int i = Stella.NULL_INTEGER;
        int iter001 = 0;
        int upperBound001 = numInstances - 1;

        for (;iter001 <= upperBound001; iter001 = iter001 + 1) {
          i = iter001;
          if (!(((FloatWrapper)((slotValues.theArray)[i])) == null)) {
            { TrainingExample example = TrainingExample.newTrainingExample();

              example.query = Cons.cons(predName, Cons.cons(Logic.logicSymbol(((LogicObject)((instances.theArray)[i]))), Stella.NIL));
              example.concept = Symbol.internSymbol(slot.symbolName);
              example.name = Logic.objectName(((LogicObject)((instances.theArray)[i])));
              example.score = ((FloatWrapper)((slotValues.theArray)[i])).wrapperValue;
              example.timestamp = -1;
              Logic.$TRAINING_EXAMPLES$.push(example);
            }
          }
        }
      }
      return (numInstances);
    }
  }