public static Vector evaluateRuleInduction(Symbol relationName, Symbol className, int numTrials, int curveSplits) {
    { Surrogate renamed_Class = Logic.getDescription(className).surrogateValueInverse;
      Surrogate relation = Logic.getDescription(relationName).surrogateValueInverse;
      List ilist = Logic.allClassInstances(renamed_Class).listify();
      int num = ilist.length();
      double numTrain = (1 * num) / 2.0;
      double currentSplit = numTrain;
      Vector trainingInstances = null;
      Vector instances = Vector.newVector(num);
      double result = 0.0;
      Vector results = Vector.newVector(curveSplits);

      { Stella_Object instance = null;
        Cons iter000 = ilist.theConsList;
        int i = Stella.NULL_INTEGER;
        int iter001 = 0;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
          instance = iter000.value;
          i = iter001;
          (instances.theArray)[i] = (((LogicObject)(instance)));
        }
      }
      { int i = Stella.NULL_INTEGER;
        int iter002 = 0;
        int upperBound000 = curveSplits - 1;

        for (;iter002 <= upperBound000; iter002 = iter002 + 1) {
          i = iter002;
          (results.theArray)[i] = (FloatWrapper.wrapFloat(0.0));
        }
      }
      { int split = Stella.NULL_INTEGER;
        int iter003 = 0;
        int upperBound001 = curveSplits - 1;

        for (;iter003 <= upperBound001; iter003 = iter003 + 1) {
          split = iter003;
          currentSplit = numTrain * (((double)(split + 1)) / curveSplits);
          { int i = Stella.NULL_INTEGER;
            int iter004 = 0;
            int upperBound002 = numTrials - 1;

            for (;iter004 <= upperBound002; iter004 = iter004 + 1) {
              i = iter004;
              Logic.shuffleVector(instances);
              System.out.println("Starting Trial " + (i + 1) + " of split " + (split + 1) + " with " + currentSplit + " examples");
              Logic.clearTrainingExamples();
              Logic.clearCases();
              trainingInstances = Vector.newVector(((int)(currentSplit)));
              { int j = Stella.NULL_INTEGER;
                int iter005 = 0;
                int upperBound003 = ((int)(currentSplit - 1));

                for (;iter005 <= upperBound003; iter005 = iter005 + 1) {
                  j = iter005;
                  (trainingInstances.theArray)[j] = (((LogicObject)((instances.theArray)[j])));
                }
              }
              if (Logic.$RULE_INDUCTION_STRATEGY$ == Logic.KWD_TOP_DOWN) {
                Logic.$ENABLE_USER_THING$ = true;
                System.out.println("  Creating Match Criteria");
                Logic.generateClassificationRule(trainingInstances, relationName, className, true);
                Logic.setCandidateClauses(className);
                System.out.println("  Generating Training Examples");
                Logic.generateClassificationTrainingExamples(instances, relation, true);
                Logic.$OPTIMIZE_INDUCED_QUERIES$ = true;
              }
              else if (Logic.$RULE_INDUCTION_STRATEGY$ == Logic.KWD_BOTTOM_UP) {
                Logic.$ENABLE_USER_THING$ = false;
                Logic.generateTrainingExamples(instances, relation);
                Logic.$OPTIMIZE_INDUCED_QUERIES$ = true;
              }
              else {
                { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                  stream000.nativeStream.print("`" + Logic.$RULE_INDUCTION_STRATEGY$ + "' is not a valid case option");
                  throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
                }
              }
              Logic.$TRAINING_EXAMPLES$ = Logic.$TRAINING_EXAMPLES$.reverse();
              { List trainSet = List.newList();
                List testSet = List.newList();

                { TrainingExample example = null;
                  Cons iter006 = Logic.$TRAINING_EXAMPLES$.theConsList;
                  int j = Stella.NULL_INTEGER;
                  int iter007 = 0;

                  for (;!(iter006 == Stella.NIL); iter006 = iter006.rest, iter007 = iter007 + 1) {
                    example = ((TrainingExample)(iter006.value));
                    j = iter007;
                    if (j < currentSplit) {
                      trainSet.push(example);
                    }
                    if (j >= numTrain) {
                      testSet.push(example);
                    }
                  }
                }
                result = Logic.trainAndTestRuleInduction(trainSet, testSet);
                (results.theArray)[split] = (FloatWrapper.wrapFloat(((FloatWrapper)((results.theArray)[split])).wrapperValue + result));
                {
                  System.out.println();
                  System.out.println("  Result: " + result);
                }
;
              }
            }
          }
        }
      }
      { int i = Stella.NULL_INTEGER;
        int iter008 = 0;
        int upperBound004 = curveSplits - 1;

        for (;iter008 <= upperBound004; iter008 = iter008 + 1) {
          i = iter008;
          (results.theArray)[i] = (FloatWrapper.wrapFloat(((FloatWrapper)((results.theArray)[i])).wrapperValue / numTrials));
        }
      }
      return (results);
    }
  }