public static double testCaseMatcher(Symbol className, Symbol slotName) {
    className = ((Symbol)(className.permanentify()));
    slotName = ((Symbol)(slotName.permanentify()));
    { Surrogate renamed_Class = Logic.getDescription(className).surrogateValueInverse;
      List cases = Logic.allClassInstances(renamed_Class).listify();
      Surrogate slot = Logic.getDescription(slotName).surrogateValueInverse;
      OutputFileStream fptr = OutputFileStream.newOutputFileStream("test-output.txt");
      List trainingCaseNames = ((List)(Logic.$CASE_NAME_TABLE$.lookup(className)));
      List trainingCases = List.newList();
      List caseNames = List.newList();
      int total = 0;
      int numCorrect = 0;

      { Stella_Object renamed_Case = null;
        Cons iter000 = cases.theConsList;
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          renamed_Case = iter000.value;
          if (collect000 == null) {
            {
              collect000 = Cons.cons(Logic.objectName(renamed_Case), Stella.NIL);
              if (caseNames.theConsList == Stella.NIL) {
                caseNames.theConsList = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(caseNames.theConsList, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons(Logic.objectName(renamed_Case), Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      { Stella_Object renamed_Case = null;
        Cons iter001 = cases.theConsList;
        Symbol caseName = null;
        Cons iter002 = caseNames.theConsList;
        Cons collect001 = null;

        for (;(!(iter001 == Stella.NIL)) &&
                  (!(iter002 == Stella.NIL)); iter001 = iter001.rest, iter002 = iter002.rest) {
          renamed_Case = iter001.value;
          caseName = ((Symbol)(iter002.value));
          if (trainingCaseNames.memberP(caseName)) {
            if (collect001 == null) {
              {
                collect001 = Cons.cons(renamed_Case, Stella.NIL);
                if (trainingCases.theConsList == Stella.NIL) {
                  trainingCases.theConsList = collect001;
                }
                else {
                  Cons.addConsToEndOfConsList(trainingCases.theConsList, collect001);
                }
              }
            }
            else {
              {
                collect001.rest = Cons.cons(renamed_Case, Stella.NIL);
                collect001 = collect001.rest;
              }
            }
          }
        }
      }
      { Stella_Object renamed_Case = null;
        Cons iter003 = cases.theConsList;
        Stella_Object probe = null;
        Cons iter004 = cases.theConsList;
        Symbol caseName = null;
        Cons iter005 = caseNames.theConsList;

        for (;(!(iter003 == Stella.NIL)) &&
                  ((!(iter004 == Stella.NIL)) &&
                   (!(iter005 == Stella.NIL))); 
              iter003 = iter003.rest,
              iter004 = iter004.rest,
              iter005 = iter005.rest) {
          renamed_Case = iter003.value;
          probe = iter004.value;
          caseName = ((Symbol)(iter005.value));
          if (!trainingCaseNames.memberP(caseName)) {
            { Stella_Object correctAnswer = LogicObject.getSlotValue(((LogicObject)(renamed_Case)), slot);
              Stella_Object answer = LogicObject.generateCaseBasedAnswer(((LogicObject)(probe)), slot, cases);

              fptr.nativeStream.print("Case " + caseName + " predicted: " + answer + " correct: " + correctAnswer);
              System.out.print("Case " + caseName + " predicted: " + answer + " correct: " + correctAnswer);
              total = total + 1;
              if (Stella_Object.eqlP(answer, correctAnswer)) {
                numCorrect = numCorrect + 1;
              }
              fptr.nativeStream.println("  Summary: " + numCorrect + " out of " + total);
              System.out.println("  Summary: " + numCorrect + " out of " + total);
            }
          }
        }
      }
      return (((double)(numCorrect)) / total);
    }
  }