public static void trainCaseMatcher(Symbol className, Symbol slotName, int cycles) {
    slotName = ((Symbol)(slotName.permanentify()));
    className = ((Symbol)(className.permanentify()));
    System.out.println("Generating training examples");
    { Surrogate renamed_Class = Logic.getDescription(className).surrogateValueInverse;
      Surrogate slot = Logic.getDescription(slotName).surrogateValueInverse;
      List ilist = Logic.allClassInstances(renamed_Class).listify();
      Vector instances = Vector.newVector(ilist.length());

      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = ilist.length() - 1;
        Stella_Object instance = null;
        Cons iter001 = ilist.theConsList;

        for (;(iter000 <= upperBound000) &&
                  (!(iter001 == Stella.NIL)); iter000 = iter000 + 1, iter001 = iter001.rest) {
          i = iter000;
          instance = iter001.value;
          (instances.theArray)[i] = (((LogicObject)(instance)));
        }
      }
      Logic.generateCaseRuleWoSlot(instances, className, slotName);
      { int num = Logic.generateCaseTrainingExamples(instances, slot);

        System.out.println("Training case match network");
        Logic.trainCachedNeuralNetworks(cycles, num * Logic.$NUM_TRAINING_PER_CASE$);
      }
    }
  }